/* =============================================
   BENJI'S CUTS - Booking Page Styles
   ============================================= */

/* =============================================
   Book Section
   ============================================= */
.book-section {
    padding: 8rem 0 4rem;
    min-height: 100vh;
}

.book-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.book-header {
    text-align: center;
    margin-bottom: 2rem;
}

.book-header h1 {
    margin-bottom: 0.5rem;
}

.book-header p {
    color: var(--silver);
}

/* =============================================
   Steps
   ============================================= */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--silver);
}

.step.active {
    color: var(--white);
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
}

.step.active .step-num {
    background: var(--chrome);
    border-color: var(--chrome);
    color: var(--black);
}

.step.done .step-num {
    background: var(--silver);
    border-color: var(--silver);
    color: var(--black);
}

.step-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--gray);
}

/* =============================================
   Book Card
   ============================================= */
.book-card {
    background: var(--charcoal);
    border: 1px solid var(--gray);
    border-radius: 12px;
    padding: 2rem;
}

.book-card h3 {
    font-family: var(--font);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* =============================================
   Service List (Step 1)
   ============================================= */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--dark);
    border: 2px solid var(--gray);
    border-radius: 8px;
    transition: all var(--transition);
}

.service-option:hover {
    border-color: var(--silver);
    transform: translateX(4px);
}

.service-info h4 {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.service-info p {
    color: var(--silver);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.service-duration {
    font-size: 0.75rem;
    color: var(--silver);
    background: var(--gray);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

/* =============================================
   Selected Service (Step 2)
   ============================================= */
.selected-service {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--dark);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.selected-service h4 {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.selected-service span {
    color: var(--silver);
    font-size: 0.875rem;
}

/* =============================================
   Calendar - Month Navigation (90-day booking)
   ============================================= */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.cal-month-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.cal-nav-btn {
    background: var(--dark);
    border: 1px solid var(--gray);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--chrome);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-nav-btn:hover:not(:disabled) {
    border-color: var(--silver);
    color: var(--white);
}

.cal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cal-nav-btn svg {
    display: block;
}

/* Calendar Day Headers */
.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.calendar-days-header span {
    font-size: 0.7rem;
    color: var(--silver);
    text-transform: uppercase;
    padding: 0.25rem 0;
}

/* Calendar Grid (Month View) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 2rem;
}

/* CRITICAL: Ensure date grid stacks children vertically */
.date-grid,
#dateGrid {
    display: block;
    width: 100%;
}

.calendar-grid .date-btn {
    min-height: 44px;
    padding: 0.5rem 0.25rem;
}

.calendar-grid .date-btn.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-grid .date-btn .day-name {
    display: none;
}

/* =============================================
   Date Grid
   ============================================= */
.date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    background: var(--dark);
    border: 1px solid var(--gray);
    border-radius: 8px;
    color: var(--chrome);
    cursor: pointer;
    transition: all var(--transition);
}

.date-btn:hover:not(:disabled):not(.empty) {
    border-color: var(--silver);
}

.date-btn.selected {
    background: var(--chrome);
    border-color: var(--chrome);
    color: var(--black);
}

.date-btn:disabled,
.date-btn.closed {
    opacity: 0.3;
    cursor: not-allowed;
}

.day-name {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--silver);
    margin-bottom: 0.25rem;
}

.date-btn.selected .day-name {
    color: var(--black);
}

.day-num {
    font-size: 1rem;
    font-weight: 600;
}

.date-btn.selected .day-num {
    color: var(--black);
}

/* =============================================
   Time Grid
   ============================================= */
.time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.time-btn {
    padding: 0.875rem;
    background: var(--dark);
    border: 1px solid var(--gray);
    border-radius: 8px;
    color: var(--chrome);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.time-btn:hover {
    border-color: var(--silver);
}

.time-btn.selected {
    background: var(--chrome);
    border-color: var(--chrome);
    color: var(--black);
}

.empty-slots {
    text-align: center;
    padding: 2rem;
    color: var(--silver);
}

/* =============================================
   Book Actions
   ============================================= */
.book-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.book-actions .btn {
    flex: 1;
}

/* =============================================
   Summary Box (Step 3)
   ============================================= */
.summary-box {
    background: var(--dark);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray);
    color: var(--chrome);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span:first-child {
    color: var(--silver);
}

.summary-row.total {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--white);
}

.summary-row.total span:first-child {
    color: var(--chrome);
}

.booking-as {
    color: var(--chrome);
    margin-bottom: 1.5rem;
}

/* =============================================
   Success Card
   ============================================= */
.success-card {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--success);
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-card h2 {
    margin-bottom: 0.5rem;
}

.success-card > p {
    color: var(--silver);
    margin-bottom: 1.5rem;
}

.confirmation-code {
    font-family: monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--chrome);
    background: var(--dark);
    padding: 1rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: inline-block;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* =============================================
   Account Choice (Step 3)
   ============================================= */
.selected-summary {
    text-align: center;
    padding: 1.5rem;
    background: var(--dark);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.selected-summary h4 {
    font-family: var(--font);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.selected-summary p {
    color: var(--silver);
    font-size: 0.9375rem;
    margin: 0;
}

.account-choice h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.choice-options {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.choice-card {
    flex: 1;
    background: var(--dark);
    border: 1px solid var(--gray);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: border-color var(--transition);
}

.choice-card:hover {
    border-color: var(--silver);
}

.choice-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chrome);
}

.choice-icon.guest {
    color: var(--silver);
}

.choice-icon svg {
    width: 28px;
    height: 28px;
}

.choice-card h4 {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.choice-card > p {
    color: var(--silver);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.choice-sub {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--silver);
}

.choice-sub a {
    color: var(--chrome);
}

.choice-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.choice-divider::before,
.choice-divider::after {
    content: '';
    width: 1px;
    height: 40px;
    background: var(--gray);
}

.choice-divider span {
    padding: 0.75rem 0;
    color: var(--silver);
    font-size: 0.875rem;
}

/* =============================================
   Guest Fields
   ============================================= */
.guest-fields {
    margin-bottom: 1rem;
}

.guest-fields h4 {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.required-note {
    color: var(--silver);
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--silver);
}

.email-note {
    color: var(--silver);
    font-size: 0.9375rem;
    margin-top: 1rem;
}

/* =============================================
   Appointment Page
   ============================================= */
.confirmed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 50px;
    color: #5cb85c;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.confirmed-badge svg {
    width: 18px;
    height: 18px;
}

.appointment-details {
    background: var(--dark);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--gray);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--silver);
}

