:root {
  --ef8-red: #a71f31;
  --ef8-blue: #006f87;
  --ef8-cement: #e3f3f1;
  --ef8-night: #111b2f;
  --ef8-muted: #5f6d7b;
  --ef8-line: #d8e8e5;
  --ef8-white: #fff;
}

.easyforms8-shell {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--ef8-blue), var(--ef8-red)) border-box;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 22px 65px rgba(17, 27, 47, 0.12);
  color: var(--ef8-night);
  font-family: inherit;
  margin: 32px auto;
  max-width: 760px;
  overflow: visible;
}

.easyforms8-form {
  background:
    radial-gradient(circle at top left, rgba(227, 243, 241, 0.8), transparent 34%),
    #fff;
  padding: clamp(22px, 4vw, 42px);
}

.easyforms8-progress {
  margin-bottom: 28px;
}

.easyforms8-progress p {
  color: var(--ef8-muted);
  font-size: 14px;
  margin: 9px 0 0;
}

.easyforms8-progress-bar {
  background: #edf6f4;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.easyforms8-progress-bar span {
  background: linear-gradient(90deg, var(--ef8-blue), var(--ef8-red));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.25s ease;
}

.easyforms8-step {
  display: none;
}

.easyforms8-step.is-active {
  display: block;
}

.easyforms8-field {
  margin: 0 0 22px;
}

