/* APPOINTMENT FORM */
textarea {
  width: 100%;
  padding: 2px;
  resize: vertical;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f8f4ed;
}
.form-description {
  font-size: 0.9rem;
  text-align: center;
  color: var(--color-muted, #8a7f72); 
  margin-bottom: 32px;
}
.main-form {
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  background: var(--color-form);
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.main-form label {
  margin: 12px 0 8px 8px;
  color: var(--color-dark);
  font-size: var(--font-size-label);
  font-family: "Cormorant Garamond", serif;
}
.main-form .required {
  color: red;
  font-size: 1.2rem;
  margin-left: 4px;
}
.hair-image-label .required {
  display: none;
}
.hair-image-label.is-required .required {
  display: inline;
}

.main-form input, select {
  width: 100%;
  min-height: 50px;
  padding: 12px;
  font-size: 1rem;
  margin: 2px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 40px;
  box-sizing: border-box;
  background-color: #f8f4ed;
}
.main-form input, select, textarea {
  max-width: 1000px;
}
.main-form select option {
  background-color: #f8f4ed;
} 
.main-form textarea {
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.main-form input {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.main-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 40px;
  padding: 0.75rem 1rem;
  width: 100%;
  font: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.img-container {
  position: relative;
  width: 100%;
}

.main-form select:has(option[value=""]:checked) {
  color: #a09585;
}

/* NATIVE FILE INPUT (used as-is on mobile so the OS photo picker stays unrestricted) */
.main-form input[type="file"] {
  display: block;
  margin: 0;
  padding: 9px 12px;
  color: #6b5c4e;
  cursor: pointer;
}
.main-form input[type="file"]::-webkit-file-upload-button,
.main-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 9px 18px;
  border: none;
  border-radius: 40px;
  background: var(--color-submit-btn);
  color: var(--color-light);
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}
.main-form input[type="file"]::-webkit-file-upload-button:hover,
.main-form input[type="file"]::file-selector-button:hover {
  background: var(--color-submit-btn-hover);
}

/* Custom drop zone hidden by default; shown on desktop only */
.file-drop {
  display: none;
}

@media (min-width: 601px) {
  /* Visually hide the native input but keep it in the DOM so it still carries the file */
  .img-container input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .file-drop {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 1000px;
    min-height: 20px;
    padding: 14px 18px;
    border: 1.5px dashed #c9bda8;
    border-radius: 20px;
    background: #f8f4ed;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
  }
  .file-drop:hover,
  .file-drop.is-dragover {
    border-color: var(--color-primary);
    background: #f3ecdf;
  }
  .file-drop.has-file {
    border-style: solid;
  }
  .img-container input[type="file"]:focus-visible + .file-drop {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(184, 138, 68, 0.25);
  }

  .file-drop-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
  }
  .file-drop-icon {
    flex-shrink: 0;
    color: var(--color-primary);
  }
  .file-drop-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .file-drop-title {
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-dark);
  }
  .file-drop-hint {
    font-family: "Inter", sans-serif;
    font-size: 0.78rem;
    color: #8a7f72;
  }

  .file-drop-selected {
    display: none;
    align-items: center;
    gap: 14px;
    width: 100%;
  }
  .file-drop.has-file .file-drop-empty {
    display: none;
  }
  .file-drop.has-file .file-drop-selected {
    display: flex;
  }
  .file-drop-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    background: #e7decb;
  }
  .file-drop-name {
    flex: 1;
    min-width: 0;
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    color: var(--color-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .file-drop-clear {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--color-dark);
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .file-drop-clear:hover {
    background: var(--color-submit-btn);
    color: var(--color-light);
  }
}
.book-app-btn{
  display: block;
  width: 50%;
  text-align: center;
  background-color: var(--color-submit-btn);
  color: var(--color-light);
  padding: 14px;
  margin: 10px auto;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  box-shadow:
    0 0 15px 6px rgba(184,138,68,0.25),
    0 2px 10px rgba(184,138,68,0.1);
}
.main-form button[type=submit]:hover {
  background: var(--color-submit-btn-hover);
}
.app-form{
  max-width: 90%;
  height: auto;
  margin: 0 auto;
  margin-bottom: 40px;
}
.form-title {
    font-size: clamp(2.2rem, 3.6vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin: 24px 0 12px 0;
}
.form-title::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--color-primary);
}
.form-title::after {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--color-primary);
}
.form-title em {
  font-style: italic;
  color: #6b4f2e;
}



