/* Shared dialogs and modal forms. */
.holiday-panel { width: min(100%, 500px); }

#holiday-modal .appointment-modal__panel { overflow: visible; }

.holiday-form { display: flex; flex-direction: column; gap: 15px; padding: 20px 24px 24px; }

.holiday-field { display: flex; flex-direction: column; gap: 6px; color: #4b5563; font-size: .75rem; font-weight: 600; }

.holiday-field select, .holiday-field input { width: 100%; min-height: 40px; box-sizing: border-box; padding: 0 11px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #1f2937; font-size: .82rem; outline: none; }

.holiday-field select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, #6366f1 50%), linear-gradient(135deg, #6366f1 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; }

.holiday-field select:focus, .holiday-field input:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

.holiday-form__dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.holiday-form__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

.holiday-form__footer p { margin: 0; color: #6b7280; font-size: .72rem; }

.holiday-form__actions { display: flex; align-items: center; gap: 8px; }

.holiday-form__actions .services-primary-button { min-height: 36px; }

.holiday-form__actions .services-primary-button.is-demo-confirmed { background: #059669; }

@media (max-width: 720px) {
  .holiday-form { padding-left: 18px; padding-right: 18px; }
}

.manual-block-panel { width: min(100%, 420px); }

.manual-block-form { padding: 20px 24px 24px; }

.manual-block-form__status { margin: 0; color: #475569; font-size: .88rem; font-weight: 700; }

.manual-block-form__time { margin: 6px 0 19px; color: #64748b; font-size: .78rem; }

.manual-block-form label { display: flex; flex-direction: column; gap: 6px; margin-top: 13px; color: #4b5563; font-size: .75rem; font-weight: 600; }

.manual-block-form label em { color: #9ca3af; font-size: .68rem; font-style: normal; font-weight: 500; }

.manual-block-form input { width: 100%; box-sizing: border-box; min-height: 40px; padding: 0 34px 0 11px; border: 1px solid #d1d5db; border-radius: 8px; color: #1f2937; font-size: .82rem; outline: none; }

.manual-block-form input:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.13); }

.manual-block-customer { position: relative; display: block; }

.manual-block-service { position: relative; display: block; }

.manual-block-input-clear { position: absolute; top: 50%; right: 8px; z-index: 2; display: grid; width: 22px; height: 22px; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #9ca3af; font-size: 1rem; line-height: 1; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(-50%); }

.manual-block-customer input:focus + .manual-block-input-clear, .manual-block-service input:focus + .manual-block-input-clear, .manual-block-customer:hover .manual-block-input-clear, .manual-block-service:hover .manual-block-input-clear, .manual-block-input-clear:hover { opacity: 1; pointer-events: auto; }

.manual-block-input-clear:hover { background: #f3f4f6; color: #374151; }

.manual-block-form__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

.manual-block-form__footer .service-secondary-button { color: #b91c1c; }

.new-booking-panel { width: min(100%, 560px); max-width: 560px !important; }

#new-booking-modal { overflow-y: auto; }

#new-booking-modal .new-booking-panel { overflow: visible; }

.new-booking-form { padding: 20px 24px 24px; }

.new-booking-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 14px; }

.new-booking-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }

.new-booking-field--wide { grid-column: 1 / -1; }

.new-booking-field > span:first-child { color: #4b5563; font-size: 0.75rem; font-weight: 600; }

.new-booking-field input,
.new-booking-field select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #1f2937; font-size: 0.82rem; outline: none; }

.new-booking-field input::placeholder { color: #9ca3af; }

.new-booking-customer { position: relative; display: block; }

.customer-suggestions { position: absolute; top: calc(100% + 5px); right: 0; left: 0; z-index: 55; overflow: hidden; padding: 5px; border: 1px solid #e0e7ff; border-radius: 9px; background: white; box-shadow: 0 12px 25px rgba(15,23,42,0.14); }

.customer-suggestions[hidden] { display: none; }

.customer-suggestions button { display: flex; width: 100%; flex-direction: column; gap: 2px; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: #1f2937; text-align: left; cursor: pointer; }

.customer-suggestions button:hover { background: #eef2ff; }

.customer-suggestions strong { font-size: 0.82rem; font-weight: 600; }

.customer-suggestions small { color: #6b7280; font-size: 0.72rem; }

.new-booking-field input:focus,
.new-booking-field select:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,0.13); }

.new-booking-select, .new-booking-date { position: relative; display: block; }

.new-booking-select__button, .new-booking-date__button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid #d1d5db; border-radius: 8px; background: white; color: #1f2937; font-size: 0.82rem; text-align: left; cursor: pointer; }

.new-booking-select__button:hover, .new-booking-date__button:hover { border-color: #a5b4fc; background: #fafaff; }

.new-booking-select__button[aria-expanded="true"], .new-booking-date__button[aria-expanded="true"] { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,0.13); }

.new-booking-select__chevron { color: #6366f1; font-size: 1rem; }

.new-booking-select__menu { position: absolute; top: calc(100% + 5px); right: 0; left: 0; z-index: 50; max-height: 210px; overflow-y: auto; padding: 5px; border: 1px solid #e0e7ff; border-radius: 9px; background: #fff; box-shadow: 0 12px 25px rgba(15,23,42,0.14); }

.new-booking-select__menu[hidden], .new-booking-date__popover[hidden] { display: none; }

.new-booking-select__menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: #374151; font-size: 0.8rem; text-align: left; cursor: pointer; }

.new-booking-select__menu button:hover { background: #eef2ff; color: #312e81; }

.new-booking-select[data-multi="true"] .new-booking-select__menu button { display: flex; align-items: center; gap: 8px; }

.select-check { width: 14px; height: 14px; border: 1px solid #c7d2fe; border-radius: 4px; background: white; }

.new-booking-select[data-multi="true"] .is-selected .select-check { border-color: #4f46e5; background: #4f46e5; box-shadow: inset 0 0 0 3px white; }

.new-booking-date__popover { position: absolute; top: calc(100% + 5px); right: 0; left: 0; z-index: 50; min-width: 280px; padding: 13px; border: 1px solid #e0e7ff; border-radius: 12px; background: #fff; box-shadow: 0 14px 30px rgba(15,23,42,0.16); }

.new-booking-date__header, .new-booking-date__weekdays, .new-booking-date__days { display: grid; grid-template-columns: repeat(7, 1fr); align-items: center; gap: 3px; }

.new-booking-date__header { grid-template-columns: 32px 1fr 32px; margin-bottom: 10px; text-align: center; }

.new-booking-date__header button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: #f5f3ff; color: #4338ca; font-size: 1.2rem; cursor: pointer; }

.new-booking-date__header button:hover { background: #e0e7ff; }

.new-booking-date__header strong { color: #1f2937; font-size: 0.82rem; text-transform: capitalize; }

.new-booking-date__weekdays { margin-bottom: 4px; color: #9ca3af; font-size: 0.68rem; font-weight: 600; text-align: center; }

.new-booking-date__days button { height: 31px; border: 0; border-radius: 7px; background: transparent; color: #374151; font-size: 0.78rem; cursor: pointer; }

.new-booking-date__days button:hover { background: #eef2ff; color: #312e81; }

.new-booking-date__days button.is-selected { background: #4f46e5; color: white; font-weight: 600; }

.new-booking-date__time { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #eef2ff; color: #6b7280; font-size: 0.75rem; font-weight: 600; }

.new-booking-date__time select { flex: 1; min-height: 34px; padding: 0 9px; border: 1px solid #d1d5db; border-radius: 7px; background: #fff; color: #1f2937; font-size: 0.8rem; }

.new-booking-field select { appearance: none; padding-right: 30px; cursor: pointer; }

.new-booking-form__footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

.new-booking-form__footer p { min-width: 0; margin: 0; color: #6b7280; font-size: 0.72rem; white-space: nowrap; }

.new-booking-submit { position: relative; flex: 0 0 auto; min-height: 44px; padding: 0 19px; border: 0; border-radius: 9px; background: #4f46e5; color: #fff; font-size: 0.9rem; font-weight: 600; white-space: nowrap; cursor: pointer; }

.new-booking-submit:hover { background: #4338ca; }

.new-booking-submit:focus-visible { outline: 3px solid rgba(79,70,229,0.25); outline-offset: 2px; }

.new-booking-submit::after { position: absolute; right: 0; bottom: calc(100% + 8px); display: none; padding: 6px 9px; border-radius: 6px; background: #111827; color: white; content: attr(data-tooltip); font-size: 0.7rem; font-weight: 500; line-height: 1; white-space: nowrap; }

.new-booking-submit:hover::after { display: block; }

.new-booking-form.is-preview-submitted .new-booking-submit { background: #6366f1; }

body.modal-open { overflow: hidden; }

.drag-demo-modal .appointment-modal__panel { max-width: 400px; }

.drag-demo-modal .appointment-modal__backdrop {
  background: rgba(17, 24, 39, 0.22);
  backdrop-filter: none;
}

.drag-demo-modal .appointment-modal__body p {
  margin: 0;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.6;
}

.drag-demo-modal .appointment-modal__footer { justify-content: flex-end; }

.drag-demo-modal__close {
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.drag-demo-modal__close:hover { background: #374151; }

.drag-demo-modal__close:focus-visible { outline: 2px solid #374151; outline-offset: 3px; }

.appointment-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.appointment-modal.hidden { display: none; }

.appointment-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(2px);
}

.appointment-modal__panel {
  position: relative;
  width: min(100%, 460px);
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: white;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
}

#appointment-modal .appointment-modal__panel,
#manual-block-modal .appointment-modal__panel { width: min(100%, 506px); }

#appointment-modal .appointment-modal__panel { display: flex; min-height: min(610px, calc(100dvh - 32px)); flex-direction: column; }

#appointment-modal .appointment-modal__body { flex: 1; }

.appointment-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.appointment-modal__eyebrow {
  margin: 0 0 4px;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.appointment-modal__title {
  margin: 0;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.appointment-modal__phone { display: inline-block; margin-top: 7px; color: #4f46e5; font-size: 0.82rem; font-weight: 600; text-decoration: none; }

.appointment-modal__phone:hover { text-decoration: underline; }

.appointment-modal__header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }

.appointment-modal__navigation { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; }

.appointment-modal__navigation button { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 999px; background: transparent; color: #475569; cursor: pointer; }

.appointment-modal__navigation button:hover:not(:disabled) { background: #e0e7ff; color: #4338ca; }

.appointment-modal__navigation button:focus-visible { outline: 2px solid #818cf8; outline-offset: 1px; }

.appointment-modal__navigation button:disabled { color: #cbd5e1; cursor: default; }

.appointment-modal__navigation svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.appointment-modal__navigation span { min-width: 34px; color: #64748b; font-size: .68rem; font-weight: 600; text-align: center; }

.appointment-modal__quick-actions { display: flex; gap: 8px; margin: 0; padding: 0 24px 20px; }

.appointment-modal__quick-actions button,
.appointment-modal__actions button { position: relative; min-height: 36px; padding: 0 11px; border: 1px solid #c7d2fe; border-radius: 8px; background: #eef2ff; color: #4338ca; font-size: 0.76rem; font-weight: 600; cursor: pointer; }

.appointment-modal__quick-actions button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }

.appointment-modal__quick-actions button { -webkit-appearance: none; appearance: none; background-clip: padding-box; box-shadow: none; outline: 0; }

.appointment-modal__quick-actions svg { width: 14px; height: 14px; fill: currentColor; }

.appointment-modal__quick-actions button:hover,
.appointment-modal__actions button:hover { border-color: #a5b4fc; background: #e0e7ff; color: #312e81; }

.appointment-modal__quick-actions button.is-whatsapp:hover { border-color: #86efac; background: #dcfce7; color: #166534; }

.appointment-modal__actions button.is-danger:hover { border-color: #fca5a5; background: #fee2e2; color: #b91c1c; }

.appointment-modal__quick-actions button::after,
.appointment-modal__actions button::after { position: absolute; left: 50%; bottom: calc(100% + 7px); z-index: 20; display: none; padding: 5px 8px; border-radius: 6px; background: #111827; color: white; content: attr(data-tooltip); font-size: 0.68rem; font-weight: 500; line-height: 1; white-space: nowrap; transform: translateX(-50%); }

.appointment-modal__quick-actions button:hover::after,
.appointment-modal__actions button:hover::after { display: block; }

.appointment-modal__close {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
}

.appointment-modal__close:hover { background: #f3f4f6; color: #111827; }

.appointment-modal__close:focus-visible { outline: 2px solid #374151; outline-offset: 2px; }

.appointment-modal__body { padding: 20px 24px 24px; }

.appointment-note { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }

.appointment-note > span:first-child { color: #6b7280; font-size: .78rem; font-weight: 600; }

.appointment-note__field { position: relative; display: block; }

.appointment-note textarea { display: block; width: 100%; min-height: 76px; resize: vertical; padding: 10px 12px 25px; border: 1px solid #dbe2ea; border-radius: 9px; background: #f8fafc; color: #1f2937; font-size: .82rem; line-height: 1.4; outline: none; }

.appointment-note textarea::placeholder { color: #9ca3af; }

.appointment-note textarea:focus { border-color: #818cf8; background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

.appointment-note__field small { position: absolute; right: 10px; bottom: 7px; color: #16a34a; font-size: .68rem; font-weight: 600; pointer-events: none; }

.appointment-note__field small.is-saving { color: #64748b; }

.appointment-details { margin: 0; }

.appointment-details__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.appointment-details__row:last-child { border-bottom: 0; }

.appointment-details__row--selection-end { margin-bottom: 8px; border-bottom-color: #dfe3ea; }

.appointment-details__row[hidden] { display: none; }

.appointment-details dt { color: #6b7280; font-size: 0.82rem; }

.appointment-details dd { margin: 0; color: #1f2937; font-size: 0.9rem; font-weight: 600; }

.appointment-details a { color: #2563eb; text-decoration: none; }

.appointment-details a:hover { text-decoration: underline; }

.appointment-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.appointment-modal__footer p { margin: 0; color: #6b7280; font-size: 0.72rem; }

.appointment-modal__actions { display: flex; gap: 8px; }

.appointment-modal__actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .appointment-modal__header,
    .appointment-modal__body { padding-left: 18px; padding-right: 18px; }
  .appointment-modal__footer { align-items: stretch; flex-direction: column; padding: 14px 18px; }
  .appointment-modal__actions button { flex: 1; }
}

.appointment-modal__panel { max-height: calc(100dvh - 32px); overflow-y: auto; }

#appointment-modal .appointment-modal__panel { overflow: visible; }

#manual-block-modal .appointment-modal__panel { overflow: visible; }

.appointment-details dd { overflow-wrap: anywhere; }

@media (max-width: 639px) {
  .new-booking-form { padding: 18px; }
  .new-booking-form__grid { grid-template-columns: 1fr; }
  .new-booking-field--wide { grid-column: auto; }
  .new-booking-form__footer { display: flex; align-items: stretch; flex-direction: column; }
  .new-booking-submit { width: 100%; }
}
