/* ══════════════════════════════════════════════════════════════
   Easy Services Booking – Wizard Layout Styles
   ══════════════════════════════════════════════════════════════ */

/* ── Progress Bar ─────────────────────────────────────────── */
.esb-wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0 2rem;
    padding: 0 1rem;
}

.esb-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: default;
    flex-shrink: 0;
}

.esb-wizard-step.completed {
    cursor: pointer;
}

.esb-wizard-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.esb-wizard-step.active .esb-wizard-step-number {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.esb-wizard-step.completed .esb-wizard-step-number {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.esb-wizard-step.completed .esb-wizard-step-number::after {
    content: '\2713';
    font-size: 1rem;
}

.esb-wizard-step.completed .esb-wizard-step-number {
    font-size: 0;
}

.esb-wizard-step-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-align: center;
    max-width: 75px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.esb-wizard-step.active .esb-wizard-step-label {
    color: #2563eb;
    font-weight: 600;
}

.esb-wizard-step.completed .esb-wizard-step-label {
    color: #16a34a;
}

.esb-wizard-step-line {
    flex: 1;
    height: 2px;
    background: #cbd5e1;
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
    transition: background 0.3s ease;
    min-width: 20px;
}

.esb-wizard-step-line.completed {
    background: #16a34a;
}

/* ── Mobile Indicator ─────────────────────────────────────── */
.esb-wizard-mobile-indicator {
    display: none;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* ── Panel Container & Transitions ────────────────────────── */
.esb-wizard-panels {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    transition: min-height 0.3s ease;
}

.esb-wizard-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0;
    pointer-events: none;
}

.esb-wizard-panel.active {
    position: relative;
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.esb-wizard-panel.left {
    transform: translateX(-100%);
    opacity: 0;
}

.esb-wizard-panel.right {
    transform: translateX(100%);
    opacity: 0;
}

.esb-wizard-panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #1e293b;
}

/* ── Shake animation for validation ───────────────────────── */
@keyframes esb-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.esb-wizard-panel.esb-shake {
    animation: esb-shake 0.4s ease;
}

/* ── Filter rows (Step 1) ─────────────────────────────────── */
.esb-wizard-filter-row {
    max-width: 400px;
}

.esb-wizard-filter-row .col-md-3 {
    width: 100%;
    padding: 0;
}

/* Hide service select dropdown -- cards replace it visually */
.easyservicesbooking-wizard #serviceSelect {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

/* ── Service Cards Grid ───────────────────────────────────── */
.esb-service-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.esb-service-card {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    background: #fff;
}

.esb-service-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.esb-service-card.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #eff6ff;
}

.esb-service-card-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.esb-service-card-duration {
    font-size: 0.875rem;
    color: #64748b;
}

.esb-service-card-price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2563eb;
    margin-top: 0.5rem;
}

/* ── Month Calendar (Step 1) ──────────────────────────────── */
.esb-wizard-month-calendar {
    max-width: 500px;
    margin: 0 auto;
}

.esb-wizard-month-calendar .main-calendar {
    border-collapse: collapse;
}

.esb-wizard-month-calendar .main-calendar th,
.esb-wizard-month-calendar .main-calendar td {
    text-align: center;
    vertical-align: middle;
    padding: 0.5rem;
    height: 2.5rem;
}

.esb-wizard-month-calendar .easyservicesbooking-cal-center-header {
    background: #f8fafc;
    font-weight: 600;
}

.esb-wizard-month-calendar .month-heading {
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    min-width: 160px;
}

.esb-wizard-month-calendar .easyservicesbooking-header-row th {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.esb-wizard-month-calendar td.easyservicesbooking-content {
    color: #cbd5e1;
}

.esb-wizard-month-calendar td .esb-cal-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.esb-wizard-month-calendar td .esb-cal-day:hover {
    background: #e0e7ff;
    color: #2563eb;
}

.esb-wizard-month-calendar td.esb-cal-today .esb-cal-day-today {
    border: 2px solid #2563eb;
    color: #2563eb;
    font-weight: 700;
}

.esb-wizard-month-calendar td.selected_day {
    background: transparent;
}

.esb-wizard-month-calendar td.selected_day .esb-cal-day {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

.esb-wizard-month-calendar .esb-cal-prev,
.esb-wizard-month-calendar .esb-cal-next {
    border: none;
    padding: 0.25rem 0.5rem;
}

/* ── Date Row ────────────────────────────────────────────── */
.esb-wizard-date-row {
    max-width: 400px;
}

/* ── Navigation Buttons ───────────────────────────────────── */
.esb-wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem 0;
    gap: 1rem;
}

.esb-wizard-nav .btn {
    min-width: 120px;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
}

#esb-wizard-prev {
    margin-right: auto;
}

#esb-wizard-next,
#esb-wizard-submit {
    margin-left: auto;
}

#esb-wizard-submit {
    min-width: 160px;
}

/* ── Review Cards (Step 4) ────────────────────────────────── */
.esb-review-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.esb-review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.esb-review-card-body {
    padding: 1rem;
}

.esb-review-card-body p {
    margin: 0 0 0.25rem;
}

.esb-review-card-body p:last-child {
    margin-bottom: 0;
}

.esb-review-edit {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
}

/* ── RTL Support ──────────────────────────────────────────── */
html[dir="rtl"] .esb-wizard-panel.left {
    transform: translateX(100%);
}

html[dir="rtl"] .esb-wizard-panel.right {
    transform: translateX(-100%);
}

/* ── Mobile Responsive (< 768px) ─────────────────────────── */
@media (max-width: 767.98px) {

    /* Progress bar: hide labels, compact */
    .esb-wizard-step-label {
        display: none;
    }

    .esb-wizard-step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .esb-wizard-step.active .esb-wizard-step-number {
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    .esb-wizard-step-line {
        margin-bottom: 0;
        min-width: 20px;
    }

    .esb-wizard-progress {
        margin: 1rem 0;
    }

    .esb-wizard-mobile-indicator {
        display: block;
    }

    /* Panels */
    .esb-wizard-panel {
        padding: 1rem;
    }

    .esb-wizard-panel-title {
        font-size: 1.125rem;
    }

    /* Service cards: single column */
    .esb-service-cards-grid {
        grid-template-columns: 1fr;
    }

    /* Filter rows full width */
    .esb-wizard-filter-row {
        max-width: 100%;
    }

    .esb-wizard-date-row {
        max-width: 100%;
    }

    /* Nav buttons */
    .esb-wizard-nav {
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid #e2e8f0;
        padding: 0.75rem 1rem;
        margin: 0 -1rem;
        z-index: 10;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    }

    .esb-wizard-nav .btn {
        min-width: 100px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ── Small screens (< 480px) ─────────────────────────────── */
@media (max-width: 479.98px) {
    .esb-service-card {
        padding: 1rem;
    }

    .esb-wizard-nav .btn {
        min-width: 80px;
    }
}