.detail-value {
    font-weight: 500;
    color: var(--white);
}

.detail-value.code {
    font-family: monospace;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
    color: var(--chrome);
}

.detail-value.price {
    font-size: 1.25rem;
    font-weight: 700;
}

.appointment-actions {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    color: #fff;
}

/* =============================================
   Cancel Modal
   ============================================= */
.cancel-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cancel-modal.active {
    display: flex;
}

.cancel-modal-content {
    background: var(--charcoal);
    border: 1px solid var(--gray);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.cancel-modal-content h3 {
    margin-bottom: 0.5rem;
}

.cancel-modal-content p {
    color: var(--silver);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions .btn {
    flex: 1;
}

/* =============================================
   Result Icons
   ============================================= */
.result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon svg {
    width: 40px;
    height: 40px;
}

.result-icon.error {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.result-icon.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.error-card {
    text-align: center;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .step-line {
        display: none;
    }
    
    .step-text {
        display: none;
    }
    
    .step-num {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .date-grid,
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.25rem;
    }
    
    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .choice-options {
        flex-direction: column;
    }
    
    .choice-divider {
        width: 100%;
        height: auto;
        flex-direction: row;
    }
    
    .choice-divider::before,
    .choice-divider::after {
        width: auto;
        height: 1px;
        flex: 1;
    }
}

@media (max-width: 600px) {
    /* Calendar container - ensure it doesn't overflow */
    .date-grid,
    #dateGrid {
        width: 100%;
        overflow: hidden;
    }
    
    /* Calendar header - stack properly */
    .calendar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1rem;
        padding: 0;
        width: 100%;
    }
    
    .cal-month-name {
        font-size: 0.9rem;
        text-align: center;
        flex: 1;
    }
    
    .cal-nav-btn {
        padding: 0.4rem;
        flex-shrink: 0;
    }
    
    .cal-nav-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Day headers - compact */
    .calendar-days-header {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
        margin-bottom: 0.5rem;
    }
    
    .calendar-days-header span {
        font-size: 0.6rem;
        padding: 0.25rem 0;
        text-align: center;
    }
    
    /* Calendar grid - compact cells */
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
        margin-bottom: 1.5rem;
    }
    
    .calendar-grid .date-btn,
    .date-btn {
        min-height: 40px;
        padding: 0.25rem;
        border-radius: 6px;
    }
    
    .calendar-grid .date-btn .day-num,
    .date-btn .day-num {
        font-size: 0.85rem;
    }
    
    .date-btn .day-name {
        font-size: 0.5rem;
    }
    
    /* Time grid adjustments */
    .time-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.375rem;
    }
    
    .time-btn {
        padding: 0.625rem 0.25rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .book-section {
        padding: 6rem 0 2rem;
    }
    
    .book-card {
        padding: 1.25rem;
    }
    
    .book-card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Service selection */
    .service-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .service-price {
        font-size: 1.25rem;
    }
    
    /* Selected service header */
    .selected-service {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .selected-service h4 {
        font-size: 0.9rem;
    }
    
    .selected-service span {
        font-size: 0.8rem;
    }
    
    .selected-service .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Calendar - even more compact */
    .calendar-grid .date-btn,
    .date-btn {
        min-height: 36px;
        padding: 0.2rem;
        border-radius: 4px;
    }
    
    .calendar-grid .date-btn .day-num,
    .date-btn .day-num {
        font-size: 0.8rem;
    }
    
    /* Time grid - 2 columns on very small screens */
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .time-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Book actions */
    .book-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }
    
    /* Success card */
    .success-card {
        padding: 2rem 1rem;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .confirmation-code {
        font-size: 1.5rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Choice cards (login/guest) */
    .choice-card {
        padding: 1.5rem;
    }
    
    .choice-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
    }
    
    .choice-icon svg {
        width: 22px;
        height: 22px;
    }
    
    /* Appointment actions */
    .appointment-actions {
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    /* Extra small phones */
    .book-card {
        padding: 1rem;
    }
    
    .calendar-grid .date-btn,
    .date-btn {
        min-height: 32px;
    }
    
    .calendar-grid .date-btn .day-num,
    .date-btn .day-num {
        font-size: 0.75rem;
    }
    
    .cal-month-name {
        font-size: 0.85rem;
    }
}