/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --success-color: #2ecc71;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Navigation Tabs */
.tabs {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-button:hover {
    opacity: 0.8;
}

.tab-button.active {
    color: white;
    border-bottom: 3px solid white;
    font-weight: bold;
}

/* Main Content */
main {
    min-height: 400px;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Two-column layout for home tab */
.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .two-column {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form Styles */
.setup-form .form-group {
    margin-bottom: 15px;
}

.setup-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.setup-form input[type="date"],
.setup-form input[type="time"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.setup-form input[type="date"]:focus,
.setup-form input[type="time"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.setup-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.setup-form button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Schedule List Styles */
.schedule-list-section {
    order: 1;
}

#schedule-list {
    margin-top: 15px;
}

.schedule-item {
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.schedule-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.schedule-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.time-range {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.schedule-actions {
    display: flex;
    gap: 10px;
}

.schedule-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-schedule-btn {
    background-color: var(--primary-color);
    color: white;
}

.view-schedule-btn:hover {
    background-color: #2980b9;
}

.delete-schedule-btn {
    background-color: var(--accent-color);
    color: white;
}

.delete-schedule-btn:hover {
    background-color: #c0392b;
}

/* Schedule Display */
.schedule-display {
    order: 2;
}

#schedule-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.time-slot {
    padding: 10px;
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.time-slot:hover {
    background-color: #dde4e6;
    transform: translateY(-2px);
}

.time-slot.available {
    border-left: 4px solid var(--primary-color);
}

.time-slot.booked {
    border-left: 4px solid var(--accent-color);
    background-color: #fadbd8;
    cursor: not-allowed;
}

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

.modal.active {
    display: block;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--box-shadow);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-button:hover,
.close-button:focus {
    color: #000;
}

/* Booking Form */
#booking-form .form-group {
    margin-bottom: 15px;
}

#booking-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

#booking-form input,
#booking-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

#booking-form textarea {
    height: 100px;
    resize: vertical;
}

#booking-form button {
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    margin-right: 10px;
}

#confirm-booking {
    background-color: var(--success-color);
    color: white;
}

#confirm-booking:hover {
    background-color: #27ae60;
}

/* Booked Slots */
.booked-slot {
    background-color: #f1c40f;
    color: #333;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    border-left: 4px solid #f39c12;
}

.booked-slot h4 {
    margin-bottom: 5px;
    color: #333;
}

.booked-slot p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Cancel Booking Button Styling */
.cancel-booking-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    margin-top: 10px;
}

.cancel-booking-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    section {
        padding: 20px;
    }
    
    #schedule-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .schedule-actions {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.time-slot {
    animation: fadeIn 0.5s ease-out;
}

.time-slot:nth-child(1) { animation-delay: 0.1s; }
.time-slot:nth-child(2) { animation-delay: 0.2s; }
.time-slot:nth-child(3) { animation-delay: 0.3s; }
.time-slot:nth-child(4) { animation-delay: 0.4s; }
.time-slot:nth-child(5) { animation-delay: 0.5s; }
.time-slot:nth-child(6) { animation-delay: 0.6s; }
.time-slot:nth-child(7) { animation-delay: 0.7s; }
.time-slot:nth-child(8) { animation-delay: 0.8s; }