/* Navigation Dropdown Styles */
.nav-menu .dropdown {
    position: relative;
    display: inline-block;
}

.nav-menu .dropdown-toggle {
    cursor: pointer;
}

.nav-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1000;
}

.nav-menu .dropdown:hover .dropdown-menu {
    display: block;
}

.nav-menu .dropdown-menu li {
    display: block;
    padding: 0;
    margin: 0;
}

.nav-menu .dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-menu .dropdown-menu li a:hover {
    background: #f5f5f5;
    color: #000;
}

/* Submenu Styles */
.nav-menu .dropdown-submenu {
    position: relative;
}

.nav-menu .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
}

.nav-menu .dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.nav-menu .dropdown-submenu > a:after {
    content: "\203A";
    float: right;
    margin-left: 8px;
    font-size: 1.2em;
}

/* Admin Calendar Time Slots */
.time-slots-grid { 
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

@media (max-width: 768px) {
    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 5px;
    }

    .time-slot {
        padding: 8px 5px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .date-scroller {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 5px;
    }

    .court-selector {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 5px 0;
        gap: 5px;
    }

    .court-selector .btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

.court-selector .btn.active {
    background-color: #9ab6e0;
    color: white;
}

/* Time Slot Styles */
.time-slot {
    padding: 10px;
    border: 1px solid #ddd;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.time-slot:hover:not(.disabled) {
    background-color: #f8f9fa;
}

.time-slot.selected {
    background-color: #9ab6e0;
    color: white;
    border-color: #9ab6e0;
}

.time-slot.disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Time slot type styles */
.time-slot.booking { 
    background-color: #dbeafe; 
    color: #1e40af;
    border-color: #93c5fd;
}

.time-slot.membership { 
    background-color: #dcfce7; 
    color: #166534;
    border-color: #86efac;
}

.time-slot.coaching { 
    background-color: #fef3c7; 
    color: #92400e;
    border-color: #fcd34d;
}

.time-slot.available { 
    background-color: #ffffff; 
    color: #1f2937;
    border-color: #e5e7eb;
}

/* Tooltip styles */
.time-slot .tooltip-content { 
    display: none; 
    position: absolute; 
    background: #ffffff; 
    color: #1f2937; 
    padding: 8px 12px; 
    border-radius: 6px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000; 
    border: 1px solid #e5e7eb;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
}

.time-slot:hover .tooltip-content { 
    display: block; 
}

/* Legend styles */
.legend-box {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    margin-right: 8px;
    border: 2px solid;
}

.legend-box.available { 
    background-color: #ffffff; 
    border-color: #e5e7eb; 
}

.legend-box.booking { 
    background-color: #dbeafe; 
    border-color: #93c5fd; 
}

.legend-box.membership { 
    background-color: #dcfce7; 
    border-color: #86efac; 
}

.legend-box.coaching { 
    background-color: #fef3c7; 
    border-color: #fcd34d; 
}

/* Remove the old admin calendar styles that were overriding our colors */
.admin-calendar .time-slot.booking { background-color: #dbeafe; color: #1e40af; }
.admin-calendar .time-slot.membership { background-color: #dcfce7; color: #166534; }
.admin-calendar .time-slot.coaching { background-color: #fef3c7; color: #92400e; }
.admin-calendar .time-slot.available { background-color: #ffffff; color: #1f2937; }

/* Date scroller styles */
.date-scroller {
    white-space: nowrap;
    padding: 10px 0;
}

#currentDate {
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}