/**
 * ESA — Booking Platform CSS
 * Adapted from sagesse_booking_platform.html mockup
 * Uses ESA theme tokens: --esa-green, --esa-bordeaux, --esa-cream, --esa-gold
 */

/* ---------------------------------------------------------------
   TAB SYSTEM
--------------------------------------------------------------- */
.esa-booking-tabs {
    display: flex;
    gap: 8px;
    padding: 1rem 0 0;
    border-bottom: 1px solid rgba(45,74,62,0.15);
    margin-bottom: 2rem;
    overflow-x: auto;
}
.esa-booking-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body, 'Jost', sans-serif);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    border: 1px solid transparent;
    color: var(--esa-gray, #555);
    background: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.esa-booking-tab.active,
.esa-booking-tab:hover {
    background: #fff;
    border-color: rgba(45,74,62,0.2);
    border-bottom-color: #fff;
    color: var(--esa-green, #2d4a3e);
    margin-bottom: -1px;
}
.esa-booking-view { display: none; }
.esa-booking-view.active { display: block; }

/* ---------------------------------------------------------------
   SECTION LABELS
--------------------------------------------------------------- */
.esa-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--esa-gray, #888);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

/* ---------------------------------------------------------------
   METRIC CARDS GRID
--------------------------------------------------------------- */
.esa-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .esa-metric-grid { grid-template-columns: repeat(2, 1fr); }
}
.esa-metric {
    background: var(--esa-cream, #f8f7f4);
    border: 1px solid rgba(45,74,62,0.1);
    border-radius: 10px;
    padding: 1.25rem;
}
.esa-metric-val {
    font-size: 26px;
    font-weight: 600;
    font-family: var(--font-heading, 'Playfair Display', serif);
    color: var(--esa-green, #2d4a3e);
    line-height: 1.2;
}
.esa-metric-val.positive { color: #1D9E75; }
.esa-metric-lbl {
    font-size: 12px;
    color: var(--esa-gray, #888);
    margin-top: 4px;
    font-family: var(--font-body, 'Jost', sans-serif);
}

/* ---------------------------------------------------------------
   BOOKING FLOW — 2-COLUMN STEPS
--------------------------------------------------------------- */
.esa-booking-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .esa-booking-flow { grid-template-columns: 1fr; }
}
.esa-step-card {
    border: 1px solid rgba(45,74,62,0.15);
    border-radius: 12px;
    padding: 1.5rem;
    background: #fff;
}
.esa-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(45,74,62,0.1);
    color: var(--esa-green, #2d4a3e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
.esa-step-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--esa-green, #2d4a3e);
    margin-bottom: 4px;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-step-desc {
    font-size: 13px;
    color: var(--esa-gray, #888);
    line-height: 1.5;
}

/* ---------------------------------------------------------------
   CALENDAR
--------------------------------------------------------------- */
.esa-cal-header {
    font-size: 12px;
    color: var(--esa-gray, #888);
    margin-bottom: 8px;
    font-weight: 500;
}
.esa-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.esa-cal-day {
    text-align: center;
    padding: 6px 3px;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-cal-day.empty    { color: var(--esa-gray, #888); cursor: default; }
.esa-cal-day.available { background: rgba(29,158,117,0.12); color: #0F6E56; font-weight: 600; }
.esa-cal-day.available:hover { background: rgba(29,158,117,0.25); }
.esa-cal-day.full     { background: rgba(226,75,74,0.1); color: #A32D2D; cursor: not-allowed; }
.esa-cal-day.selected { background: var(--esa-green, #2d4a3e); color: #e8f0ec; font-weight: 600; }
.esa-cal-legend {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--esa-gray, #888);
    align-items: center;
}
.esa-cal-legend span { display: flex; align-items: center; gap: 4px; }
.esa-cal-dot {
    width: 9px; height: 9px;
    border-radius: 2px;
    display: inline-block;
}

/* ---------------------------------------------------------------
   TIME SLOTS
--------------------------------------------------------------- */
.esa-slot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}
.esa-slot {
    padding: 10px 12px;
    border: 1px solid rgba(45,74,62,0.2);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-family: var(--font-body, 'Jost', sans-serif);
    line-height: 1.4;
}
.esa-slot strong { display: block; font-size: 14px; color: var(--esa-green, #2d4a3e); }
.esa-slot.available {
    border-color: rgba(29,158,117,0.4);
    color: #0F6E56;
}
.esa-slot.available:hover { border-color: #1D9E75; background: rgba(29,158,117,0.06); }
.esa-slot.selected {
    background: var(--esa-green, #2d4a3e);
    color: #e8f0ec;
    border-color: var(--esa-green, #2d4a3e);
}
.esa-slot.selected strong { color: #e8f0ec; }
.esa-slot.full {
    color: var(--esa-gray, #888);
    background: var(--esa-cream, #f8f7f4);
    cursor: not-allowed;
    border-color: transparent;
}

/* ---------------------------------------------------------------
   BOOKING SUMMARY BOX
--------------------------------------------------------------- */
.esa-booking-summary {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--esa-cream, #f8f7f4);
    border-radius: 8px;
    font-size: 13px;
}
.esa-booking-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-booking-summary-row:last-child { margin-bottom: 0; }
.esa-booking-summary-row span:last-child { font-weight: 600; }
.esa-places-count { color: #1D9E75; }

/* ---------------------------------------------------------------
   PAY / CTA BUTTON
--------------------------------------------------------------- */
.esa-pay-btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--esa-bordeaux, #7a2535);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 14px;
    font-family: var(--font-body, 'Jost', sans-serif);
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
}
.esa-pay-btn:hover { background: #9a3045; color: #fff; }
.esa-pay-btn.secondary { background: var(--esa-green, #2d4a3e); }
.esa-pay-btn.secondary:hover { background: #3d6b5a; }
.esa-pay-note {
    font-size: 11px;
    color: var(--esa-gray, #888);
    text-align: center;
    margin-top: 8px;
}

/* ---------------------------------------------------------------
   FILTER BUTTONS
--------------------------------------------------------------- */
.esa-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.esa-filter-btn {
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid rgba(45,74,62,0.25);
    border-radius: 99px;
    cursor: pointer;
    background: none;
    color: var(--esa-gray, #555);
    font-family: var(--font-body, 'Jost', sans-serif);
    transition: all 0.2s;
}
.esa-filter-btn.selected,
.esa-filter-btn:hover {
    background: rgba(45,74,62,0.08);
    border-color: var(--esa-green, #2d4a3e);
    color: var(--esa-green, #2d4a3e);
}

/* ---------------------------------------------------------------
   STATUS BADGES
--------------------------------------------------------------- */
.esa-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-badge-green  { background: #E1F5EE; color: #0F6E56; }
.esa-badge-orange { background: #FAEEDA; color: #854F0B; }
.esa-badge-red    { background: #FCEBEB; color: #A32D2D; }
.esa-badge-blue   { background: #E6F1FB; color: #185FA5; }
.esa-badge-gray   { background: var(--esa-cream, #f8f7f4); color: var(--esa-gray, #888); }

/* ---------------------------------------------------------------
   STATUS DOTS
--------------------------------------------------------------- */
.esa-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}
.esa-dot-green  { background: #1D9E75; }
.esa-dot-orange { background: #BA7517; }
.esa-dot-red    { background: #E24B4A; }

/* ---------------------------------------------------------------
   WORKSHOP / EVENT ROWS
--------------------------------------------------------------- */
.esa-event-list { display: flex; flex-direction: column; gap: 8px; }
.esa-event-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid rgba(45,74,62,0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.esa-event-row:hover {
    border-color: rgba(45,74,62,0.3);
    background: var(--esa-cream, #f8f7f4);
}
.esa-event-info { flex: 1; }
.esa-event-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--esa-green, #2d4a3e);
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-event-sub {
    font-size: 12px;
    color: var(--esa-gray, #888);
    margin-top: 2px;
}
.esa-event-meta {
    text-align: right;
    font-size: 12px;
    color: var(--esa-gray, #888);
}
.esa-event-places {
    font-weight: 600;
    font-size: 14px;
    color: var(--esa-green, #2d4a3e);
}

/* ---------------------------------------------------------------
   AMBASSADOR CARDS
--------------------------------------------------------------- */
.esa-ambas-list { display: flex; flex-direction: column; gap: 8px; }
.esa-ambas-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(45,74,62,0.12);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
    color: inherit;
}
.esa-ambas-card:hover {
    border-color: rgba(45,74,62,0.3);
    background: var(--esa-cream, #f8f7f4);
}
.esa-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-avatar-green  { background: rgba(45,74,62,0.12); color: var(--esa-green, #2d4a3e); }
.esa-avatar-red    { background: rgba(122,37,53,0.12); color: var(--esa-bordeaux, #7a2535); }
.esa-ambas-info { flex: 1; }
.esa-ambas-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--esa-green, #2d4a3e);
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-ambas-loc { font-size: 12px; color: var(--esa-gray, #888); margin-top: 2px; }
.esa-ambas-stats { text-align: right; font-size: 12px; color: var(--esa-gray, #888); }
.esa-ambas-next { font-size: 14px; font-weight: 600; color: var(--esa-green, #2d4a3e); }

/* ---------------------------------------------------------------
   PROGRESS BARS (fill rate by region)
--------------------------------------------------------------- */
.esa-progress-group { display: flex; flex-direction: column; gap: 14px; }
.esa-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-progress-label span:last-child { font-weight: 600; }
.esa-progress-bar {
    height: 7px;
    background: rgba(45,74,62,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.esa-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.esa-progress-fill.high   { background: #1D9E75; }
.esa-progress-fill.medium { background: var(--esa-gold, #c9a84c); }
.esa-progress-fill.low    { background: #E24B4A; }

/* ---------------------------------------------------------------
   AUTOMATIONS LIST
--------------------------------------------------------------- */
.esa-auto-list { display: flex; flex-direction: column; gap: 10px; }
.esa-auto-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--esa-cream, #f8f7f4);
    border-radius: 10px;
}
.esa-auto-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}
.esa-auto-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--esa-green, #2d4a3e);
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-auto-desc {
    font-size: 13px;
    color: var(--esa-gray, #888);
    line-height: 1.5;
    margin-top: 3px;
}

/* ---------------------------------------------------------------
   ATTENDEES TABLE
--------------------------------------------------------------- */
.esa-table-wrap { overflow-x: auto; }
.esa-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--esa-gray, #888);
    border-bottom: 1px solid rgba(45,74,62,0.12);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.esa-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(45,74,62,0.07);
    color: var(--esa-green, #2d4a3e);
}
.esa-table tr:last-child td { border-bottom: none; }
.esa-table tr:hover td { background: var(--esa-cream, #f8f7f4); }

/* ---------------------------------------------------------------
   ADD AVAILABILITY FORM
--------------------------------------------------------------- */
.esa-form-card {
    background: #fff;
    border: 1px solid rgba(45,74,62,0.15);
    border-radius: 12px;
    padding: 1.5rem;
}
.esa-form-group { margin-bottom: 14px; }
.esa-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--esa-gray, #888);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-body, 'Jost', sans-serif);
}
.esa-form-input,
.esa-form-select {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid rgba(45,74,62,0.2);
    border-radius: 7px;
    font-family: var(--font-body, 'Jost', sans-serif);
    color: var(--esa-green, #2d4a3e);
    background: var(--esa-cream, #f8f7f4);
    transition: border-color 0.2s;
}
.esa-form-input:focus,
.esa-form-select:focus {
    outline: none;
    border-color: var(--esa-green, #2d4a3e);
    background: #fff;
}

/* ---------------------------------------------------------------
   2-COLUMN LAYOUT INSIDE VIEWS
--------------------------------------------------------------- */
.esa-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .esa-cols-2 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   AMELIA PLUGIN OVERRIDES — match ESA design
--------------------------------------------------------------- */
/* ---------------------------------------------------------------
   AMELIA PLUGIN OVERRIDES — full ESA styling
--------------------------------------------------------------- */

/* Base font */
.amelia-app,
.amelia-app * { font-family: var(--font-body, 'Jost', sans-serif) !important; }

/* Primary buttons — bordeaux */
.amelia-app .el-button--primary,
.amelia-app .amelia-button-confirm,
.amelia-app button[type="submit"] {
    background: #7a2535 !important;
    border-color: #7a2535 !important;
    color: #fff !important;
    border-radius: 7px !important;
    font-weight: 600 !important;
}
.amelia-app .el-button--primary:hover,
.amelia-app .amelia-button-confirm:hover {
    background: #9a3045 !important;
    border-color: #9a3045 !important;
}

/* Text inputs */
.amelia-app .el-input__inner,
.amelia-app .el-textarea__inner,
.amelia-app select {
    border-color: rgba(45,74,62,0.2) !important;
    border-radius: 7px !important;
    color: #2d4a3e !important;
    background: #fafafa !important;
}
.amelia-app .el-input__inner:focus,
.amelia-app .el-textarea__inner:focus {
    border-color: #2d4a3e !important;
    background: #fff !important;
}

/* Step wizard circles */
.amelia-app .amelia-step-number,
.amelia-app .el-step__icon.is-text {
    background: #2d4a3e !important;
    border-color: #2d4a3e !important;
    color: #e8f0ec !important;
}

/* Active/completed steps */
.amelia-app .el-step__title.is-process,
.amelia-app .el-step__title.is-finish { color: #2d4a3e !important; }
.amelia-app .el-step__line { background: rgba(45,74,62,0.2) !important; }
.amelia-app .el-step__line-inner { background: #2d4a3e !important; }

/* Calendar — Amelia's date picker */
.amelia-app .amelia-calendar-day:not(.amelia-calendar-day__disabled):hover,
.amelia-app .amelia-calendar-day.amelia-calendar-day__selected {
    background: #2d4a3e !important;
    color: #e8f0ec !important;
    border-radius: 50% !important;
}
.amelia-app .amelia-calendar-day.amelia-calendar-day__today {
    border: 2px solid #7a2535 !important;
    border-radius: 50% !important;
}

/* Time slots */
.amelia-app .amelia-time-slot-button:not(:disabled):hover {
    border-color: #2d4a3e !important;
    color: #2d4a3e !important;
}
.amelia-app .amelia-time-slot-button.amelia-time-slot-button__selected {
    background: #2d4a3e !important;
    border-color: #2d4a3e !important;
    color: #e8f0ec !important;
}

/* Service/category selection cards */
.amelia-app .amelia-service-card:hover,
.amelia-app .amelia-category-card:hover {
    border-color: #2d4a3e !important;
}
.amelia-app .amelia-service-card.selected,
.amelia-app .amelia-category-card.selected {
    border-color: #7a2535 !important;
    box-shadow: 0 0 0 2px rgba(122,37,53,0.2) !important;
}

/* Price display */
.amelia-app .amelia-price,
.amelia-app .el-statistic__number {
    color: #7a2535 !important;
    font-weight: 700 !important;
}

/* Section headings inside Amelia */
.amelia-app h2, .amelia-app h3 {
    color: #2d4a3e !important;
    font-family: 'Playfair Display', serif !important;
}

/* Checkbox / radio */
.amelia-app .el-checkbox__inner {
    border-color: rgba(45,74,62,0.3) !important;
}
.amelia-app .el-checkbox__input.is-checked .el-checkbox__inner {
    background: #2d4a3e !important;
    border-color: #2d4a3e !important;
}

/* Stripe payment form container */
.amelia-app .amelia-stripe-wrap,
.amelia-app .amelia-payment-section {
    border: 1px solid rgba(45,74,62,0.15) !important;
    border-radius: 10px !important;
    padding: 16px !important;
    background: #f8f7f4 !important;
}

/* Summary / confirmation box */
.amelia-app .amelia-summary-section {
    background: #f8f7f4 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(45,74,62,0.12) !important;
}
.amelia-app .amelia-summary-label { color: #888 !important; font-size: 12px !important; }
.amelia-app .amelia-summary-value { color: #2d4a3e !important; font-weight: 600 !important; }
