/* ══════════════════════════════════════════════════════
   APH Booking — Frontend Styles
   Base CSS custom properties — overridden at runtime by
   the #aph-booking-appearance <style> tag from PHP.
   ══════════════════════════════════════════════════════ */

:root,
.aph-booking-wrap,
.aph-portal,
.aph-booking-modal,
.aph-portal-login-gate {
    --aph-brand: #002B45;
    --aph-accent: #d4af37;
    --aph-accent-light: #d4af3733;
    --aph-text: #333;
    --aph-muted: #999;
    --aph-bg: #fff;
    --aph-bg-alt: #f8f9fa;
    --aph-cream: #f5f1ea;
    --aph-cream-dark: #e8e2d8;
    --aph-border: #e8e8e8;
    --aph-error: #dc3545;
    --aph-success: #28a745;
    --aph-radius: 10px;
    --aph-btn-radius: 10px;
    --aph-btn-bg: #002B45;
    --aph-btn-border: none;
    --aph-btn-color: #ffffff;
    --aph-btn-hover-bg: #001a2e;
    --aph-btn-hover-color: #ffffff;
    --aph-modal-width: 560px;
    --aph-shadow: 0 4px 20px rgba(0,43,69,0.1);
    --aph-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --aph-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ─── Booking Wrap ────────────────────────────────── */

.aph-booking-wrap {
    font-family: var(--aph-font);
    color: var(--aph-text);
    max-width: 520px;
    margin: 0 auto;
    background: var(--aph-bg);
    border-radius: var(--aph-radius);
    border: 1px solid var(--aph-border);
    overflow: hidden;
}

.aph-booking-wrap[data-style="full"] {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.aph-booking-header {
    text-align: center;
    padding: 28px 24px 16px;
}

.aph-booking-title {
    font-family: var(--aph-serif);
    color: var(--aph-brand);
    font-size: 24px;
    margin: 0 0 6px;
    font-weight: 700;
}

.aph-booking-subtitle {
    color: var(--aph-muted);
    font-size: 14px;
    margin: 0;
}

/* ─── Service Bar ─────────────────────────────────── */

.aph-booking-service-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--aph-bg-alt);
    border-bottom: 1px solid var(--aph-border);
}

.aph-booking-service-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aph-booking-service-icon {
    width: 22px;
    height: 22px;
    color: var(--aph-brand);
    flex: 0 0 auto;
}

.aph-booking-service-icon svg,
.aph-bundle-badge-icon svg,
.aph-modal-close svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.aph-booking-service-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--aph-brand);
}

.aph-booking-service-meta {
    display: block;
    font-size: 12px;
    color: var(--aph-muted);
}

.aph-booking-tz {
    font-size: 11px;
    color: var(--aph-muted);
    background: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--aph-border);
}

.aph-booking-timezone-stack {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.aph-booking-local-tz {
    font-size: 11px;
    color: #6f584a;
}

/* ─── Calendar ────────────────────────────────────── */

.aph-booking-calendar {
    padding: 16px 20px;
}

.aph-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.aph-cal-month-label {
    font-weight: 700;
    font-size: 16px;
    color: var(--aph-brand);
    font-family: var(--aph-serif);
}

.aph-cal-prev,
.aph-cal-next {
    background: none;
    border: 1px solid var(--aph-border);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--aph-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.aph-cal-prev:hover,
.aph-cal-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 49, 36, 0.14);
}

.aph-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.aph-cal-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--aph-muted);
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aph-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.aph-cal-loading,
.aph-cal-empty-month {
    grid-column: 1 / -1;
    padding: 18px 8px;
    text-align: center;
    color: var(--aph-muted);
    font-size: 13px;
}

.aph-cal-day-hidden {
    visibility: hidden;
    pointer-events: none;
}

.aph-cal-day {
    text-align: center;
    padding: 10px 4px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    color: var(--aph-text);
    font-weight: 500;
}

.aph-cal-day:hover:not(.disabled):not(.empty) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 49, 36, 0.12);
}

.aph-cal-day.today {
    border: 2px solid var(--aph-accent);
    font-weight: 700;
}

.aph-cal-day.selected {
    background: var(--aph-brand) !important;
    color: #fff !important;
    font-weight: 700;
}

.aph-cal-day.available {
    color: var(--aph-brand);
    font-weight: 600;
}

.aph-cal-day.available::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--aph-accent);
    border-radius: 50%;
    margin: 2px auto 0;
}

.aph-cal-day.disabled {
    color: #ddd;
    cursor: not-allowed;
}

.aph-cal-day.empty {
    cursor: default;
}

/* ─── Time Slots ──────────────────────────────────── */

.aph-booking-slots {
    padding: 16px 20px;
    border-top: 1px solid var(--aph-border);
    animation: aphSlideDown 0.25s ease;
}

@keyframes aphSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aph-slots-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--aph-brand);
    margin: 0 0 12px;
}

.aph-slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.aph-slot-btn {
    padding: 12px;
    border: 1px solid var(--aph-border);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--aph-brand);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    font-family: var(--aph-font);
}

.aph-slot-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(74, 49, 36, 0.12);
}

.aph-slot-btn.selected {
    background: var(--aph-brand);
    color: #fff;
    border-color: var(--aph-brand);
}

.aph-slots-empty {
    text-align: center;
    padding: 24px;
    color: var(--aph-muted);
    font-size: 14px;
}

.aph-slots-loading {
    text-align: center;
    padding: 20px;
    color: var(--aph-muted);
    font-size: 13px;
}

/* ─── Confirmation Panel ─────────────────────────── */

.aph-booking-confirm {
    padding: 20px;
    border-top: 1px solid var(--aph-border);
    animation: aphSlideDown 0.25s ease;
}

