@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;500;600;700&display=swap");

.drf-card {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 24px 32px;
  background: #fff;
  color: #111;
  max-width: 100%;
  font-family: "Red Hat Display", "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drf-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drf-step {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.drf-step.is-active {
  display: flex;
}

.drf-step-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drf-step-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #367db2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.drf-step-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #151515;
}

.drf-field-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 24px;
  align-items: start;
}

.drf-field-group--contact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.drf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drf-label {
  font-weight: 600;
  font-size: 14px;
  color: #151515;
}

.drf-select,
.drf-input,
.drf-date-input input,
select[data-role="display-condition-select"],
select[data-role="phone-condition-select"] {
  border: 1px solid #d4dbe8;
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.4;
  background: #f7fbff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.drf-select:disabled {
  color: #8d96a5;
  background: #f1f3f7;
}

.drf-select:focus,
.drf-input:focus,
.drf-date-input input:focus,
select[data-role="display-condition-select"]:focus,
select[data-role="phone-condition-select"]:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #000; /* Keep focused text clearly readable */
}

.drf-input {
  background: #fff;
  color: #0f172a;
}

.drf-checkbox {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #222;
}

.drf-checkbox input[type="radio"] {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #d2d7e3;
  appearance: none;
  position: relative;
  cursor: pointer;
  background: #fff;
}

.drf-checkbox input[type="radio"]:checked {
  border-color: #4d8bf5;
}

.drf-checkbox input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #4d8bf5;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Date/Time Picker - Displayed Below Brand Selection */
.drf-datetime-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: 24px;
  clear: both;
}

.drf-date-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.drf-date-wrapper label,
.drf-time-picker-label {
  font-weight: 600;
  font-size: 14px;
  color: #151515;
  margin-bottom: 4px;
  display: block;
}

.drf-date-input {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #367db2;
  border-radius: 12px;
  background: #fff;
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(54, 125, 178, 0.15);
}

.drf-date-input input {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  font-size: 16px;
  font-weight: 500;
  color: #0f172a;
  font-family: inherit;
}

.drf-date-input input:focus {
  outline: none;
}

.drf-date-input.is-hidden {
  display: none;
}

.drf-field.is-hidden {
  display: none;
}

.drf-date-icon {
  font-size: 20px;
  color: #367db2;
}

/* Time Picker - Wider and More Visible */
.drf-time-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.drf-time-picker {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.drf-time-select {
  min-width: 110px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid #367db2;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(54, 125, 178, 0.15);
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23367db2' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.drf-time-select:hover {
  border-color: #2271b1;
  box-shadow: 0 4px 12px rgba(54, 125, 178, 0.25);
}

.drf-time-select:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
  background-color: #f7fbff;
}

.drf-time-separator {
  font-weight: 700;
  display: flex;
  align-items: center;
  font-size: 20px;
  color: #367db2;
}

.drf-message {
  font-size: 14px;
  color: #474d57;
}

.drf-summary {
  border: 1px solid #e6e9f1;
  border-radius: 16px;
  padding: 18px;
  background: #f8faff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drf-summary-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.drf-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 24px;
}

.drf-summary-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: #4a5568;
}

.drf-summary-list span {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #6b7280;
}

.drf-summary-list strong {
  font-size: 15px;
  color: #1f2937;
}

.drf-status {
  min-height: 20px;
  font-size: 14px;
  color: #3f4654;
}

.drf-status--success {
  color: #207245;
}

.drf-status--error {
  color: #c23c3c;
}

.drf-status--warning {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeeba;
}

.drf-status:empty {
  display: none;
}

.drf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.drf-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drf-back {
  padding: 12px 20px;
  border: 1px solid #c8d1e0;
  border-radius: 16px;
  background: #fff;
  color: #1f2937;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  display: none;
}

.drf-back.is-visible {
  display: inline-flex;
}

.drf-back:hover {
  background: #f0f0f0 !important;
  color: #111 !important;
  border-color: #dcdcdc !important;
}

/* Price Display - Prominent Light Blue Box */
.drf-price {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid #90caf9;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin: 20px 0;
  display: none; /* Hidden by default, shown by JavaScript when all fields are selected */
  flex-direction: column;
  gap: 8px;
}

.drf-price-label {
  font-weight: 600;
  font-size: 16px;
  color: #1976d2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drf-price-value {
  font-size: 42px;
  font-weight: 900;
  color: #0d47a1;
  line-height: 1.2;
}

.drf-price-secondary {
  font-size: 14px;
  color: #1565c0;
  margin-top: 4px;
}

.drf-price-high {
  margin-top: 8px;
  font-size: 14px;
  color: #1565c0;
}

.drf-price-high .high-price-links a {
  color: #1976d2;
  font-weight: 600;
  text-decoration: none;
  margin: 0 4px;
  transition: color 0.2s ease;
}

.drf-price-high .high-price-links a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

.drf-price-link {
  color: #1976d2;
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
  transition: color 0.2s ease;
}

