@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --color-bg: #faf7f2;
    --color-surface: #ffffff;
    --color-text: #111111;
    --color-muted: #6b6660;
    --color-border: #e6dfd6;
    --color-accent: #5f8b86;
    --color-accent-hover: #4a7068;
    --color-accent-soft: #eaf2f0;
    --color-white: #ffffff;
    --color-danger: #b3422f;
    --color-danger-bg: #fbeae6;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --font-body: 'Inter', Arial, sans-serif;
    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
}

.booking-widget {
    padding: 24px;
    border-radius: 18px;
    max-width: 1000px;
    margin: 0 auto;
}

.bw-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
}

.bw-emblem { color: var(--color-accent); line-height: 0; }
.bw-emblem svg { width: 42px; height: auto; display: block; }

.bw-brand {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 24px;
    letter-spacing: 1.5px;
    color: var(--color-text);
}

.bw-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 28px;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: 0.2px;
    color: var(--color-text);
}

label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

input[type="text"], input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--color-white);
    margin-bottom: 14px;
}

input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }

/* ===== Stepper ===== */
.bw-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: nowrap;
}

.bw-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.bw-step-dot span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid var(--color-border);
    color: var(--color-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.bw-step-dot label {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-muted);
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

.bw-step-dot.active span,
.bw-step-dot.done span {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

.bw-step-dot.active label { color: var(--color-text); }
.bw-step-dot.active span { box-shadow: 0 0 0 4px var(--color-accent-soft); }

.bw-step-line {
    flex: 1;
    height: 2px;
    background: var(--color-border);
    margin: 0 4px;
    margin-bottom: 16px;
    min-width: 10px;
}

/* ===== Panels ===== */
.bw-panel { display: none; }
.bw-panel.active { display: block; animation: bw-fade-in 0.25s ease; }

@keyframes bw-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Service cards ===== */
.bw-service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.bw-service-card {
    text-align: left;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.bw-service-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 6px 18px rgba(95,139,134,0.14);
    transform: translateY(-2px);
}

.bw-service-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--color-accent-soft);
    color: var(--color-accent-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bw-service-icon svg { width: 22px; height: 22px; }

.bw-service-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 20px;
    line-height: 1.2;
    color: var(--color-text);
}

.bw-service-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bw-service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

.bw-service-duration {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--color-muted);
    font-weight: 500;
}
.bw-service-duration svg { width: 15px; height: 15px; }

.bw-service-price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 19px;
    color: var(--color-accent);
}

.bw-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.5;
    padding: 30px 18px;
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: 14px;
}

/* ===== Date & Time layout (calendar left, slots right) ===== */
.bw-datetime-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.bw-datetime-row .bw-calendar { margin-bottom: 0; }
.bw-datetime-row .bw-slots-wrap { margin-bottom: 0; }

.bw-slots-wrap .bw-slot-grid { grid-template-columns: 1fr; }

@media (max-width: 520px) {
    .bw-datetime-row { grid-template-columns: 1fr; }
    .bw-slots-wrap .bw-slot-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ===== Calendar ===== */
.bw-calendar {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 18px;
}

.bw-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bw-cal-month {
    font-weight: 700;
    font-size: 14px;
}

.bw-cal-nav {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: var(--color-text);
    font-size: 14px;
}

.bw-cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }

.bw-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-muted);
    margin-bottom: 6px;
}

.bw-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.bw-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    grid-column: 1 / -1;
}

.bw-skeleton-day { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); }

.bw-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    background: none;
    border: 1px solid transparent;
    cursor: default;
    color: var(--color-text);
}

.bw-cal-day.empty { visibility: hidden; }

.bw-cal-day.available {
    cursor: pointer;
    background: var(--color-accent-soft);
    color: var(--color-accent-hover);
}

.bw-cal-day.available:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.bw-cal-day.unavailable {
    color: var(--color-border);
    cursor: not-allowed;
}

.bw-cal-day.selected {
    background: var(--color-accent) !important;
    color: var(--color-white) !important;
}

/* ===== Slots ===== */
.bw-slots-wrap { margin-bottom: 18px; }

.bw-slots-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-muted);
}

.bw-hint { color: var(--color-muted); font-size: 13px; margin: 6px 0 0; }

.bw-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.bw-slot-grid.skeleton-mode .skeleton { height: 38px; border-radius: var(--radius-sm); }

.slot-button {
    padding: 9px 6px;
    border: 1px solid var(--color-accent);
    background: var(--color-white);
    color: var(--color-accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
}

.slot-button.selected {
    background: var(--color-accent);
    color: var(--color-white);
}

/* ===== Nav buttons ===== */
.bw-nav-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

.bw-btn-primary, .bw-btn-secondary {
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.bw-btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    margin-left: auto;
}
.bw-btn-primary:hover { background: var(--color-accent-hover); }

.bw-btn-secondary {
    background: var(--color-white);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.bw-btn-secondary:hover { background: var(--color-bg); }

/* ===== Mini summary (step 3) + final summary (step 4) ===== */
.bw-mini-summary, .bw-summary-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.bw-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
}
.bw-summary-row:last-child { border-bottom: none; }

.bw-summary-row .label { color: var(--color-muted); font-weight: 600; }
.bw-summary-row .value { font-weight: 600; text-align: right; word-break: break-word; }

.bw-summary-list { font-size: 14px; }

/* ===== Your Details: form cards + policies ===== */
.bw-form-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
}

.bw-form-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 19px;
    color: var(--color-accent-hover);
    margin-bottom: 14px;
}
.bw-form-card-head svg { width: 20px; height: 20px; }

.bw-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.bw-policy-list { display: flex; flex-direction: column; gap: 10px; }

.bw-policy-item {
    display: flex;
    gap: 10px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.bw-policy-check {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.bw-policy-content { display: flex; flex-direction: column; gap: 4px; }

.bw-policy-title { font-weight: 700; font-size: 14px; color: var(--color-text); cursor: pointer; }

.bw-policy-body {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bw-policy-body.expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }

.bw-policy-more {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-body);
}
.bw-policy-more:hover { text-decoration: underline; }

/* ===== Checkbox / links / errors ===== */
.bw-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
}
.bw-checkbox-row input { width: auto; margin: 0; }

.bw-link-button {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.bw-error {
    color: var(--color-danger);
    background: var(--color-danger-bg);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    display: none;
}
.bw-error.visible { display: block; }

.bw-booking-message {
    margin-top: 14px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

/* ===== Skeleton shimmer ===== */
.skeleton {
    background: linear-gradient(90deg, #efece5 25%, #f7f4ee 37%, #efece5 63%);
    background-size: 400% 100%;
    animation: bw-shimmer 1.4s ease infinite;
}

@keyframes bw-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ===== Modal ===== */
.bw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17,17,17,.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 16px;
}
.bw-modal-overlay.visible { display: flex; }

.bw-modal-box {
    background: var(--color-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.bw-modal-box h3 { font-family: var(--font-heading); margin-top: 0; }

.bw-modal-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-muted);
    padding: 0;
}
.bw-modal-close-btn:hover { color: var(--color-text); }

@media (max-width: 420px) {
    .booking-widget { padding: 16px; border-radius: 0; }
    .bw-step-dot label { display: none; }
    .bw-field-grid { grid-template-columns: 1fr; }
}