.aph-form-section {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.aph-form-section-head {
    display: grid;
    gap: 4px;
}

.aph-form-section-title {
    margin: 0;
    font-size: 16px;
    color: var(--aph-brand);
}

.aph-form-section-copy {
    margin: 0;
    font-size: 13px;
    color: #6f584a;
    line-height: 1.5;
}

.aph-form-subsection {
    display: grid;
    gap: 14px;
    grid-column: 1 / -1;
}

.aph-form-subsection-title {
    margin: 0;
    font-size: 14px;
    color: var(--aph-brand);
}

.aph-confirm-details {
    background: var(--aph-bg-alt);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid var(--aph-accent);
}

.aph-confirm-date {
    font-weight: 700;
    font-size: 15px;
    color: var(--aph-brand);
}

.aph-confirm-time {
    font-size: 14px;
    color: var(--aph-text);
    margin-top: 4px;
}

.aph-confirm-price {
    font-size: 13px;
    color: var(--aph-muted);
    margin-top: 4px;
}

.aph-confirm-guest-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.aph-confirm-guest-fields input,
#aph-booking-notes {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--aph-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--aph-font);
    color: var(--aph-text);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.aph-confirm-guest-fields input:focus,
#aph-booking-notes:focus {
    outline: none;
    border-color: var(--aph-brand);
}

#aph-booking-notes {
    margin-bottom: 12px;
    resize: vertical;
    min-height: 60px;
}

.aph-booking-submit {
    width: 100%;
    padding: 16px;
    background: var(--aph-brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--aph-font);
}

.aph-modal-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aph-booking-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(74, 49, 36, 0.18);
}

.aph-booking-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.aph-booking-note-text {
    font-size: 12px;
    color: var(--aph-muted);
    margin: 12px 0 0;
    text-align: center;
    line-height: 1.5;
}

/* ─── Status Messages ─────────────────────────────── */

.aph-booking-message {
    padding: 16px 20px;
    text-align: center;
    font-size: 14px;
    animation: aphSlideDown 0.25s ease;
}

.aph-booking-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-top: 1px solid #c8e6c9;
}

.aph-booking-message.error {
    background: #fce4ec;
    color: #c62828;
    border-top: 1px solid #f8bbd0;
}

/* ─── Modal ───────────────────────────────────────── */

.aph-booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2147483000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: aphFadeIn 0.2s ease;
}

@keyframes aphFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.aph-booking-modal-inner {
    background: #fff;
    border-radius: 14px;
    max-width: 540px;
    width: 95%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    z-index: 2147483001;
    animation: aphModalIn 0.3s ease;
}

.aph-booking-modal--product {
    justify-content: flex-end;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.45);
}

.aph-booking-modal--product .aph-booking-modal-inner {
    width: min(980px, 100vw);
    max-width: 980px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin-left: auto;
    overflow: auto;
    animation: aphSlideInRight 0.25s ease;
}

@keyframes aphSlideInRight {
    from { opacity: 0; transform: translateX(56px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes aphModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.aph-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.aph-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

/* ─── Trigger Button ──────────────────────────────── */

.aph-booking-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--aph-brand);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--aph-font);
}

.aph-booking-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(74, 49, 36, 0.2);
}

.aph-booking-trigger--product {
    width: auto;
    min-width: min(280px, 100%);
    justify-content: center;
    font-size: 16px;
    padding: 15px 28px;
    border-radius: 12px;
    background: #ad8b2f !important;
    color: #fff !important;
    border: 1px solid #ad8b2f !important;
    box-shadow: none !important;
    text-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

.aph-booking-trigger--product:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(61, 40, 28, 0.2) !important;
}

.aph-booking-product-cta {
    margin-top: 16px;
    display: grid;
    justify-items: start;
    gap: 10px;
}

.aph-booking-product-helper {
    margin: 0;
    max-width: 36rem;
    font-size: 12px;
    color: var(--aph-muted);
    line-height: 1.5;
}

/* ─── My Appointments Dashboard ───────────────────── */

.aph-my-appts {
    font-family: var(--aph-font);
    max-width: 820px;
    margin: 0 auto;
}

.aph-my-appts-header {
    margin-bottom: 28px;
}

.aph-my-appts-title {
    font-family: var(--aph-serif);
    color: var(--aph-brand);
    font-size: 28px;
    margin: 0 0 6px;
    font-weight: 700;
}

.aph-my-appts-sub {
    color: var(--aph-muted);
    font-size: 14px;
    margin: 0;
}

/* Toast */
.aph-my-appts-toast {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}
.aph-my-appts-toast.success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.aph-my-appts-toast.error   { background: #fce4ec; color: #c62828; border-left: 4px solid #ef5350; }
.aph-my-appts-toast.info    { background: #e3f2fd; color: #1565c0; border-left: 4px solid #42a5f5; }

/* Empty state */
.aph-my-appts-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--aph-muted);
    background: var(--aph-bg-alt);
    border-radius: 12px;
}
.aph-my-appts-empty svg {
    opacity: 0.35;
    margin-bottom: 12px;
}
.aph-my-appts-empty p {
    font-size: 16px;
    margin: 0 0 16px;
}

/* Login gate */
.aph-appt-login-gate {
    text-align: center;
    padding: 32px;
    color: var(--aph-muted);
    background: var(--aph-bg-alt);
    border-radius: 12px;
}
.aph-appt-login-gate a { color: var(--aph-brand); font-weight: 700; }

/* Section */
.aph-my-appts-section {
    margin-bottom: 36px;
}
.aph-my-appts-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--aph-muted);
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--aph-border);
}

/* Cards */
.aph-appt-cards { display: flex; flex-direction: column; gap: 12px; }

.aph-appt-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(74,49,36,0.07);
    border-left: 4px solid var(--aph-accent);
    transition: box-shadow 0.15s, transform 0.15s;
}
.aph-appt-card:hover { box-shadow: 0 6px 22px rgba(74,49,36,0.13); transform: translateY(-1px); }
.aph-appt-card--past { opacity: 0.68; border-left-color: var(--aph-border); }
.aph-appt-card--past:hover { opacity: 0.85; }

/* Date column */
.aph-appt-datecol {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    text-align: center;
    padding-top: 2px;
}
.aph-appt-day {
    font-size: 26px;
    font-weight: 800;
    color: var(--aph-brand);
    line-height: 1;
}
.aph-appt-mon {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--aph-muted);
    font-weight: 700;
    margin-top: 1px;
}
.aph-appt-yr {
    font-size: 10px;
    color: var(--aph-muted);
    margin-top: 1px;
}

/* Body */
.aph-appt-body { flex: 1; min-width: 0; }

.aph-appt-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.aph-appt-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--aph-brand);
}
.aph-appt-time {
    font-size: 13px;
    color: var(--aph-muted);
}

