/* Time slots styling */
.time-slot {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #333;
    min-height: 50px;
    position: relative;
}

.time-slot.booked {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
    opacity: 0.7;
}

.slot-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.booked-icon {
    color: #ff6b6b;
    font-size: 0.9rem;
}

.time-slot:not(.booked):hover {
    border-color: #6366F1;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.time-slot.selected {
    background-color: #6366F1;
    color: white;
    border-color: #6366F1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .time-slot {
        padding: 8px 4px;
        font-size: 0.85rem;
        min-height: 45px;
        border-radius: 8px;
    }
    
    .slot-content {
        gap: 4px;
    }
    
    .booked-icon {
        font-size: 0.75rem;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .time-slot {
        padding: 6px 3px;
        font-size: 0.8rem;
        min-height: 40px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .time-slot {
        padding: 10px;
        font-size: 0.9rem;
        min-height: 50px;
    }
}

@media (max-width: 576px) {
    .time-slot {
        padding: 8px;
        font-size: 0.85rem;
        min-height: 45px;
    }
}

/* Add these to your existing styles */
.slot-section {
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-out;
}

.slot-section.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.calendar-date.friday {
    color: #6366F1;
}

.calendar-date.friday .date-month {
    color: #6366F1;
}

/* .calendar-date.partially-booked {
    background-color: rgba(99, 102, 241, 0.1);
} */

.calendar-date.partially-booked .booked-indicator {
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.calendar-date.partially-booked.selected .booked-indicator {
    background: rgba(45, 47, 139, 0.3);
    color: #bcbdff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.calendar-date.fully-booked {
    background-color: #ffebee;
    cursor: not-allowed !important;
    pointer-events: none;
}

.calendar-date.fully-booked .booked-indicator {
    background: rgba(255, 128, 128, 0.1);
    color: #ff8080;
}

.calendar-date.fully-booked .date-month {
    color: #ff8080;
}

/* Add or update these highlight styles */
.highlight {
    background-color: #fff3cd;
    color: #664d03;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Update total amount styles */
.total-amount {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.total-amount h5 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

/* Update slot-total-amount styles */
.slot-total-amount {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0 15px 20px;
}

.slot-total-amount h5 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.slot-total-amount .text-muted {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

/* Update booking summary highlight */
.booking-summary .highlight {
    background-color: #fff3cd;
    color: #664d03;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.loader {
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid #3498db;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.loader.show {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Add this to your existing styles.css */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay.active {
    display: flex;
}

@media screen and (max-width: 480px) {
    /* Hide month text in calendar days on mobile */
    .booked-indicator .desktop-text {
        display: none;
    }

    .booked-indicator .mobile-text {
        display: inline-block;
    }

    /* Make the booked indicator more compact */
    .booked-indicator {
        font-size: 0.7rem;
        padding: 1px 3px;
    }
}

/* Default states (desktop) */
.booked-indicator .desktop-text {
    display: inline-block;
}

.booked-indicator .mobile-text {
    display: none;
}

/* Step 2 Selection Summary */
.selection-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.summary-item span {
    display: inline-block !important; /* Force display */
}

.summary-label {
    color: #666;
    font-weight: 500;
    min-width: 120px; /* Give some minimum width to labels */
}

@media screen and (max-width: 480px) {
    /* .summary-item {
        flex-direction: column;
    } */
    
    .summary-label {
        margin-bottom: 4px;
    }
}

.calendar-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.date-selection-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

#dateSelect {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#dateSelect:focus {
    border-color: #2E8B57;
    box-shadow: 0 0 0 0.25rem rgba(46, 139, 87, 0.1);
}

#dateSelect option:disabled {
    background-color: #fff5f5;
    color: #dc3545;
}

.calendar {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    overflow-x: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.calendar.minimized {
    cursor: pointer;
    border-radius: 8px;
    background-color: #f8f9fa;
    padding: 10px;
    margin-bottom: 20px;
}

.selected-date-summary {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-icon {
    color: #2E8B57;
}

.calendar.minimized:hover {
    background-color: #e9ecef;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .calendar-header h3 {
        font-size: 1.5rem;
    }
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    /* padding: 20px; */
}

.calendar-day-header {
    text-align: center;
    font-weight: 500;
    color: #666;
    padding: 10px;
    font-size: 0.95rem;
}

.calendar-day {
    aspect-ratio: 1;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    /* padding: 15px 10px; */
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 80px;
}

.calendar-day:not(.empty):hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #6366F1;
}

.calendar-day.selected {
    background-color: #6366F1;
    color: white;
    border-color: #6366F1;
}

.date-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.date-number {
    font-size: 1.4rem;
    font-weight: 500;
    margin-top: 5px;
}

.date-month {
    font-size: 0.85rem;
    color: #666;
}

.booked-indicator {
    margin-top: auto;
    font-size: 0.75rem;
    color: #6366F1;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.desktop-text {
    display: block;
}

.mobile-text {
    display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    .desktop-text {
        display: none !important;
    }

    .mobile-text {
        display: block !important;
    }

    .booked-indicator {
        padding: 2px 4px;
        border-radius: 12px;
        margin-top: 2px;
        text-align: center;
    }
}

/* iPhone XR/11/XS Max specific (around 414px) */
@media screen and (max-width: 414px) {
    .booked-indicator {
        font-size: 0.6rem;
        padding: 1px 3px;
    }

    .desktop-text {
        display: none;
    }

    .mobile-text {
        font-size: 0.6rem;
    }
}

.calendar-day.empty {
    background: none;
    border: none;
    cursor: default;
    pointer-events: none;
}

.calendar-day.selected .date-month {
    color: rgba(255, 255, 255, 0.9);
}

.calendar-day.selected .booked-indicator {
    background: white;
    color: #6366F1;
}

/* Mobile styles */
@media (max-width: 768px) {
    .calendar-grid {
        gap: 3px;
        padding: 10px 5px;
    }

    .calendar-day {
        min-height: unset;
        border-radius: 8px;
        padding: 0;
        width: 100%;
        max-width: 52px;
    }

    .calendar-day-header {
        padding: 3px;
        font-size: 0.75rem;
    }

    .date-content {
        padding: 4px 2px;
        gap: 2px;
    }

    .date-number {
        font-size: 0.9rem;
        margin-top: 2px;
    }

    .date-month {
        display: none; /* Hide month text on mobile */
    }

    .booked-indicator {
        font-size: 0.6rem;
        padding: 2px 4px;
        border-radius: 12px;
        margin-top: 2px; /* Add some space since month is hidden */
    }

    .mobile-text {
        display: inline;
    }

    .desktop-text {
        display: none;
    }
}

/* iPhone XR/11/XS Max specific (around 414px) */
@media screen and (max-width: 414px) {
    .calendar-grid {
        gap: 2px;
        padding: 5px 2px;
    }

    .calendar-day {
        max-width: 48px;
        border-radius: 6px;
    }

    .date-content {
        padding: 2px 1px;
    }

    .date-number {
        font-size: 0.85rem;
        margin-top: 1px;
    }

    .date-month {
        display: none; /* Hide month on iPhone */
    }

    .booked-indicator {
        font-size: 0.55rem;
        padding: 1px 3px;
    }

    .desktop-text {
        display: none;
    }
}

/* iPhone 8 and smaller */
@media screen and (max-width: 375px) {
    .calendar-day {
        max-width: 45px;
    }
}

/* Very small devices */
@media screen and (max-width: 320px) {
    .calendar-day {
        max-width: 38px;
    }

    .desktop-text {
        display: none;
    }
}

/* Step Progress Indicator */
.step-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 40px auto;
    max-width: 600px;
    position: relative;
}

/* Line connecting steps */
.step-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

/* Step item */
.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* Step number circle */
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

/* Step label */
.step-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Active step */
.step.active .step-number {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.step.active .step-label {
    color: #4CAF50;
}

/* Completed step */
.step.completed .step-number {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.step.completed .step-label {
    color: #4CAF50;
}

/* Mobile styles for step progress */
@media (max-width: 576px) {
    .step-progress {
        margin: 20px auto;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .step-progress::before {
        top: 16px;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .step-label {
        font-size: 0.7rem;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .step-progress::before {
        top: 14px;
    }
    .desktop-text {
        display: none;
    }
}

/* Fully booked day styling */
.calendar-day.fully-booked {
    background-color: #FFE7E7; /* Light red pastel */
    border-color: #FFD1D1;
    cursor: not-allowed;
    pointer-events: none; /* Prevents clicking */
}

.calendar-day.fully-booked .date-number {
    color: #FF8080;
}

.calendar-day.fully-booked .date-month {
    color: #FF8080;
}

.calendar-day.fully-booked .booked-indicator {
    background: rgba(255, 128, 128, 0.1);
    color: #FF8080;
}

/* Hover effect removal for fully booked days */
.calendar-day.fully-booked:hover {
    transform: none;
    box-shadow: none;
    border-color: #FFD1D1;
}

.validation-error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.validation-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.validation-error .validation-error-message {
    display: block;
}

.date-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
}

.calendar-day.validation-error {
    border-color: #dc3545;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#timeSlots .col{
    padding: 3px;
}

.agreement-notice {
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.5rem;
}

#receiptUploadSection {
    transition: all 0.3s ease;
}

#receiptUploadSection.show {
    opacity: 1;
    transform: translateY(0);
}

#receiptUploadSection.hide {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}