/* buttons.css */

.floating-nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    background: transparent;
    padding: 0;
}

.nav-content {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Navigation button styles are now handled in map.css for unified header */

.btn-leaderboard {
    position: absolute;
    top: 50px;
    right: 10px;
    z-index: 1000;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--thingvalla-primary);
    border: none;
    border-radius: 5px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Popup close button styling */
.mapboxgl-popup-close-button {
    position: absolute !important;
    right: 4px !important;
    top: 4px !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    font-size: 16px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 3 !important;
    transition: background-color 0.2s ease !important;
}

.mapboxgl-popup-close-button:hover {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Ensure the button is always clickable */
.mapboxgl-popup-close-button:before {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
}

/* Touch-friendly improvements for mobile devices */
@media (hover: none) and (pointer: coarse) {
    /* Ensure all buttons meet 44px minimum touch target */
    .nav-btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .btn-leaderboard {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .score-btn, 
    .logout-btn, 
    .login-btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    /* Larger close button for touch */
    .mapboxgl-popup-close-button {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
        right: 8px !important;
        top: 8px !important;
    }
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
    .nav-btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .floating-nav {
        top: 175px; /* Move below reduced navigation header */
        right: 16px;
    }
}