/* =============================================
   LeetBook Booking Widget — Calendly-inspired
   ============================================= */

:root {
    --lb-blue:        #006bff;
    --lb-blue-hover:  #0056cc;
    --lb-blue-light:  #e8f0fe;
    --lb-text:        #1a1a1a;
    --lb-muted:       #6b7280;
    --lb-border:      #e5e7eb;
    --lb-bg:          #f9fafb;
    --lb-white:       #ffffff;
    --lb-radius:      16px;
    --lb-radius-sm:   8px;
    --lb-shadow:      0 4px 32px rgba(0, 0, 0, 0.10);
    --lb-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.leetbook-widget {
    max-width: 900px;
    margin: 0 auto;
    font-family: var(--lb-font);
    color: var(--lb-text);
    line-height: 1.5;
}

/* Steps */
.leetbook-step { display: none; }
.leetbook-step.leetbook-active { display: block; }

/* =============================================
   Card
   ============================================= */
.leetbook-card {
    background: var(--lb-white);
    border-radius: var(--lb-radius);
    box-shadow: var(--lb-shadow);
    overflow: hidden;
}

.leetbook-card-split {
    display: flex;
    min-height: 520px;
}

/* =============================================
   Step 1 — Intro / Treatment Selection
   ============================================= */
.leetbook-intro-header {
    padding: 36px 36px 24px;
    border-bottom: 1px solid var(--lb-border);
}

.leetbook-intro-org {
    margin: 0 0 4px;
    font-size: 0.85rem;
    color: var(--lb-muted);
    font-weight: 500;
}

.leetbook-intro-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--lb-text);
}

.leetbook-treatments {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leetbook-treatment-card {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--lb-border);
    border-radius: var(--lb-radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    background: var(--lb-white);
}

.leetbook-treatment-card:hover {
    border-color: var(--lb-blue);
    box-shadow: 0 2px 12px rgba(0, 107, 255, 0.12);
    transform: translateY(-1px);
}

.leetbook-treatment-accent {
    width: 5px;
    flex-shrink: 0;
}

.leetbook-treatment-body {
    padding: 16px 20px;
    flex: 1;
}

.leetbook-treatment-name {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--lb-text);
}

.leetbook-treatment-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.leetbook-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--lb-muted);
}

.leetbook-meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.leetbook-treatment-desc {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--lb-muted);
    line-height: 1.4;
}

.leetbook-treatment-arrow {
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #c9cdd4;
    flex-shrink: 0;
    transition: color 0.15s;
}

.leetbook-treatment-arrow svg {
    width: 18px;
    height: 18px;
}

.leetbook-treatment-card:hover .leetbook-treatment-arrow {
    color: var(--lb-blue);
}

/* =============================================
   Duration options (sub-step 1b)
   ============================================= */
.lb-duration-options {
    padding: 8px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lb-duration-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border: 1.5px solid var(--lb-border);
    border-radius: var(--lb-radius-sm);
    background: var(--lb-white);
    cursor: pointer;
    font-family: var(--lb-font);
    font-size: 1rem;
    font-weight: 500;
    color: var(--lb-text);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    text-align: left;
}

.lb-duration-btn:hover {
    border-color: var(--lb-blue);
    box-shadow: 0 2px 12px rgba(0, 107, 255, 0.12);
    transform: translateY(-1px);
}

.lb-duration-btn-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lb-duration-btn-label svg {
    width: 16px;
    height: 16px;
    color: var(--lb-muted);
}

.lb-duration-btn-arrow {
    color: #c9cdd4;
    display: flex;
    align-items: center;
}

.lb-duration-btn-arrow svg {
    width: 18px;
    height: 18px;
}

.lb-duration-btn:hover .lb-duration-btn-arrow {
    color: var(--lb-blue);
}

/* =============================================
   Left Info Panel (Step 2 & 3)
   ============================================= */
.leetbook-info-panel {
    width: 240px;
    flex-shrink: 0;
    padding: 32px 24px;
    border-right: 1px solid var(--lb-border);
}

