/* Custom styles for lichtele_app */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

.font-serif {
    font-family: 'Playfair Display', serif;
}

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

.animate-in {
    animation: fadeIn 0.3s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #FBBF24;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #F59E0B;
}

/* Responsive Tables for Mobile */
.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #FBBF24 #f1f1f1;
}

.table-responsive-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
    background: #FBBF24;
    border-radius: 4px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
    background: #F59E0B;
}

.table-responsive-wrapper table {
    min-width: 100%;
    width: max-content;
}

/* Mobile-specific table styles */
@media (max-width: 768px) {
    .table-responsive-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        /* Add visual indicator for scrollable content */
        position: relative;
    }
    
    .table-responsive-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
        pointer-events: none;
        z-index: 1;
    }
    
    .table-responsive-wrapper table {
        font-size: 0.875rem;
    }
    
    .table-responsive-wrapper th,
    .table-responsive-wrapper td {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    /* Allow text wrapping in specific cells on mobile */
    .table-responsive-wrapper td.text-wrap {
        white-space: normal;
        max-width: 200px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Better touch targets for mobile */
    .table-responsive-wrapper a {
        padding: 0.375rem 0.625rem;
        display: inline-block;
        min-width: 44px;
        text-align: center;
        touch-action: manipulation;
    }
    
    /* Improve readability on small screens */
    .table-responsive-wrapper th {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
}

/* Tablet and medium screens */
@media (min-width: 769px) and (max-width: 1024px) {
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive-wrapper th,
    .table-responsive-wrapper td {
        padding: 0.75rem 1rem;
    }
}

/* Ensure tables are scrollable on all devices */
@media (max-width: 1024px) {
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Dropdown menu z-index fixes - ensure menus always appear above navbars */
.dropdown-menu,
[id*="menu"],
[id*="Menu"],
[class*="dropdown"],
[class*="menu"] {
    z-index: 9999 !important;
}

/* Ensure parent containers don't clip dropdowns */
.relative {
    position: relative;
}

/* Fix for sticky navbars that might clip dropdowns */
nav.sticky,
nav[class*="sticky"] {
    overflow: visible !important;
}

/* Ensure dropdown containers have proper stacking context */
div[class*="relative"] {
    position: relative;
    z-index: auto;
}

/* Specific fix for utilities menu - highest priority */
#desktop-utilities-menu,
#utilities-menu,
#add-event-menu {
    z-index: 9999 !important;
    position: absolute !important;
}

/* Ensure dropdown parent container has high z-index */
div.relative[id*="utilities"],
div.relative:has(> #desktop-utilities-menu),
div.relative:has(> #utilities-menu) {
    z-index: 9999 !important;
    position: relative !important;
}

/* Force dropdown menus to appear above all navbars */
[id="desktop-utilities-menu"],
[id="utilities-menu"] {
    z-index: 9999 !important;
    position: absolute !important;
    isolation: isolate;
}

