/* Custom Styles for Smørås Fotball */

/* Floating Action Button (FAB) Styles */
.fab-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9999 !important; /* Force above everything */
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: auto !important; /* Ensure it's clickable */
    display: block !important; /* Force display */
}

.fab-container.fab-hidden {
    transform: translateY(80px);
    opacity: 0;
}

.fab {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4) !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    color: white;
}

.fab:active {
    transform: scale(0.95);
}

.fab i {
    transition: transform 0.3s ease;
    display: block !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: white !important;
}


/* Extra aggressive styles to make the FAB absolutely visible */
body .fab-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    display: block !important;
}

body .fab {
    background: #ff6b35 !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 24px !important;
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Bottom Sheet Styles - Mobile-first approach */
.bottom-sheet {
    position: fixed !important;
    bottom: 0 !important;
    background: white !important;
    border-radius: 16px 16px 0 0 !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s, opacity 0.3s !important;
    z-index: 9998 !important; /* Just below FAB */
    max-height: 80vh !important;
    overflow-y: auto !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    visibility: hidden !important; /* Completely hidden when not active */
    opacity: 0 !important;
}

/* Mobile: Full width */
@media (max-width: 768px) {
    .bottom-sheet {
        left: 0 !important;
        right: 0 !important;
        border-radius: 16px 16px 0 0 !important;
    }
}

.bottom-sheet.active {
    transform: translateY(0) !important;
    visibility: visible !important; /* Make visible when active */
    opacity: 1 !important;
}

.bottom-sheet.scroll-hidden {
    transform: translateY(100%);
}

.bottom-sheet-header {
    padding: 16px 24px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    cursor: grab;
}

.bottom-sheet-header .handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 0 auto 12px;
}

.bottom-sheet-content {
    padding: 20px 24px 40px;
}

.bottom-sheet-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: #333;
    border-radius: 12px;
    transition: all 0.2s ease;
    min-height: 72px; /* Touch-friendly height */
    border: 1px solid transparent;
}

.menu-item:hover {
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-color: #e9ecef;
}

.menu-item:active {
    background: #e9ecef;
    transform: scale(0.98);
}

.menu-item i {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    color: white;
    font-size: 20px;
}

.menu-item-content {
    flex: 1;
}

.menu-item-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
    color: #333;
    display: block;
}

.menu-item-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.3;
    display: block;
}

/* Bottom Sheet Overlay */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997; /* Below bottom sheet but above everything else */
    display: none;
}

.bottom-sheet-overlay.active {
    display: block;
}

/* Responsive adjustments */
/* Mobile optimizations */
@media (max-width: 768px) {
    .fab-container {
        bottom: 16px;
        right: 16px;
    }
    
    .fab {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
    
    .bottom-sheet {
        max-height: 85vh;
    }
    
    .menu-item {
        padding: 14px 16px;
        min-height: 68px;
    }
    
    .menu-item i {
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        margin-right: 14px;
        font-size: 18px;
    }
}

/* Desktop FAB improvements - Compact card in lower right */
@media (min-width: 769px) {
    .fab-container {
        bottom: 24px !important;
        right: 24px !important;
    }
    
    .fab {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
    }
    
    .fab:hover {
        transform: scale(1.1) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
    }
    
    /* Desktop: Compact card in lower right corner */
    .bottom-sheet {
        max-width: 400px !important;
        width: 400px !important;
        right: 24px !important;
        left: auto !important;
        bottom: 100px !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Ensure FAB doesn't interfere with other content */
body {
    padding-bottom: 100px; /* Space for FAB */
}

@media (min-width: 768px) {
    body {
        padding-bottom: 20px; /* Less space on desktop */
    }
}