.leetbook-info-business {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--lb-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.leetbook-info-treatment {
    margin: 0 0 24px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--lb-text);
    line-height: 1.3;
    min-height: 1.3em;
}

.leetbook-info-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leetbook-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--lb-muted);
}

.leetbook-info-row svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* =============================================
   Step 2 — Summary header (treatment + meta)
   ============================================= */
.leetbook-step2-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--lb-border);
    margin-bottom: 18px;
}

.leetbook-step2-summary .leetbook-info-treatment {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lb-text);
    margin: 0;
    min-height: 0;
    margin-bottom: 0;
}

.leetbook-step2-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--lb-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.leetbook-step2-meta .leetbook-info-duration::after {
    content: '·';
    margin-left: 10px;
}

/* =============================================
   Main Panel (Calendar + Form)
   ============================================= */
.leetbook-main-panel {
    flex: 1;
    padding: 28px 32px 32px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.leetbook-panel-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}

.leetbook-panel-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--lb-text);
}

.leetbook-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--lb-blue);
    cursor: pointer;
    padding: 4px 8px 4px 2px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--lb-font);
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.leetbook-back-btn svg {
    width: 15px;
    height: 15px;
}

.leetbook-back-btn:hover {
    background: var(--lb-blue-light);
}

/* =============================================
   Date & Time Picker
   ============================================= */
.leetbook-datetime-picker {
    display: flex;
    gap: 28px;
    flex: 1;
}

.leetbook-calendar {
    flex-shrink: 0;
}

.leetbook-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
}

.leetbook-cal-month {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lb-text);
    flex: 1;
    text-align: center;
}

.leetbook-calendar-header button {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lb-muted);
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.leetbook-calendar-header button svg {
    width: 14px;
    height: 14px;
}

.leetbook-calendar-header button:hover {
    background: var(--lb-bg);
    color: var(--lb-text);
}

.leetbook-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 36px);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--lb-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.leetbook-cal-dates {
    display: grid;
    grid-template-columns: repeat(7, 36px);
    gap: 2px;
}

.leetbook-cal-date {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.88rem;
    font-weight: 400;
    cursor: default;
    transition: background 0.12s, color 0.12s;
    border: 2px solid transparent;
    box-sizing: border-box;
}

/* Available dates: blue ring, like Calendly */
.leetbook-cal-date.leetbook-cal-available {
    border-color: var(--lb-blue);
    color: var(--lb-blue);
    font-weight: 600;
    cursor: pointer;
}

.leetbook-cal-date.leetbook-cal-available:hover {
    background: var(--lb-blue-light);
}

/* Selected date: solid blue fill */
.leetbook-cal-date.leetbook-cal-selected {
    background: var(--lb-blue) !important;
    border-color: var(--lb-blue) !important;
    color: #fff !important;
    font-weight: 700;
}

/* Today */
.leetbook-cal-date.leetbook-cal-today:not(.leetbook-cal-selected) {
    font-weight: 700;
}

/* Disabled/past */
.leetbook-cal-date.leetbook-cal-disabled,
.leetbook-cal-date.leetbook-cal-empty {
    cursor: default;
    color: #d1d5db;
    border-color: transparent;
}

/* =============================================
   Time Slots
   ============================================= */
.leetbook-timeslots {
    flex: 1;
    min-width: 120px;
}

.leetbook-selected-date-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--lb-text);
    margin: 0 0 12px;
}

.leetbook-select-date-msg {
    font-size: 0.85rem;
    color: var(--lb-muted);
    margin: 0;
    line-height: 1.5;
}

.leetbook-slots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 2px;
}

.leetbook-slot-btn {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--lb-blue);
    border-radius: var(--lb-radius-sm);
    background: var(--lb-white);
    color: var(--lb-blue);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--lb-font);
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.leetbook-slot-btn:hover {
    background: var(--lb-blue);
    color: var(--lb-white);
}

/* Loading spinner */
.leetbook-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: var(--lb-muted);
    font-size: 0.85rem;
}