.drf-price-link:hover {
  color: #0d47a1;
  text-decoration: underline;
}

.drf-submit {
  padding: 14px 28px;
  background: #367db2;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.drf-submit:hover {
  background: #0056b3 !important;
  border-color: #0056b3 !important;
}

.drf-submit.is-loading {
  opacity: 0.75;
  cursor: wait;
}

/* Brand Icons - All Brands Visible, One Row, 1:1 Aspect Ratio */
.drf-brand-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.drf-brand-icon-label {
  cursor: pointer;
  display: block;
  position: relative;
  flex: 0 0 auto;
}

.drf-brand-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drf-brand-icon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 2px solid #d4dbe8;
  border-radius: 16px;
  transition: all 0.25s ease;
  background: #fff;
  width: 80px;
  height: 80px;
  box-sizing: border-box;
}

.drf-brand-icon-wrapper img,
.drf-brand-icon-wrapper svg {
  max-width: 50px;
  max-height: 50px;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0);
  transition: filter 0.25s ease;
}

.drf-brand-icon-wrapper span {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: #4a5568;
  transition: color 0.25s ease;
  margin-top: 4px;
  display: none;
}

.drf-brand-radio:checked + .drf-brand-icon-wrapper {
  border-color: #000;
  background: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.drf-brand-radio:checked + .drf-brand-icon-wrapper img,
.drf-brand-radio:checked + .drf-brand-icon-wrapper svg {
  filter: brightness(0) invert(1);
}

.drf-brand-radio:checked + .drf-brand-icon-wrapper span {
  color: #fff;
}

.drf-brand-icon-wrapper:hover {
  border-color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.drf-brand-icon-wrapper:hover img,
.drf-brand-icon-wrapper:hover svg {
  filter: brightness(0);
}

.drf-brand-icon-wrapper:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .drf-card {
    padding: 20px;
    border-radius: 20px;
  }

  .drf-step-title {
    font-size: 18px;
  }

  .drf-field-group {
    grid-template-columns: 1fr;
  }

  .drf-summary-list {
    grid-template-columns: 1fr;
  }

  .drf-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  .drf-actions {
    width: 100%;
    justify-content: space-between;
  }

  .drf-submit {
    width: 100%;
    justify-content: center;
    display: flex;
  }

  .drf-back,
  .drf-submit {
    flex: 1 1 auto;
  }

  /* Brand Icons on Mobile - Horizontal Scroll, All Visible */
  .drf-brand-icons {
    display: flex !important;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    padding: 12px 5px;
    margin: 15px -5px;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #367db2 #f0f0f0;
    -webkit-overflow-scrolling: touch;
  }

  .drf-brand-icons::-webkit-scrollbar {
    height: 8px;
  }

  .drf-brand-icons::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
  }

  .drf-brand-icons::-webkit-scrollbar-thumb {
    background: #367db2;
    border-radius: 4px;
  }

  .drf-brand-icons::-webkit-scrollbar-thumb:hover {
    background: #2271b1;
  }

  .drf-brand-icon-label {
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  .drf-brand-icon-wrapper {
    width: 70px;
    height: 70px;
    padding: 10px;
  }

  .drf-brand-icon-wrapper img,
  .drf-brand-icon-wrapper svg {
    max-width: 45px;
    max-height: 45px;
  }

  .drf-brand-icon-wrapper span {
    font-size: 10px;
  }

  /* Price Display on Mobile */
  .drf-price {
    padding: 20px 16px;
    margin: 16px 0;
  }

  .drf-price-value {
    font-size: 36px;
  }

  .drf-price-label {
    font-size: 14px;
  }

  /* Date/Time Picker on Mobile */
  .drf-datetime-group {
    margin-top: 20px;
    gap: 12px;
  }

  .drf-date-input {
    padding: 12px 16px;
  }

  .drf-date-input input {
    font-size: 15px;
  }

  /* Time Picker on Mobile */
  .drf-time-picker {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .drf-time-select {
    min-width: 100px;
    padding: 12px 14px;
    font-size: 15px;
    flex: 1;
  }

  .drf-time-separator {
    font-size: 18px;
  }

  #drf-full-name,
  #drf-phone,
  #drf-email {
    border: 1px solid #d4dbe8;
    border-radius: 18px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.4;
    background: #f7fbff;
    color: #0f172a;
  }
}

@media (max-width: 480px) {
  /* Brand icons in 3 columns on mobile */
  .drf-brand-icons {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px;
    padding: 10px 5px;
  }

  .drf-brand-icon-label {
    width: 100%;
  }

  .drf-brand-icon-wrapper {
    width: 100%;
    height: 70px;
    padding: 8px;
  }

  .drf-brand-icon-wrapper img,
  .drf-brand-icon-wrapper svg {
    max-width: 40px;
    max-height: 40px;
  }

  /* Smaller time selects on very small screens */
  .drf-time-select {
    min-width: 90px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .drf-date-input {
    padding: 10px 14px;
  }

  .drf-date-input input {
    font-size: 14px;
  }
}