.main-form input:focus, .main-form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(184,138,68,0.25);
}

/* Sms Consent */
.main-form input[type="checkbox"] {
  width: 24px;
  min-height: 18px;
  height: 24px;
  box-shadow: none;
  border-radius: 4px;
  margin: 0;
}
.consent-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 80%;
  margin: 8px auto;
  align-items: center;
}
.consent-wrapper label {
  font-size: 1.2rem;
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
}

@media (max-width: 600px) {
  .consent-wrapper label {
    font-size: 0.9rem;
  }
}

/* DATE + TIME ERROR */
.input-error {
  border-color: red !important;
  box-shadow: 0 0 2px rgba(255, 0, 0, 0.15) !important;
}

@media (max-width: 600px) {
  .book-app-btn {
    width: 80%;
  }
  .booking-wrapper {
    width: 100%;
  }
  .main-form select {
    width: 100%;
  }
}

/* DATE + TIME BOOKING CARD */
.booking-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  padding: 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #f8f4ed;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}
.booking-wrapper.input-error {
  border-color: red;
  box-shadow: 0 0 2px rgba(255, 0, 0, 0.15);
}

/* flatpickr reveals its input in inline mode — the calendar itself is the control */
.booking-wrapper .flatpickr-input {
  display: none;
}

/* Blend the inline flatpickr calendar into the card */
.flatpickr-calendar.inline {
  box-shadow: none;
  background: transparent;
}
.flatpickr-months {
  background: transparent;
}
.flatpickr-month {
  min-height: 48px;
}
.flatpickr-months .flatpickr-next-month, .flatpickr-months .flatpickr-prev-month {
  margin-top: 6px;
}
.form-control {
  cursor: pointer;
}
.flatpickr-weekdays, .flatpickr-days {
  font-size: 18px;
}
/* Match the theme's accent to the site's gold palette.
   Scoped under .booking-wrapper so it outranks the CDN theme loaded after this file. */
.booking-wrapper .flatpickr-day.selected,
.booking-wrapper .flatpickr-day.selected:hover,
.booking-wrapper .flatpickr-day.selected:focus {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-light);
}
.booking-wrapper .flatpickr-day.today:not(.selected) {
  border-color: var(--color-primary);
}

/* TIME SLOT PANEL */
.time-panel {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}
.time-panel-title {
  margin: 4px 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: var(--font-size-label);
  font-weight: 600;
  color: var(--color-dark);
}
.container-time-slot {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  align-content: start;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.time-panel-empty {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  color: #8a7f72;
}
.time-panel-error {
  color: #b3402e;
}
.slot-button {
  padding: 10px 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: var(--color-dark);
  background: var(--color-light);
  border: 1px solid #ccc;
  border-radius: 40px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.slot-button:hover {
  border-color: var(--color-primary);
}
.slot-button.selected {
  background: var(--color-submit-btn);
  border-color: var(--color-submit-btn);
  color: var(--color-light);
}

/* Confirmation bar shown once a date and time are both chosen */
.booking-summary {
  flex-basis: 100%;
  padding: 10px 16px;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-submit-btn);
  background: rgba(176, 138, 82, 0.12);
  border-radius: 40px;
}

@media (max-width: 699px) {
  .booking-wrapper {
    flex-direction: column;
  }
  .booking-wrapper .flatpickr-calendar,
  .booking-wrapper .flatpickr-rContainer,
  .booking-wrapper .flatpickr-days,
  .booking-wrapper .dayContainer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .container-time-slot {
    max-height: 220px;
  }
}

/* Map+ADDRESS+HOURS */
.map-hours-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map-container iframe {
  border: 1px solid #ccc;
  border-radius: 8px;
  min-height: 250px;
}

@media (max-width: 900px) {
  .map-container iframe {
    width: 100%;
  }
}

.location-address-hours-title {
  margin: 1rem 0;
}
hr.form-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-dark), transparent);
  opacity: 0.25;
  margin: 12px auto 28px;
  width: 80%;
}
.address-container {
  max-width: 250px;
  text-align: center;
  margin: 0 auto;
}
.address-link {
  display: flex;
  color: inherit;
  text-decoration: none;
  font-size: var(--font-size-contact);
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}
.address-desc {
  margin-top: 10px;
  font-size: 12px;
}
.address-link:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}
.hours-container {
  display: flex;
  flex-direction: column;
  margin: 0 15px
}
.hours-container ul {
  gap: 25px;
  font-weight: 500;
}
.hours-container h2 {
  text-align: center;
}
.day-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 25px;
}