.leetbook-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--lb-border);
    border-top-color: var(--lb-blue);
    border-radius: 50%;
    animation: lb-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes lb-spin {
    to { transform: rotate(360deg); }
}

/* Timezone bar */
.leetbook-timezone-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--lb-border);
    font-size: 0.8rem;
    color: var(--lb-muted);
}

.leetbook-timezone-bar svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* =============================================
   Step 3 — Details Form
   ============================================= */
.leetbook-details-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.leetbook-form-row {
    margin-bottom: 14px;
}

.leetbook-form-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lb-text);
}

.leetbook-required { color: #ef4444; }

.leetbook-form-row input,
.leetbook-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--lb-border);
    border-radius: var(--lb-radius-sm);
    font-size: 0.95rem;
    font-family: var(--lb-font);
    color: var(--lb-text);
    background: var(--lb-white);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.leetbook-form-row input::placeholder,
.leetbook-form-row textarea::placeholder { color: #c4c9d0; }

.leetbook-form-row input:focus,
.leetbook-form-row textarea:focus {
    outline: none;
    border-color: var(--lb-blue);
    box-shadow: 0 0 0 3px rgba(0, 107, 255, 0.10);
}

.leetbook-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 13px 28px;
    background: var(--lb-blue);
    color: var(--lb-white);
    border: none;
    border-radius: var(--lb-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--lb-font);
    cursor: pointer;
    width: 100%;
    transition: background 0.15s, transform 0.1s;
}

.leetbook-submit-btn svg {
    width: 15px;
    height: 15px;
}

.leetbook-submit-btn:hover {
    background: var(--lb-blue-hover);
    transform: translateY(-1px);
}

.leetbook-submit-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
    transform: none;
}

.leetbook-error {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--lb-radius-sm);
    color: #dc2626;
    font-size: 0.88rem;
}

/* =============================================
   Step 5 — Confirmation
   ============================================= */
.leetbook-confirmation {
    padding: 56px 40px;
    text-align: center;
}

.leetbook-confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.leetbook-confirm-icon svg {
    width: 28px;
    height: 28px;
    color: #16a34a;
}

.leetbook-confirmation h3 {
    margin: 0 0 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--lb-text);
}

.leetbook-confirmation > p {
    margin: 0 0 20px;
    color: var(--lb-muted);
    font-size: 0.95rem;
}

.leetbook-confirmation-details {
    display: inline-block;
    text-align: left;
    background: var(--lb-bg);
    border-radius: var(--lb-radius-sm);
    padding: 16px 20px;
    font-size: 0.9rem;
    color: var(--lb-text);
    line-height: 1.9;
}

/* =============================================
   Cancellation pages
   ============================================= */
.leetbook-cancel-success,
.leetbook-cancel-error {
    max-width: 480px;
    margin: 40px auto;
    padding: 32px;
    border-radius: var(--lb-radius);
    text-align: center;
    font-family: var(--lb-font);
}

.leetbook-cancel-success { background: #f0fdf4; border: 1px solid #bbf7d0; }
.leetbook-cancel-error   { background: #fef2f2; border: 1px solid #fecaca; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 720px) {
    .leetbook-card-split { flex-direction: column; }

    .leetbook-info-panel {
        width: auto;
        border-right: none;
        border-bottom: 1px solid var(--lb-border);
        padding: 20px 20px 16px;
    }

    .leetbook-info-treatment { margin-bottom: 12px; }

    .leetbook-info-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .leetbook-main-panel { padding: 20px; }

    .leetbook-datetime-picker {
        flex-direction: column;
        gap: 20px;
    }

    .leetbook-cal-days,
    .leetbook-cal-dates {
        grid-template-columns: repeat(7, 1fr);
    }

    .leetbook-cal-date { width: auto; height: 34px; }

    .leetbook-intro-header { padding: 24px 20px 16px; }
    .leetbook-treatments   { padding: 16px 16px 20px; }
}

@media (max-width: 480px) {
    .leetbook-confirmation { padding: 36px 20px; }
}
