
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    gap: 20px;
    padding: 0 20px;
}

.left-section, .right-section {
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.calendar-section, .booking-section, .cancel-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Timezone selector */
.timezone-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.timezone-selector label {
    font-size: 14px;
    font-weight: 500;
}

.timezone-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    width: 100%;
}

/* Month selector */
.month-year-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.month-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.month-selector label {
    font-size: 14px;
    font-weight: 500;
}

.month-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 120px;
}

/* Calendar */
.calendar {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
}

.day-header {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-right: 1px solid #e0e0e0;
}

.day-header:last-child {
    border-right: none;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover:not(.other-month):not(.disabled) {
    background-color: #f0f8ff;
}

.calendar-day.other-month {
    color: #ccc;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.calendar-day.selected {
    background-color: #007bff;
    color: white;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.has-slots-few::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background-color: #dc3545;
    border-radius: 50%;
}

.calendar-day.has-slots-some::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background-color: #ffc107;
    border-radius: 50%;
}

.calendar-day.has-slots-many::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background-color: #28a745;
    border-radius: 50%;
}

/* Time slots */
.time-slots {
    margin-top: 20px;
}

.time-slots h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.time-slot {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    background: white;
}

.time-slot:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.time-slot.selected {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
}

.calendar-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background-color: #e3f2fd;
    border-radius: 6px;
    font-size: 14px;
    color: #1976d2;
}

/* Forms */
.booking-form, .cancel-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.help-icon {
    font-size: 12px;
    color: #999;
    cursor: help;
}

.form-input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
}

.form-input:disabled {
    background-color: #f8f9fa;
    color: #999;
}

.book-btn, .cancel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.book-btn {
    background-color: #007bff;
    color: white;
}

.book-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.book-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.cancel-btn {
    background-color: #dc3545;
    color: white;
}

.cancel-btn:hover:not(:disabled) {
    background-color: #c82333;
}

.cancel-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-btn:hover {
    background-color: #0056b3;
}

#modalCode {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

#codeDisplay {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #007bff;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        margin: 10px auto;
        padding: 0 10px;
    }
    
    .month-year-selector {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-day {
        min-height: 40px;
        font-size: 14px;
    }
    
    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
    z-index: 100;
}

.footer a {
    color: #007bff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
