.calendar-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 800px;
    max-width: 800px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 50px !important;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.calendar-header h2 {
    font-size: 1.5rem;
}

.calendar-header button {
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.calendar-header button:hover {
    background-color: #0056b3;
}

.calendar-header button:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    width: 100%;
    text-align: center;
}

.calendar-grid div {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.calendar-grid div:hover {
    background-color: #dcdcdc;
    transform: scale(1.1);
}

.available {
    background-color: #3ee264 !important;
    color: white;
}

.partially-available {
    background-color: #eecd69 !important;
    color: white;
}

.reserved {
    background-color: #d65d69 !important;
    color: white;
}

.form-container {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin-top: 20px;
    display: none;
}

.form-container h3 {
    text-align: center;
    margin-bottom: 20px;
}

.form-container input,
.form-container button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.form-container button {
    color: white;
    cursor: pointer;
    border: none;
    background-color: #28a745;
    transition: background-color 0.3s ease;
}

.form-container button:hover {
    background-color: #218838;
}

.time-slot {
    cursor: pointer;
    text-align: center;
    border: 1px solid #ddd;
    margin: 5px;
    border-radius: 5px;
    width: 80px;
    display: inline-block;
    padding: 5px 10px;
}

.hidden {
    display: none;
}

.day {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 5px;
    line-height: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    background-color: #d3d3d3;
    color: black;
}

.green {
    background-color: #4CAF50 !important;
    color: white;
}

.red {
    background-color: #ff4d4d !important;
    color: white !important;
}

.selected-day {
    border: 2px solid black;
}

.selected-time {
    border: 2px solid black;
}

#back-btn {
    width: auto;
    padding: 5px 10px;
    font-size: 0.9rem;
    margin: 10px 0;
}

.calendar-header button,
#back-btn,
.form-container button,
.calendar-grid .green,
.time-slot.green {
    background-color: #4CAF50 !important;
}

.payment-options-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
    width: auto;
    min-width: 400px;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.payment-option {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background-color 0.2s;
    align-items: start;
    width: 100%;
    justify-content: center; 
}

.payment-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
}

.payment-option-title {
    font-weight: 500;
    color: #000;
    display: block;
    white-space: nowrap;
    text-align: center;
}

.payment-option-description {
    font-size: 0.875rem;
    color: #6c757d;
    display: block;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 768px) {
    .calendar-container {
        max-width: 400px !important;
        margin-top: 50px !important;
    }

    .calendar-grid div {
        font-size: 12px;
        width: 35px !important;
        padding: 0 !important;
    }

    .time-slot {
        font-size: 12px;
        width: 50px !important;
        height: 40px !important;
        line-height: 40px !important;
        padding: 0 10px !important;
    }

    #reservationForm {
        max-width: 350px !important;
    }

    .form-container input,
    .form-container button {
        padding: 0 !important;
        margin: 0 !important;
    }

    .form-container form .row>div {
        margin-bottom: 15px;
    }

    #back-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .calendar-grid {
        gap: 5px;
    }
    
    .payment-options-container {
        padding: 10px;
        min-width: 250px;
        max-width: 90%;
    }
    
    .payment-option {
        padding: 8px;
    }
    
    .payment-option-title,
    .payment-option-description {
        white-space: normal;
    }
}

.gray {
    background-color: #cccccc !important;
    color: #666666 !important;
    pointer-events: none;
}

#selectedDateTime,
.time-slots-container h5, #monthName {
    color: #000 !important;
}

.payment-options-container .payment-options-title {
    color: #000 !important;
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.text-danger {
    color: #dc3545 !important;
}

.form-control:invalid {
    border-color: #dc3545;
}

.payment-option.border-danger {
    border-color: #dc3545 !important;
}