/* "Soon" badge */
.aph-appt-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.aph-appt-badge--soon { background: #fff3e0; color: #e65100; }

/* Status row */
.aph-appt-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.aph-appt-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.aph-appt-status--confirmed { background: #e8f5e9; color: #2e7d32; }
.aph-appt-status--pending   { background: #fff3e0; color: #e65100; }
.aph-appt-status--completed { background: #e3f2fd; color: #1565c0; }
.aph-appt-status--cancelled { background: #fce4ec; color: #c62828; }

/* Payment badge */
.aph-pay-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.aph-pay-badge--paid    { background: #e8f5e9; color: #2e7d32; }
.aph-pay-badge--deposit { background: #e3f2fd; color: #1565c0; }
.aph-pay-badge--pending { background: #fff8e1; color: #f57f17; }

.aph-pay-detail {
    font-size: 12px;
    color: var(--aph-muted);
}

/* Action buttons */
.aph-appt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.aph-appt-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.15s;
    line-height: 1.4;
    font-family: var(--aph-font);
}
.aph-appt-btn--primary {
    background: var(--aph-brand);
    color: #fff;
}
.aph-appt-btn--primary:hover { background: #7a5535; color: #fff; transform: translateY(-1px); }
.aph-appt-btn--pay {
    background: #1976d2;
    color: #fff;
}
.aph-appt-btn--pay:hover { background: #1256a0; color: #fff; }
.aph-appt-btn--zoom {
    background: #2d8cff;
    color: #fff;
}
.aph-appt-btn--zoom:hover { background: #1a6bcf; color: #fff; }
.aph-appt-btn--reschedule {
    background: #fff;
    color: var(--aph-brand);
    border: 2px solid var(--aph-brand);
}
.aph-appt-btn--reschedule:hover { background: var(--aph-brand); color: #fff; }
.aph-appt-btn--cancel {
    background: transparent;
    color: #c62828;
    border: 2px solid #e57373;
}
.aph-appt-btn--cancel:hover { background: #fce4ec; }
.aph-appt-btn--ghost {
    background: transparent;
    color: var(--aph-muted);
    border: 1px solid var(--aph-border);
    cursor: pointer;
}
.aph-appt-btn--ghost:hover { background: var(--aph-bg-alt); color: var(--aph-brand); }

/* ─── Reschedule modal ─────────────────────────────── */
.aph-my-appts-overlay {
    position: fixed; inset: 0;
    background: rgba(30,20,14,0.55);
    z-index: 9998;
    backdrop-filter: blur(2px);
}
.aph-my-appts-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(30,20,14,0.28);
    z-index: 9999;
    width: min(92vw, 540px);
    max-height: 88vh;
    overflow-y: auto;
    padding: 32px 28px 28px;
}
.aph-my-appts-modal-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none; border: none;
    font-size: 24px; cursor: pointer;
    color: var(--aph-muted);
    line-height: 1;
    padding: 4px;
}
.aph-my-appts-modal-close:hover { color: var(--aph-brand); }
.aph-my-appts-modal-title {
    font-family: var(--aph-serif);
    font-size: 20px;
    color: var(--aph-brand);
    margin: 0 0 4px;
}
.aph-my-appts-modal-service {
    font-weight: 700;
    color: var(--aph-brand);
    font-size: 15px;
    margin: 0 0 4px;
}
.aph-my-appts-modal-hint {
    font-size: 13px;
    color: var(--aph-muted);
    margin: 0 0 20px;
}

/* Reschedule inline calendar */
.aph-reschedule-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.aph-rcal-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--aph-brand);
}
.aph-rcal-prev, .aph-rcal-next {
    background: none; border: 1px solid var(--aph-border);
    color: var(--aph-brand); cursor: pointer;
    border-radius: 6px; padding: 5px 12px; font-size: 18px;
    line-height: 1;
}
.aph-rcal-prev:hover, .aph-rcal-next:hover { background: var(--aph-bg-alt); }

.aph-reschedule-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.aph-rcal-wkday {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--aph-muted);
    text-transform: uppercase;
    padding: 4px 0;
}

.aph-reschedule-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.aph-rcal-cell {
    text-align: center;
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--aph-brand);
    transition: background 0.1s;
}
.aph-rcal-cell:hover:not(.disabled):not(.empty) { background: var(--aph-bg-alt); }
.aph-rcal-cell.selected { background: var(--aph-brand); color: #fff; font-weight: 700; }
.aph-rcal-cell.today    { font-weight: 700; color: var(--aph-accent); }
.aph-rcal-cell.disabled { color: #ccc; cursor: not-allowed; }
.aph-rcal-cell.empty    { cursor: default; }
.aph-rcal-cell.loading  { color: #ccc; cursor: wait; }

/* Slot picker */
.aph-reschedule-slots-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--aph-brand);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.aph-reschedule-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.aph-rslot-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: 2px solid var(--aph-border);
    background: #fff;
    color: var(--aph-brand);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--aph-font);
}
.aph-rslot-btn:hover   { border-color: var(--aph-brand); background: var(--aph-bg-alt); }
.aph-rslot-btn.selected { border-color: var(--aph-brand); background: var(--aph-brand); color: #fff; }

/* Confirm step */
.aph-reschedule-summary {
    background: var(--aph-bg-alt);
    border-left: 4px solid var(--aph-accent);
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--aph-brand);
    font-weight: 600;
    margin-bottom: 16px;
}
.aph-reschedule-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* The old minimal classes — kept in case referenced elsewhere */
.aph-no-appointments {
    text-align: center;
    padding: 24px;
    color: var(--aph-muted);
    background: var(--aph-bg-alt);
    border-radius: 10px;
}
.aph-booking-login-prompt {
    text-align: center; padding: 20px; color: var(--aph-muted);
}
.aph-booking-login-prompt a { color: var(--aph-brand); font-weight: 700; }

@media (max-width: 560px) {
    .aph-appt-card { flex-direction: column; gap: 10px; }
    .aph-appt-datecol { flex-direction: row; gap: 6px; align-items: baseline; min-width: auto; }
    .aph-appt-day { font-size: 20px; }
    .aph-my-appts-modal { padding: 24px 16px 20px; }
}

/* ─── Service Type Selection (multi-service mode) ── */

.aph-service-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.aph-service-option {
    position: relative;
}

.aph-service-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.aph-service-card {
    background: var(--aph-cream);
    border: 2px solid transparent;
    border-radius: var(--aph-radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 0;
}

.aph-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(74, 49, 36, 0.12);
}

.aph-service-option input[type="radio"]:checked + .aph-service-card {
    background: var(--aph-bg);
    border-color: var(--aph-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.aph-service-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--aph-brand), #003d5c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.aph-service-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--aph-accent);
    fill: none;
    stroke-width: 2;
}

.aph-service-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--aph-brand);
    margin-bottom: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.aph-service-desc {
    font-size: 12px;
    color: var(--aph-muted);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ─── Progress Stepper ────────────────────────────── */

.aph-booking-progress {
    background: var(--aph-cream);
    padding: 24px 40px;
    border-bottom: 1px solid var(--aph-cream-dark);
}

.aph-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.aph-progress-steps::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 32px;
    right: 32px;
    height: 2px;
    background: var(--aph-border);
}

.aph-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.aph-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--aph-bg);
    border: 2px solid var(--aph-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--aph-muted);
    transition: all 0.3s ease;
}

.aph-progress-step.active .aph-step-number {
    background: var(--aph-brand);
    border-color: var(--aph-brand);
    color: #fff;
}

.aph-progress-step.completed .aph-step-number {
    background: var(--aph-accent);
    border-color: var(--aph-accent);
    color: var(--aph-brand);
}

.aph-step-label {
    font-size: 12px;
    color: var(--aph-muted);
    margin-top: 8px;
    text-align: center;
}

.aph-progress-step.active .aph-step-label {
    color: var(--aph-brand);
    font-weight: 600;
}

/* ─── Summary Card (review before confirm) ────────── */

.aph-booking-summary {
    background: var(--aph-cream);
    border-radius: var(--aph-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.aph-service-context-fields {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.aph-prospect-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.aph-prospect-fields--personal,
.aph-prospect-fields--company {
    margin-bottom: 0;
}

.aph-field-row {
    display: grid;
    gap: 6px;
}

.aph-field-row--half {
    min-width: 0;
}

.aph-field-row--full {
    grid-column: 1 / -1;
}

.aph-field-row--toggle {
    padding-top: 4px;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.aph-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--aph-brand);
}

.aph-checkbox-field {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--aph-brand);
    cursor: pointer;
}

.aph-checkbox-field span {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    line-height: 1.35;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    writing-mode: horizontal-tb;
}

.aph-checkbox-field input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    align-self: flex-start;
    margin-top: 1px;
}

label.aph-checkbox-field[for="aph-has-guest"],
label.aph-checkbox-field[for="aph-guest-same-company"] {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: start !important;
    justify-content: start !important;
    column-gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
}

label.aph-checkbox-field[for="aph-has-guest"] > input,
label.aph-checkbox-field[for="aph-guest-same-company"] > input {
    width: 18px !important;
    height: 18px !important;
    margin: 2px 0 0 !important;
    align-self: start !important;
    justify-self: start !important;
}

label.aph-checkbox-field[for="aph-has-guest"] > span,
label.aph-checkbox-field[for="aph-guest-same-company"] > span {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: left !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

.aph-guest-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--aph-cream-dark);
    border-radius: var(--aph-radius);
    background: color-mix(in srgb, var(--aph-cream) 74%, white);
}

.aph-service-context-fields select {
    width: 100%;
    border: 1px solid var(--aph-border);
    border-radius: var(--aph-radius);
    padding: 12px 14px;
    font: inherit;
    color: var(--aph-text);
    background: var(--aph-bg);
}

.aph-service-context-fields input,
.aph-service-context-fields textarea,
.aph-prospect-fields input {
    width: 100%;
    border: 1px solid var(--aph-border);
    border-radius: var(--aph-radius);
    padding: 12px 14px;
    font: inherit;
    color: var(--aph-text);
    background: var(--aph-bg);
}

.aph-service-context-fields input:focus,
.aph-service-context-fields textarea:focus,
.aph-prospect-fields input:focus {
    outline: none;
    border-color: var(--aph-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--aph-brand) 14%, transparent);
}

.aph-product-booking-note {
    background: color-mix(in srgb, var(--aph-brand) 8%, transparent);
    border-left: 4px solid var(--aph-brand);
    padding: 14px 16px;
    margin: 0 0 20px;
    color: var(--aph-text);
    border-radius: var(--aph-radius);
}

.aph-bundle-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0 0 16px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--aph-accent) 18%, transparent);
    color: var(--aph-brand);
    font-size: 13px;
    font-weight: 600;
}