@media (max-width: 900px) {
  .map-hours-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* SUCCESS MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.5s ease;
  opacity: 0;
  visibility: hidden;
}
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.modal-container {
  background: #f1e9da;
  color: #3B2A1E;
  padding: 32px 36px; 
  border-radius: 24px;
  width: 90%;
  max-width: 550px;
  box-shadow: 0 0 11px 1px rgba(53, 49, 49, 0.8), 0 2px 6px rgba(156, 118, 60, 0.1);
}

/* MODAL TEXT */
.modal-title {
  font-size: 1.6rem;
  line-height: 1.3;
  margin: 0 0 12px 0;
}
.modal-message {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6b5c4e;
  margin: 0 0 28px 0;
}
.appointment-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 auto 24px;
  max-width: 340px;
  text-align: left;
}
.appointment-details li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 6px;
  font-size: 0.95rem;
  color: #6b5c4e;
  border-bottom: 1px dashed rgba(107, 92, 78, 0.25);
}
.appointment-details strong {
  color: var(--color-dark);
  text-align: right;
}

/* MODAL BUTTONS */
.primary-btn, .secondary-btn{
  cursor: pointer;
  padding: 10px 24px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.primary-btn {
  background: var(--color-submit-btn);
  color: var(--color-light);
  transition: background 0.2s ease, transform 0.2s ease;
}
.primary-btn:hover {
  background: var(--color-submit-btn-hover);
  transform: scale(1.03);
}
.secondary-btn {
  background: transparent;
  color: var(--color-dark);
  border: 1px solid var(--color-dark);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.secondary-btn:hover {
  background: var(--color-dark);
  color: var(--color-light);
  transform: scale(1.03);
}
@media (max-width: 480px) {
  .modal-container {
    padding: 24px 20px;
  }
  .modal-title {
    font-size: 1.3rem;
  }
  .actions {
    flex-direction: column-reverse;
  }
  .primary-btn, .secondary-btn {
    width: 100%;
    text-align: center;
  }
}

/* SUCCESS MODAL (restyle) — centered scheme with green accent */
.modal-success {
  text-align: center;
}
.modal-success .modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 16px;
  color: #2f855a;
  background: rgba(47, 133, 90, 0.12);
  border-radius: 50%;
}
.modal-success .modal-title {
  color: #2f855a;
}
.modal-success .modal-message {
  margin-bottom: 24px;
}
.modal-success .actions {
  justify-content: center;
}

/* FAILURE MODAL — reuses .modal-overlay / .modal-container */
.modal-fail {
  text-align: center;
}
.modal-fail .modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 16px;
  color: #b3402e;
  background: rgba(179, 64, 46, 0.12);
  border-radius: 50%;
}
.modal-fail .modal-title {
  color: #b3402e;
}
.modal-fail .modal-message {
  margin-bottom: 24px;
}
.modal-fail .actions {
  justify-content: center;
}