.easyforms8-label {
  color: var(--ef8-night);
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.easyforms8-field input[type="text"],
.easyforms8-field input[type="email"],
.easyforms8-field input[type="tel"],
.easyforms8-field input[type="url"],
.easyforms8-field input[type="number"],
.easyforms8-field input[type="date"],
.easyforms8-field input[type="time"],
.easyforms8-field input[type="file"],
.easyforms8-field textarea,
.easyforms8-field select {
  background: #fff;
  border: 1px solid var(--ef8-line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(17, 27, 47, 0.05);
  color: var(--ef8-night);
  font: inherit;
  min-height: 48px;
  padding: 12px 14px;
  text-align: left !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}

.easyforms8-date-wrap {
  position: relative;
}

.easyforms8-date-display {
  padding-right: 116px !important;
}

.easyforms8-native-date {
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px !important;
}

.easyforms8-date-display,
.easyforms8-time-display {
  letter-spacing: 0;
  text-align: left !important;
}

.easyforms8-picker-button {
  background: #edf6f4;
  border: 1px solid var(--ef8-line);
  border-radius: 8px;
  color: var(--ef8-night);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 36px;
  padding: 7px 10px;
  position: absolute;
  right: 6px;
  top: 6px;
}

.easyforms8-picker-button:hover {
  background: var(--ef8-cement);
  border-color: rgba(0, 111, 135, 0.42);
}

.easyforms8-picker {
  background: #fff;
  border: 1px solid var(--ef8-line);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(17, 27, 47, 0.18);
  color: var(--ef8-night);
  left: 0;
  margin-top: 8px;
  max-width: min(360px, calc(100vw - 48px));
  position: absolute;
  top: 100%;
  width: 100%;
  z-index: 50;
}

.easyforms8-picker[hidden] {
  display: none !important;
}

.easyforms8-picker-panel {
  padding: 14px;
}

.easyforms8-picker-top {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 40px 1fr 40px;
  margin-bottom: 12px;
  text-align: center;
}

.easyforms8-picker-top strong {
  font-size: 15px;
  text-transform: capitalize;
}

.easyforms8-picker-icon {
  align-items: center;
  background: #f8fcfb;
  border: 1px solid var(--ef8-line);
  border-radius: 8px;
  color: var(--ef8-night);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.easyforms8-calendar-weekdays,
.easyforms8-calendar-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.easyforms8-calendar-weekdays {
  color: var(--ef8-muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
}

.easyforms8-calendar-day {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ef8-night);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  min-width: 0;
}

.easyforms8-calendar-day:hover {
  background: #edf6f4;
}

.easyforms8-calendar-day.is-muted {
  color: #a8b1bd;
  font-weight: 600;
}

.easyforms8-calendar-day.is-today {
  box-shadow: inset 0 0 0 1px var(--ef8-blue);
}

.easyforms8-calendar-day.is-selected {
  background: linear-gradient(135deg, var(--ef8-blue), var(--ef8-red));
  color: #fff;
}

.easyforms8-time-wrap {
  position: relative;
}

.easyforms8-time-picker {
  max-width: min(420px, calc(100vw - 48px));
}

.easyforms8-time-wheels {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  height: 230px;
  overflow: hidden;
  position: relative;
}

.easyforms8-wheel {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding: 82px 0;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  z-index: 1;
}

.easyforms8-wheel::-webkit-scrollbar {
  display: none;
}

.easyforms8-wheel button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #a8b1bd;
  cursor: pointer;
  font: inherit;
  font-size: 25px;
  font-weight: 700;
  min-height: 42px;
  scroll-snap-align: center;
  text-align: center;
}

.easyforms8-wheel button.is-selected {
  color: #4a5265;
  font-size: 30px;
}

.easyforms8-wheel-separator {
  align-items: center;
  color: #4a5265;
  display: flex;
  font-size: 30px;
  font-weight: 800;
  justify-content: center;
  z-index: 1;
}

.easyforms8-wheel-highlight {
  background: #f1f4f6;
  border-radius: 999px;
  height: 58px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.easyforms8-time-confirm {
  background: #5ec4e6;
  border: 0;
  border-radius: 8px;
  color: #092331;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  margin-top: 14px;
  min-height: 54px;
  width: 100%;
}

.easyforms8-time-confirm:hover {
  background: #55b9dc;
}

.easyforms8-datetime {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.easyforms8-help-text {
  color: var(--ef8-muted);
  margin: -2px 0 10px;
}

.easyforms8-field textarea {
  min-height: 132px;
  resize: vertical;
}

.easyforms8-field input:focus,
.easyforms8-field textarea:focus,
.easyforms8-field select:focus {
  border-color: var(--ef8-blue);
  box-shadow: 0 0 0 4px rgba(0, 111, 135, 0.14);
  outline: none;
}

.easyforms8-options {
  display: grid;
  gap: 10px;
}

.easyforms8-options label,
.easyforms8-checkline {
  align-items: center;
  background: #f8fcfb;
  border: 1px solid var(--ef8-line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.easyforms8-options label:hover,
.easyforms8-checkline:hover {
  background: var(--ef8-cement);
  border-color: rgba(0, 111, 135, 0.42);
}

.easyforms8-options input,
.easyforms8-checkline input {
  accent-color: var(--ef8-blue);
  flex: 0 0 auto;
}

.easyforms8-rating {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.easyforms8-rating label {
  justify-content: center;
  padding: 10px;
}

.easyforms8-rating input {
  position: absolute;
  opacity: 0;
}

.easyforms8-rating span {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.easyforms8-rating input:checked + span {
  background: linear-gradient(135deg, var(--ef8-blue), var(--ef8-red));
  color: #fff;
}

.easyforms8-html-field {
  background: linear-gradient(135deg, var(--ef8-cement), #fff);
  border-left: 5px solid var(--ef8-blue);
  border-radius: 8px;
  color: var(--ef8-night);
  padding: 16px 18px;
}

.easyforms8-html-field p {
  margin: 0;
}

.easyforms8-field.has-error input,
.easyforms8-field.has-error textarea,
.easyforms8-field.has-error select,
.easyforms8-field.has-error .easyforms8-options label,
.easyforms8-field.has-error .easyforms8-checkline {
  border-color: var(--ef8-red);
}

.easyforms8-form-error {
  color: var(--ef8-red);
  font-weight: 700;
  margin: 8px 0 16px;
  min-height: 24px;
}

.easyforms8-buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.easyforms8-button {
  align-items: center;
  background: linear-gradient(135deg, var(--ef8-blue), var(--ef8-red));
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 111, 135, 0.2);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  min-width: 132px;
  padding: 12px 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.easyforms8-button:hover {
  box-shadow: 0 16px 34px rgba(167, 31, 49, 0.24);
  transform: translateY(-1px);
}

.easyforms8-button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.easyforms8-secondary {
  background: #fff;
  border: 1px solid var(--ef8-line);
  box-shadow: none;
  color: var(--ef8-night);
}

.easyforms8-confirmation {
  background:
    radial-gradient(circle at 82% 12%, rgba(167, 31, 49, 0.14), transparent 30%),
    linear-gradient(135deg, #fff, var(--ef8-cement));
  display: none;
  padding: clamp(28px, 5vw, 54px);
  text-align: center;
}

.easyforms8-confirmation.is-visible {
  display: block;
}

.easyforms8-confirmation h2 {
  color: var(--ef8-night);
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.easyforms8-confirmation p {
  color: var(--ef8-muted);
  font-size: 17px;
  margin: 0 auto 20px;
  max-width: 540px;
}

.easyforms8-link-button {
  background: transparent;
  border: 0;
  color: var(--ef8-blue);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.easyforms8-hp,
.easyforms8-field.is-hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .easyforms8-shell {
    margin: 20px auto;
  }

  .easyforms8-rating {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
  }

  .easyforms8-buttons,
  .easyforms8-button,
  .easyforms8-datetime {
    width: 100%;
  }

  .easyforms8-datetime {
    grid-template-columns: 1fr;
  }

  .easyforms8-picker {
    max-width: 100%;
  }
}
