/* Enhanced Menu Styles with Bootstrap Features */

/* Calendar Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #dee2e6;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.calendar-day-header {
    background-color: #6c757d;
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.calendar-day {
    background-color: white;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.calendar-day:hover:not(.empty):not(.past):not(.today) {
    background-color: #e9ecef;
    transform: scale(1.05);
}

.calendar-day.today {
    background-color: #007bff !important;
    color: white !important;
    font-weight: bold;
    box-shadow: 0 0 0 2px #0056b3;
}

.calendar-day.today::after {
    content: "امروز";
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.6rem;
    background-color: rgba(255,255,255,0.9);
    color: #007bff;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: bold;
}

.calendar-day.past {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-day.past:hover {
    background-color: #f8f9fa !important;
    transform: none !important;
}

.calendar-day.selected {
    background-color: #28a745 !important;
    color: white !important;
    font-weight: bold;
}

.calendar-day.empty {
    background-color: #f8f9fa;
    cursor: default;
}

/* Table Calendar Styles */
.table-calendar {
    font-size: 0.875rem;
}

.table-calendar .today-row {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-left: 4px solid #007bff !important;
}

.table-calendar .today-row td {
    font-weight: bold;
    color: #007bff;
}

.table-calendar .past-row {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.table-calendar .past-row td {
    color: #6c757d;
}

.table-calendar .time-slot {
    text-align: center;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-calendar .time-slot:hover {
    background-color: #e9ecef;
}

.table-calendar .time-slot.available {
    background-color: #d4edda;
    color: #155724;
}

.table-calendar .time-slot.available:hover {
    background-color: #c3e6cb;
}

.table-calendar .time-slot.booked {
    background-color: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
}

.table-calendar .time-slot.past {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.table-calendar .time-slot.past:hover {
    background-color: #f8f9fa !important;
}

/* Fix Menu List Styling */
.menu-inner,
.menu-sub {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.menu-inner li,
.menu-sub li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.menu-inner li::before,
.menu-sub li::before {
    display: none !important;
}

/* Menu Search Enhancement */
.menu-search-container {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.05);
}

.menu-search-container .input-group-text {
    border-color: transparent;
    background: transparent;
}

.menu-search-container .form-control {
    border-color: transparent;
    background: transparent;
    color: inherit;
}

.menu-search-container .form-control:focus {
    box-shadow: none;
    border-color: var(--bs-primary);
    background: rgba(255,255,255,0.1);
}

/* Enhanced Menu Items with Hover Effects */
.menu-item .menu-link {
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
}

.menu-item .menu-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(2px);
}

.menu-item.active .menu-link {
    background: var(--bs-primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Badge Animations */
.menu-item .badge {
    transition: all 0.3s ease;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.menu-item .badge:hover {
    transform: scale(1.1);
}

/* Menu Toggle Arrow Animation */
.menu-toggle::after {
    transition: transform 0.3s ease;
}

.menu-item.open .menu-toggle::after {
    transform: translateY(-50%) rotate(90deg);
}

/* Sub Menu Animation */
.menu-sub {
    transition: all 0.3s ease;
    overflow: hidden;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.menu-sub li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.menu-sub li::before,
.menu-sub li::after {
    display: none !important;
    content: none !important;
}

.menu-sub .menu-link {
    padding-right: 2rem;
    transition: all 0.2s ease;
}

.menu-sub .menu-link:hover {
    background: rgba(255,255,255,0.05);
    padding-right: 2.5rem;
}

/* Responsive Menu Enhancements */
@media (max-width: 1199.98px) {
    .menu-search-container {
        display: none !important;
    }
    
    .menu-item .menu-link {
        margin: 0.125rem 0.25rem;
    }
    
    .menu-item .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 767.98px) {
    .menu-item .menu-link {
        margin: 0.1rem 0.25rem;
        padding: 0.5rem 0.75rem;
    }
    
    .menu-icon {
        font-size: 1.1rem;
    }
    
    .menu-item .badge {
        display: none;
    }
}

/* Menu Header Styling */
.menu-header {
    margin: 1rem 0 0.5rem 0;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 0.375rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.menu-header-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.7);
}

/* Menu Divider Enhancement */
.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    margin: 1rem 0.5rem;
}

/* Tooltip Enhancements */
.menu-link[data-bs-toggle="tooltip"] {
    position: relative;
}

/* Loading Animation for Menu Items */
.menu-item.loading .menu-link {
    opacity: 0.6;
    pointer-events: none;
}

.menu-item.loading .menu-link::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Menu Search Results Highlighting */
.menu-item.search-highlight .menu-link {
    background: rgba(255,193,7,0.2);
    border-left: 3px solid var(--bs-warning);
}

.menu-item.search-hidden {
    display: none;
}

/* Dark Theme Adjustments */
[data-bs-theme="dark"] .menu-search-container {
    background: rgba(0,0,0,0.2);
    border-bottom-color: rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .menu-header {
    background: rgba(0,0,0,0.2);
}

[data-bs-theme="dark"] .menu-divider {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Additional Menu List Fixes */
#layout-menu ul,
#layout-menu ul li,
#layout-menu .menu-inner,
#layout-menu .menu-inner li,
#layout-menu .menu-sub,
#layout-menu .menu-sub li {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#layout-menu ul li::before,
#layout-menu ul li::after,
#layout-menu .menu-inner li::before,
#layout-menu .menu-inner li::after,
#layout-menu .menu-sub li::before,
#layout-menu .menu-sub li::after {
    display: none !important;
    content: none !important;
}

/* Ensure no default list styling */
.menu-vertical ul,
.menu-vertical ul li {
    list-style: none !important;
    list-style-type: none !important;
}

/* Fix for any remaining bullet points */
.menu-item,
.menu-item * {
    list-style: none !important;
}

.menu-item::before,
.menu-item::after {
    display: none !important;
    content: none !important;
}
