:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.ab-booking-form-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 3.5rem;
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Ensure the root element has some space */
#appointment-booking-root {
    padding: 20px 0;
}


/* Steps Indicator */
.ab-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.ab-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
}

.ab-step.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.ab-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.2rem;
    top: 50%;
    width: 10px;
    height: 2px;
    background: #e2e8f0;
}

/* Session Grid */
.ab-session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.ab-session-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f9;
}

.ab-session-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.ab-session-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.ab-session-info {
    padding: 1.5rem;
}

.ab-session-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.ab-session-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.ab-session-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* Common Components */
.ab-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 1rem;
    padding: 0;
    font-size: 0.9rem;
}

.ab-back-btn:hover {
    color: var(--primary-color);
}

.ab-submit-btn, .ab-confirm-btn, .ab-done-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 2rem;
}

.ab-submit-btn:hover {
    background: var(--primary-hover);
}

/* Date/Time Picker */
.ab-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.ab-slot-btn {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ab-slot-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Date Picker Step 2 */
.ab-date-picker {
    margin: 2rem 0;
}

.ab-date-picker label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

.ab-date-picker input[type="date"] {
    width: 100%;
    max-width: 400px; /* Limit width but ensure it's not 'tiny' */
    padding: 1rem 1.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-main);
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}


.ab-date-picker input[type="date"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.ab-date-picker input[type="date"]:hover {
    border-color: #cbd5e1;
}

/* Form Styles */
.ab-form-group {
    margin-bottom: 2rem;
}

.ab-form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
}

.ab-form-group input, 
.ab-form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #ffffff;
    margin-top: 0.5rem;
}

.ab-form-group input:focus,
.ab-form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ab-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .ab-form-row {
        grid-template-columns: 1fr;
    }
}


.ab-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Payment Cards */
.ab-payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.ab-payment-card {
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ab-payment-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.ab-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ab-total {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ab-step-content > div {
    animation: fadeIn 0.4s ease forwards;
}

/* Session Variants */
.ab-variants-container {
    margin-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}

.ab-variants-container h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 1rem;
}

/* Header summary for steps 2, 3, 4 */
.ab-selection-summary {
    background: #f1f5f9;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.ab-selection-summary .s-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.ab-selection-summary .s-info p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ab-selection-summary .s-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}


.ab-variants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ab-variant-btn {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ab-variant-btn:hover {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.ab-variant-btn .v-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.ab-variant-btn .v-price {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
}

.ab-variant-btn:hover .v-price {
    color: var(--primary-color);
}

.ab-instruction {
    margin: -1rem 0 2.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.ab-session-card {
    cursor: default; /* Overriding default pointer since buttons handle interaction */
}

.ab-session-image {
    position: relative;
    overflow: hidden;
}

.ab-session-card img {
    transition: transform 0.5s ease;
}

.ab-session-card:hover img {
    transform: scale(1.05);
}
