:root {
    --cbs-red: #d32f2f;
    --cbs-red-dark: #b71c1c;
}

#booking-app {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Selection summary */
.booking-selections {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid var(--cbs-red);
    position: relative;
    z-index: 10;
}

.booking-selections h3 {
    margin: 0 0 10px 0;
    color: #495057;
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.selection-row {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
}

.selection-label {
    font-weight: 600;
    color: #495057;
}

.selection-value {
    color: #212529;
}

.selection-change .change-btn {
    background: var(--cbs-red);
    color: #fff;
    border: 2px solid var(--cbs-red);
    padding: 6px 14px;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
}

.selection-change .change-btn:hover {
    background: transparent;
    color: var(--cbs-red);
}

/* Headings */
.step-header {
    text-align: left;
    margin-bottom: 20px;
}

.step-header h2 {
    color: #495057;
    margin-bottom: 6px;
    font-size: 28px;
}

.step-header p {
    color: #6c757d;
    font-size: 16px;
}

/* Option cards */
.booking-options {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.booking-options.grid-2 {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
}

.option-button {
    background: #fff;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    padding: 22px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
}

.option-button:hover {
    border-color: var(--cbs-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(211, 47, 47, .15);
}

.option-button.selected {
    border-color: var(--cbs-red);
    background: linear-gradient(135deg, #ffecec 0%, #fff6f6 100%);
    box-shadow: 0 10px 25px rgba(211, 47, 47, .2);
}

.option-icon {
    font-size: 42px;
    margin-right: 18px;
    flex-shrink: 0;
}

.option-content h3 {
    margin: 0 0 6px 0;
    color: #495057;
    font-size: 22px;
}

.option-content p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* Date & time */
.date-time-container,
.birthday-container,
.team-container {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
    position: relative;
    z-index: 1;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.date-selection {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.date-selection label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

.date-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color .3s ease;
}

.date-input:focus {
    border-color: var(--cbs-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}

.pricing-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.pricing-info h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pricing-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--cbs-red);
}

.pricing-day {
    font-weight: 700;
    color: #495057;
    margin-bottom: 8px;
}

.pricing-detail {
    margin: 5px 0;
    color: #6c757d;
}

.time-instruction {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 10px;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.time-slots-select {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color .3s ease;
}

.time-slots-select:focus {
    border-color: var(--cbs-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}

.time-slot {
    background: #fff;
    border: 2px solid #e9ecef;
    padding: 10px 8px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all .3s ease;
    font-size: 13px;
    line-height: 1.3;
}

.time-slot:hover {
    border-color: var(--cbs-red);
    background: #fff6f6;
    transform: translateY(-2px);
}

.time-slot.selected {
    border-color: var(--cbs-red);
    background: linear-gradient(135deg, #ffecec, #fff3f3);
    color: #8a1f1f;
    font-weight: 600;
}

.time-slot.disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: line-through;
}

/* Add-ons */
.addons {
    margin-top: 20px;
}

.addons h4 {
    margin-bottom: 12px;
    color: #495057;
}

.addons label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #495057;
}

/* Cricket add-on */
.cricket-section {
    margin-top: 18px;
    background: #fff;
    border: 1px solid #f1d5d5;
    border-radius: 10px;
    padding: 16px;
}

.bola-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
}

.small-note {
    font-size: 12px;
    color: #d41010;
    margin-top: 6px;
}

/* Cards */
.customer-section,
.summary-section,
.payment-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
}

.customer-section h3,
.summary-section h3,
.payment-section h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all .3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--cbs-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}

.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all .3s ease;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    border-color: var(--cbs-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}

/* Summary (2 columns) */
.summary-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.summary-table th {
    background: #495057;
    color: #fff;
    font-weight: 600;
}

.total-row {
    background: #fff3f3;
    font-weight: bold;
    font-size: 18px;
    color: #495057;
}

/* Payment elements */
.card-element {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: border-color .3s ease;
}

.card-element:focus {
    border-color: var(--cbs-red);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}

.card-errors {
    color: #dc3545;
    margin-top: 8px;
    min-height: 20px;
}

/* Terms & Nav buttons */
.terms-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
}

.terms-checkbox {
    display: flex;
    align-items: center;
    user-select: none;
}

.team-terms p {
    margin-left: 40px;
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
}

.terms-checkbox input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.next-btn,
.back-btn {
    padding: 12px 24px;
    border-radius: 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
    border: 2px solid var(--cbs-red);
    background: var(--cbs-red);
    color: #fff;
}

.next-btn:hover:not(:disabled),
.back-btn:hover {
    background: transparent;
    color: var(--cbs-red);
}

.next-btn:disabled {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
    cursor: not-allowed;
}

/* Pay button stays green */
.payment-button-section {
    text-align: center;
    margin: 25px 0;
}

.pay-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    min-width: 200px;
    transition: all .3s ease;
    position: relative;
    box-shadow: 0 5px 15px rgba(40, 167, 69, .4);
}

.pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, .5);
}

.pay-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pay-icon {
    margin-right: 8px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success */
.success-step {
    text-align: center;
    padding: 40px 20px;
}

.success-content {
    background: #fff;
    border-radius: 15px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, .2);
    max-width: 520px;
    margin: 0 auto;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 10px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10px);
    }
}

.success-step h2 {
    color: #28a745;
    margin-bottom: 10px;
}

.new-booking-btn {
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    margin-top: 14px;
    transition: all .2s ease;
}

.new-booking-btn:hover {
    background: transparent;
    border: 2px solid #d32f2f;
    color: #d32f2f;
}

/* Conflict popup */
.conflict-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 10000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: none;
    max-width: 300px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    #booking-app {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .selection-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .selection-change {
        justify-self: stretch;
    }

    .selection-change .change-btn {
        width: 100%;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .booking-options {
        gap: 16px;
    }

    .booking-options.grid-2,
    .booking-options.grid-3 {
        grid-template-columns: 1fr;
    }

    .option-button {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .option-icon {
        margin: 0 0 12px 0;
    }

    .step-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .step-navigation button {
        width: 100%;
    }
}