.aph-bundle-badge-icon {
    width: 16px;
    height: 16px;
    color: var(--aph-brand);
    flex: 0 0 auto;
}

.elementor-add-to-cart.elementor-product-aph_booking:empty {
    display: none;
}

.aph-booking-wrap[data-style="product-modal"] {
    --aph-brand: #4a3124;
    --aph-accent: #f0e5d7;
    --aph-accent-light: #f7efe5;
    max-width: none;
    margin: 0;
    border: none;
    border-radius: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "header"
        "progress"
        "service"
        "format"
        "calendar"
        "slots"
        "confirm"
        "message";
    grid-auto-flow: row;
    min-height: 100%;
}

.aph-booking-wrap[data-style="product-modal"] > * {
    min-width: 0;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-header {
    grid-area: header;
    text-align: left;
    padding: 18px 28px 6px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-service-bar {
    grid-area: service;
    padding: 14px 28px;
    align-items: flex-start;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-progress {
    grid-area: progress;
    border-bottom: 1px solid var(--aph-border);
    background: linear-gradient(180deg, #f7f1e8 0%, #efe5d8 100%);
    padding: 16px 28px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-progress-steps {
    justify-content: space-between;
    gap: 12px;
    align-items: stretch;
}

.aph-booking-wrap[data-style="product-modal"] .aph-progress-steps::before {
    top: 18px;
    left: 48px;
    right: 48px;
    bottom: auto;
    width: auto;
    height: 2px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-progress-step {
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: auto;
}

.aph-booking-wrap[data-style="product-modal"] .aph-step-number {
    width: 34px;
    height: 34px;
    background: #fffaf4;
    border: 2px solid rgba(74, 49, 36, 0.16);
    color: #8a6f5f;
}

.aph-booking-wrap[data-style="product-modal"] .aph-progress-step.active .aph-step-number {
    background: var(--aph-brand);
    border-color: var(--aph-brand);
    color: #fff;
}

.aph-booking-wrap[data-style="product-modal"] .aph-progress-step.completed .aph-step-number {
    background: var(--aph-accent);
    border-color: var(--aph-accent);
    color: var(--aph-brand);
}

.aph-booking-wrap[data-style="product-modal"] .aph-step-label {
    margin-top: 8px;
    text-align: center;
    color: #6f584a;
}

.aph-booking-wrap[data-style="product-modal"] .aph-progress-step.active .aph-step-label,
.aph-booking-wrap[data-style="product-modal"] .aph-progress-step.completed .aph-step-label {
    color: var(--aph-brand);
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-calendar {
    grid-area: calendar;
    padding: 18px 28px 10px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-special-formats {
    grid-area: format;
    padding: 18px 28px 12px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-special {
    padding: 0 28px 12px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-special--intro {
    grid-area: calendar;
    padding-top: 18px;
    padding-bottom: 2px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-special-options,
.aph-booking-wrap[data-style="product-modal"] .aph-booking-special-bands,
.aph-booking-wrap[data-style="product-modal"] .aph-booking-special-spots {
    grid-area: slots;
}

.aph-special-intro-text,
.aph-special-selected-meta {
    margin: 0 0 16px;
    color: #6f584a;
    font-size: 14px;
}

.aph-special-options-grid,
.aph-special-formats-grid,
.aph-special-bands-grid,
.aph-special-spots-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.aph-special-format-btn,
.aph-special-option-btn,
.aph-special-band-btn,
.aph-special-spot-btn {
    width: 100%;
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(74, 49, 36, 0.14) !important;
    border-radius: 14px;
    background: #fffaf4 !important;
    color: var(--aph-brand) !important;
    padding: 14px 16px;
    text-align: left;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    box-shadow: none !important;
    text-shadow: none !important;
    text-decoration: none !important;
    font: inherit;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.aph-special-card-check {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(74, 49, 36, 0.24);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
}

.aph-special-card-check::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

.aph-special-format-btn.selected,
.aph-special-option-btn.selected,
.aph-special-band-btn.selected,
.aph-special-spot-btn.selected {
    border-color: rgba(74, 49, 36, 0.42) !important;
    background: var(--aph-cream) !important;
    transform: translateY(-1px);
}

.aph-special-format-btn:hover,
.aph-special-option-btn:hover,
.aph-special-band-btn:hover,
.aph-special-spot-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(74, 49, 36, 0.12);
}

.aph-special-format-btn.selected .aph-special-card-check,
.aph-special-option-btn.selected .aph-special-card-check,
.aph-special-band-btn.selected .aph-special-card-check,
.aph-special-spot-btn.selected .aph-special-card-check {
    border-color: var(--aph-brand);
    background: rgba(74, 49, 36, 0.08);
}

.aph-special-format-btn.selected .aph-special-card-check::after,
.aph-special-option-btn.selected .aph-special-card-check::after,
.aph-special-band-btn.selected .aph-special-card-check::after,
.aph-special-spot-btn.selected .aph-special-card-check::after {
    background: var(--aph-brand);
}

.aph-special-format-btn.is-unavailable,
.aph-special-format-btn:disabled {
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

.aph-special-format-btn.is-unavailable:hover,
.aph-special-format-btn:disabled:hover {
    border-color: rgba(74, 49, 36, 0.14) !important;
    background: #fffaf4 !important;
    transform: none;
}

.aph-special-format-btn--in_person.is-unavailable,
.aph-special-format-btn--in_person:disabled {
    background: linear-gradient(180deg, #6d3247 0%, #552134 100%) !important;
    border-color: #6d3247 !important;
}

.aph-special-format-btn--in_person.is-unavailable .aph-special-card-title,
.aph-special-format-btn--in_person:disabled .aph-special-card-title {
    color: #f0d28c !important;
}

.aph-special-format-btn--in_person.is-unavailable .aph-special-card-meta,
.aph-special-format-btn--in_person.is-unavailable .aph-special-card-count,
.aph-special-format-btn--in_person:disabled .aph-special-card-meta,
.aph-special-format-btn--in_person:disabled .aph-special-card-count {
    color: #fff !important;
}

.aph-special-format-btn--in_person.is-unavailable .aph-special-card-check,
.aph-special-format-btn--in_person:disabled .aph-special-card-check {
    border-color: rgba(240, 210, 140, 0.7);
    background: rgba(255, 255, 255, 0.12);
}

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

.aph-payment-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid rgba(74, 49, 36, 0.14);
    border-radius: 14px;
    background: #fffaf4;
    cursor: pointer;
}

.aph-payment-option input {
    margin: 3px 0 0;
}

.aph-payment-option.is-selected {
    border-color: rgba(74, 49, 36, 0.42);
    background: var(--aph-cream);
}

.aph-payment-option-body {
    display: grid;
    gap: 4px;
}

.aph-payment-option-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--aph-brand);
}

.aph-payment-option-meta {
    font-size: 12px;
    line-height: 1.5;
    color: #6f584a;
}

.aph-pay-more-row {
    margin: 4px 0 8px;
    padding: 12px 14px;
    background: var(--aph-bg-alt, #f8f9fa);
    border-radius: 8px;
    border: 1px dashed var(--aph-accent, #d4af37);
}
.aph-pay-more-row .aph-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--aph-brand);
    margin-bottom: 8px;
    display: block;
}
.aph-pay-more-hint {
    font-weight: 400;
    color: #888;
}
.aph-pay-more-fields {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.aph-custom-deposit-input {
    width: 140px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: var(--aph-brand);
}
.aph-pay-more-balance {
    font-size: 12px;
    color: #6f584a;
}

.aph-special-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--aph-brand);
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.aph-special-card-meta {
    font-size: 12px;
    color: #6f584a;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.aph-special-card-count {
    font-size: 12px;
    color: #8a6f5f;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.aph-booking-modal--product .aph-modal-close {
    background: var(--aph-brand) !important;
    border: 1px solid rgba(36, 23, 15, 0.55);
    color: #fff !important;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 0;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.aph-booking-modal--product .aph-modal-close::before {
    content: "\00D7";
    display: block;
    color: #fff !important;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-1px);
}

.aph-booking-modal--product .aph-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.aph-booking-modal--product .aph-modal-close svg {
    display: none !important;
}

.aph-booking-wrap[data-style="product-modal"] .aph-btn-back {
    background: #fffaf4;
    color: var(--aph-brand);
    border-color: var(--aph-cream-dark);
    padding: 12px 18px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-btn-back:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(74, 49, 36, 0.12);
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-calendar .aph-cal-weekdays {
    display: none;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-calendar .aph-cal-days {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-loading,
.aph-booking-wrap[data-style="product-modal"] .aph-cal-empty-month {
    width: 100%;
    text-align: left;
    padding: 10px 0 4px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day {
    min-width: 96px;
    padding: 12px 14px;
    border: 1px solid rgba(74, 49, 36, 0.14);
    border-radius: 999px;
    text-align: left;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fffaf4;
    color: var(--aph-brand);
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day.available::after {
    display: none;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day.today {
    border-color: rgba(74, 49, 36, 0.26);
    box-shadow: 0 0 0 3px rgba(240, 229, 215, 0.85);
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day.selected {
    background: var(--aph-brand) !important;
    color: #fff !important;
    border-color: var(--aph-brand) !important;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day:hover:not(.disabled):not(.empty) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(74, 49, 36, 0.12);
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-slots {
    grid-area: slots;
    padding: 0 28px 12px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-slot-btn {
    border-color: rgba(74, 49, 36, 0.14);
    background: #fffaf4;
    color: var(--aph-brand);
}

.aph-booking-wrap[data-style="product-modal"] .aph-slot-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(74, 49, 36, 0.12);
}

.aph-booking-wrap[data-style="product-modal"] .aph-slot-btn.selected {
    background: var(--aph-brand);
    color: #fff;
    border-color: var(--aph-brand);
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-confirm {
    grid-area: confirm;
    padding: 0 28px 18px;
    min-width: 0;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-message {
    grid-area: message;
    margin: 0 28px 18px;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-summary,
.aph-booking-wrap[data-style="product-modal"] .aph-service-context-fields,
.aph-booking-wrap[data-style="product-modal"] .aph-payment-options,
.aph-booking-wrap[data-style="product-modal"] .aph-prospect-fields,
.aph-booking-wrap[data-style="product-modal"] .aph-guest-fields,
.aph-booking-wrap[data-style="product-modal"] .aph-booking-notes,
.aph-booking-wrap[data-style="product-modal"] .aph-booking-submit,
.aph-booking-wrap[data-style="product-modal"] .aph-booking-note-text,
.aph-booking-wrap[data-style="product-modal"] .aph-booking-actions {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 860px) {
    .aph-booking-modal--product .aph-booking-modal-inner {
        width: 100vw;
    }

    .aph-booking-wrap[data-style="product-modal"] {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "header"
            "progress"
            "service"
            "format"
            "calendar"
            "slots"
            "confirm"
            "message";
    }

    .aph-booking-wrap[data-style="product-modal"] .aph-booking-progress {
        padding: 16px 18px;
        border-top: 1px solid var(--aph-border);
    }

    .aph-booking-wrap[data-style="product-modal"] .aph-progress-steps {
        justify-content: space-between;
        gap: 12px;
        flex-direction: row;
        align-items: stretch;
    }

    .aph-booking-wrap[data-style="product-modal"] .aph-progress-steps::before {
        top: 16px;
        left: 32px;
        right: 32px;
        bottom: auto;
        width: auto;
        height: 2px;
    }

    .aph-booking-wrap[data-style="product-modal"] .aph-progress-step {
        flex-direction: column;
        gap: 0;
        width: auto;
    }

    .aph-booking-wrap[data-style="product-modal"] .aph-step-label {
        margin-top: 8px;
        text-align: center;
    }

    .aph-booking-wrap[data-style="product-modal"] .aph-booking-header,
    .aph-booking-wrap[data-style="product-modal"] .aph-booking-service-bar,
    .aph-booking-wrap[data-style="product-modal"] .aph-booking-calendar,
    .aph-booking-wrap[data-style="product-modal"] .aph-booking-special,
    .aph-booking-wrap[data-style="product-modal"] .aph-booking-slots,
    .aph-booking-wrap[data-style="product-modal"] .aph-booking-confirm,
    .aph-booking-wrap[data-style="product-modal"] .aph-booking-message {
        padding-left: 20px;
        padding-right: 20px;
        margin-left: 0;
        margin-right: 0;
    }

    .aph-special-options-grid,
    .aph-special-bands-grid,
    .aph-special-spots-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .aph-booking-timezone-stack {
        justify-items: start;
    }
}

@media (max-width: 640px) {
    .aph-prospect-fields,
    .aph-guest-fields {
        grid-template-columns: 1fr;
    }
}

.aph-summary-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--aph-brand);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--aph-cream-dark);
}

.aph-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 0;
}

.aph-summary-label {
    font-size: 14px;
    color: var(--aph-muted);
    flex-shrink: 0;
}

.aph-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--aph-brand);
    text-align: right;
    word-break: break-word;
}

/* ─── Success State ───────────────────────────────── */

.aph-booking-success {
    display: none;
    text-align: center;
    padding: 60px 40px;
}

.aph-booking-success.show {
    display: block;
}

.aph-success-icon {
    width: 80px;
    height: 80px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.aph-success-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--aph-success);
    fill: none;
    stroke-width: 2;
}

.aph-booking-success h3 {
    font-family: var(--aph-serif);
    font-size: 28px;
    color: var(--aph-brand);
    margin: 0 0 12px;
}

.aph-booking-success p {
    color: var(--aph-muted);
    margin: 0 0 24px;
    line-height: 1.6;
}

.aph-confirmation-details {
    background: var(--aph-cream);
    border-radius: var(--aph-radius);
    padding: 24px;
    text-align: left;
    margin-top: 24px;
}

/* ─── Action Buttons (next/back for multi-step) ──── */

.aph-booking-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.aph-booking-actions > * {
    min-width: 0;
}

.aph-booking-actions--slots {
    margin-top: 20px;
}

.aph-btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    background: transparent;
    color: var(--aph-muted);
    padding: 14px 24px;
    border: 2px solid var(--aph-border);
    border-radius: var(--aph-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--aph-font);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

.aph-btn-back:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(74, 49, 36, 0.12);
}

.aph-btn-next,
.aph-btn-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--aph-accent);
    color: var(--aph-brand);
    padding: 14px 32px;
    border: none;
    border-radius: var(--aph-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--aph-font);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

.aph-btn-next:hover,
.aph-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.aph-btn-next svg,
.aph-btn-back svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ─── Responsive ──────────────────────────────────── */

@media (max-width: 480px) {
    .aph-booking-service-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .aph-booking-service-info {
        justify-content: center;
    }

    .aph-slots-grid {
        grid-template-columns: 1fr;
    }

    .aph-booking-wrap {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .aph-service-options {
        grid-template-columns: 1fr;
    }

    .aph-booking-progress {
        padding: 16px 20px;
    }

    .aph-booking-actions {
        flex-direction: column-reverse;
    }

    .aph-btn-back,
    .aph-btn-next,
    .aph-btn-confirm {
        width: 100%;
        justify-content: center;
    }

    .aph-btn-next,
    .aph-btn-confirm {
        margin-left: 0;
    }
}

/* ══════════════════════════════════════════════════════
   APH Member Portal — My Appointments / My Portal
   Full-portal layout with sidebar navigation tabs
   ══════════════════════════════════════════════════════ */

/* ── Portal shell ─────────────────────────────────── */
.aph-portal {
    display: flex;
    gap: 0;
    background: var(--aph-bg, #fff);
    border-radius: var(--aph-radius, 10px);
    border: 1px solid var(--aph-border, #e8e8e8);
    overflow: hidden;
    min-height: 520px;
    font-family: var(--aph-font);
}

.aph-portal--embedded {
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: 0;
    overflow: visible;
}

.aph-portal--embedded .aph-portal-nav {
    display: none;
}

.aph-portal--embedded .aph-portal-panels {
    overflow: visible;
}

.aph-portal--embedded .aph-portal-panel {
    min-height: 0;
    padding: 0;
}

/* ── Sidebar nav ──────────────────────────────────── */
.aph-portal-nav {
    display: flex;
    flex-direction: column;
    width: 200px;
    min-width: 200px;
    background: var(--aph-bg-alt, #f8f9fa);
    border-right: 1px solid var(--aph-border, #e8e8e8);
    padding: 20px 0;
    gap: 2px;
}

.aph-portal-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--aph-muted, #999);
    background: none;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: color .15s, background .15s, border-color .15s;
    white-space: nowrap;
    width: 100%;
}
.aph-portal-tab svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.aph-portal-tab:hover { color: var(--aph-text, #333); background: rgba(0,0,0,.04); }
.aph-portal-tab.active {
    color: var(--aph-brand, #002B45);
    background: var(--aph-bg, #fff);
    border-left-color: var(--aph-brand, #002B45);
    font-weight: 600;
}
.aph-portal-tab.active svg { opacity: 1; }
.aph-portal-tab-count {
    margin-left: auto;
    background: var(--aph-brand, #002B45);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.aph-portal-tab:not(.active) .aph-portal-tab-count {
    background: var(--aph-cream-dark, #e8e2d8);
    color: var(--aph-text, #333);
}

/* ── Panel area ───────────────────────────────────── */
.aph-portal-panels {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.aph-portal-panel {
    display: none;
    padding: 28px 30px;
    min-height: 520px;
}
.aph-portal-panel.active { display: block; }

/* ── Panel header ─────────────────────────────────── */
.aph-panel-header {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--aph-border, #e8e8e8);
}
.aph-panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--aph-text, #333);
    margin: 0 0 4px;
    font-family: var(--aph-font);
}
.aph-panel-header p {
    font-size: 13px;
    color: var(--aph-muted, #999);
    margin: 0;
}

/* ── Empty state ──────────────────────────────────── */
.aph-portal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--aph-muted, #999);
}
.aph-portal-empty svg { opacity: .3; margin-bottom: 16px; }
.aph-portal-empty p { font-size: 14px; margin: 0 0 16px; }

/* ── Event cards ──────────────────────────────────── */
.aph-portal-cards { display: flex; flex-direction: column; gap: 12px; }
.aph-portal-card {
    display: flex;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--aph-border, #e8e8e8);
    border-radius: var(--aph-radius, 10px);
    background: var(--aph-bg, #fff);
}
.aph-portal-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--aph-bg-alt, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.aph-portal-card-icon svg { width: 20px; height: 20px; color: var(--aph-brand, #002B45); }
.aph-portal-card-body { flex: 1; min-width: 0; }
.aph-portal-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--aph-text, #333);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aph-portal-card-meta {
    font-size: 12px;
    color: var(--aph-muted, #999);
    margin: 0 0 8px;
}
.aph-portal-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .02em;
}
.aph-portal-badge--confirmed  { background: #e8f5e9; color: #2e7d32; }
.aph-portal-badge--pending    { background: #fff8e1; color: #ef6c00; }
.aph-portal-badge--active     { background: #e3f2fd; color: #1565c0; }
.aph-portal-badge--expired    { background: #fce4ec; color: #c62828; }
.aph-portal-badge--completed  { background: #e8f5e9; color: #2e7d32; }
.aph-portal-badge--processing { background: #e3f2fd; color: #1565c0; }
.aph-portal-badge--on-hold    { background: #fff8e1; color: #ef6c00; }
.aph-portal-badge--in-progress { background: #e3f2fd; color: #1565c0; }
.aph-portal-badge--passed     { background: #e8f5e9; color: #2e7d32; }

/* ── Membership card ──────────────────────────────── */
.aph-membership-card {
    background: linear-gradient(135deg, var(--aph-brand, #002B45) 0%, #1a4060 100%);
    color: #fff;
    border-radius: var(--aph-radius, 10px);
    padding: 24px 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.aph-membership-card::before {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.aph-membership-badge {
    display: inline-block;
    background: var(--aph-accent, #d4af37);
    color: var(--aph-brand, #002B45);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.aph-membership-plan-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
}
.aph-membership-meta {
    font-size: 13px;
    opacity: .75;
    margin: 0;
}

/* ── Progress bar (courses) ───────────────────────── */
.aph-course-progress {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.aph-course-progress-bar {
    flex: 1;
    height: 5px;
    background: var(--aph-border, #e8e8e8);
    border-radius: 3px;
    overflow: hidden;
}
.aph-course-progress-fill {
    height: 100%;
    background: var(--aph-brand, #002B45);
    border-radius: 3px;
    transition: width .4s;
}
.aph-course-progress-pct {
    font-size: 11px;
    font-weight: 600;
    color: var(--aph-muted, #999);
    white-space: nowrap;
}

/* ── BI Library grid ──────────────────────────────── */
.aph-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.aph-library-book {
    background: var(--aph-bg, #fff);
    border: 1px solid var(--aph-border, #e8e8e8);
    border-radius: var(--aph-radius, 10px);
    overflow: hidden;
    transition: box-shadow .2s;
}
.aph-library-book:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.aph-library-book-cover {
    background: var(--aph-cream, #f5f1ea);
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.aph-library-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.aph-library-book-cover-placeholder {
    width: 60%;
    aspect-ratio: 3/4;
    background: var(--aph-brand, #002B45);
    border-radius: 3px 8px 8px 3px;
    opacity: .18;
}
.aph-library-book-info { padding: 12px; }
.aph-library-book-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--aph-text, #333);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.aph-library-book-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 7px 10px;
    background: var(--aph-brand, #002B45);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 7px;
    text-decoration: none;
    transition: opacity .15s;
}
.aph-library-book-btn:hover { opacity: .85; color: #fff; }

/* ── Login gate ───────────────────────────────────── */
.aph-portal-login-gate {
    padding: 60px 24px;
    text-align: center;
    font-size: 15px;
    color: var(--aph-muted, #999);
}
.aph-portal-login-gate a {
    color: var(--aph-brand, #002B45);
    font-weight: 600;
}

/* ── Mobile: top tab bar ──────────────────────────── */
@media (max-width: 680px) {
    .aph-portal { flex-direction: column; }
    .aph-portal-nav {
        flex-direction: row;
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid var(--aph-border, #e8e8e8);
        padding: 0;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0;
    }
    .aph-portal-nav::-webkit-scrollbar { display: none; }
    .aph-portal-tab {
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px;
        font-size: 11px;
        border-left: none;
        border-bottom: 3px solid transparent;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .aph-portal-tab svg { width: 18px; height: 18px; }
    .aph-portal-tab.active {
        border-bottom-color: var(--aph-brand, #002B45);
        border-left-color: transparent;
    }
    .aph-portal-tab-count { margin-left: 0; }
    .aph-portal-panel { padding: 20px 16px; }
    .aph-membership-card { padding: 18px 20px; }
    .aph-library-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ══════════════════════════════════════════════════════
   PORTAL: EMBED IFRAME (MasterStudy courses, etc.)
   ══════════════════════════════════════════════════════ */

.aph-portal-embed-wrap {
    width: 100%;
    height: calc(100vh - 140px);
    min-height: 500px;
}

.aph-portal-embed-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* ══════════════════════════════════════════════════════
   PORTAL: IFRAME MODAL (orders, payments, reader)
   ══════════════════════════════════════════════════════ */

.aph-iframe-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99990;
}

.aph-iframe-modal {
    position: fixed;
    inset: 0;
    z-index: 99991;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.aph-iframe-modal-inner {
    pointer-events: all;
    width: 94vw;
    max-width: 960px;
    height: 88vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 64px rgba(0,0,0,0.3);
}

.aph-iframe-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--aph-brand, #002B45);
    color: #fff;
    flex-shrink: 0;
}

.aph-iframe-modal-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 36px);
}

.aph-iframe-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.aph-iframe-modal-close:hover { background: rgba(255,255,255,0.15); }

.aph-iframe-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    display: block;
}

/* Meet the Founders / flat special: full-width panel, light calendar */
.aph-booking-wrap[data-style="product-modal"],
.aph-booking-wrap.aph-booking-wrap--special-flat {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.aph-booking-wrap[data-style="product-modal"] .aph-booking-calendar,
.aph-booking-wrap.aph-booking-wrap--special-flat .aph-booking-special-spots {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(74, 49, 36, 0.1);
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-month-label {
    font-weight: 600;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-weekday {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day {
    font-weight: 400;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day.today {
    font-weight: 500;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day.available {
    font-weight: 400;
}

.aph-booking-wrap[data-style="product-modal"] .aph-cal-day.selected {
    font-weight: 500;
    color: #fff !important;
}

.aph-booking-wrap.aph-booking-wrap--special-flat .aph-booking-special-spots {
    grid-column: 1 / -1;
    max-width: 100%;
}

.aph-booking-wrap.aph-booking-wrap--special-flat .aph-special-spots-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Meet the Founders uploads live in Personal / Company sections; previews */
.aph-mtf-upload-row .aph-field-hint {
    margin: 0 0 8px;
    font-size: 13px;
    color: rgba(74, 49, 36, 0.75);
    line-height: 1.45;
}

.aph-upload-preview {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.aph-upload-preview[hidden] {
    display: none !important;
}

.aph-upload-preview--headshot .aph-upload-preview-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(74, 49, 36, 0.14);
    background: #f3f0eb;
    display: block;
}

.aph-upload-preview--logo .aph-upload-preview-img {
    max-width: 220px;
    max-height: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(74, 49, 36, 0.12);
    padding: 10px 14px;
    background: #fff;
    border-radius: 10px;
    display: block;
}

.aph-upload-preview-clear {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(74, 49, 36, 0.22);
    background: #fffaf4;
    color: var(--aph-brand, #4a3124);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.aph-upload-preview-clear:hover {
    background: rgba(74, 49, 36, 0.06);
    border-color: rgba(74, 49, 36, 0.35);
}

.aph-booking-wrap--special-flat .aph-mtf-upload-row .aph-guest-headshot-file,
.aph-booking-wrap--special-flat .aph-mtf-upload-row .aph-company-logo-file {
    width: 100%;
    max-width: 100%;
    font-size: 0.9rem;
}
