/**
 * RakkenRakker Custom Styles
 * Extracted from inline styles in index.html for better organization
 */

/* Logo styling */
.logo-icon {
    font-size: 1.5rem;
    color: #1B365D;
    font-weight: 900;
    -webkit-text-stroke: 0.5px #1B365D;
}
.logo-text {
    color: #1B365D;
}

/* Dark mode logo styling */
html[data-bs-theme="dark"] .logo-icon {
    color: #ffffff;
    -webkit-text-stroke: 0.5px #ffffff;
}
html[data-bs-theme="dark"] .logo-text {
    color: #ffffff;
}

/* Custom map marker styling */
.custom-div-icon {
    background: none;
    border: none;
}

/* Wind marker styling - always above boei markers */
.wind-marker-icon {
    background: none;
    border: none;
    z-index: 1000 !important;
}

/* Wind direction arrow styling */
.wind-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    text-shadow: 0px 0px 3px rgba(255,255,255,0.8);
    transition: transform 0.3s ease;
}

/* Weather info in popup styling */
.weather-info {
    background: rgba(13, 110, 253, 0.05);
    border-radius: 6px;
    padding: 8px;
}

html[data-bs-theme="dark"] .weather-info {
    background: rgba(13, 110, 253, 0.1);
}

.popup-content h6 {
    color: #1B365D;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
}

html[data-bs-theme="dark"] .popup-content h6 {
    color: #ffffff;
    border-bottom-color: #495057;
}

/* Bootstrap Icons alignment fix */
.bi {
    width: auto !important;
    height: auto !important;
}

/* Mobile Touch Optimizations for Tablet Race Use */
@media (max-width: 768px) {
    /* Larger touch targets for race-critical buttons */
    .btn {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .btn-xl {
        min-height: 56px;
        font-size: 18px;
        padding: 16px 20px;
    }
    
    /* Map container optimizations */
    #waypoint-map {
        height: 60vh !important;
        touch-action: pan-x pan-y;
    }
    
    /* Leaflet popup optimizations for touch */
    .leaflet-popup-content {
        margin: 16px 20px;
        line-height: 1.6;
        font-size: 14px;
    }
    
    .leaflet-popup-content p {
        margin: 8px 0;
    }
    
    /* Subtle mobile popup positioning improvement */
    .leaflet-popup {
        margin-bottom: 20px;
    }
    
    /* Larger map controls for touch */
    .leaflet-control-zoom a {
        width: 40px !important;
        height: 40px !important;
        line-height: 38px !important;
        font-size: 18px !important;
    }
    
    /* Mobile weather model toggles */
    .weather-models-mobile .btn {
        font-size: 12px;
        padding: 6px 8px;
        min-width: 60px;
    }
    
    .weather-models-mobile {
        flex-wrap: wrap;
    }
    
    /* Status cards touch optimization */
    .card-body {
        padding: 1.5rem;
    }
    
    /* Navigation improvements */
    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Toggle switches larger for touch */
    .form-check-input {
        width: 2rem;
        height: 1rem;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    /* Very small screens - phone landscape mode */
    #waypoint-map {
        height: 50vh !important;
    }
    
    .btn-xl {
        font-size: 16px;
        padding: 14px 18px;
    }
    
    /* Compact status cards */
    .stats-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Smaller weather toggles for phones */
    .weather-models-mobile .btn {
        font-size: 11px !important;
        padding: 4px 6px !important;
        min-width: 50px !important;
    }
}

/* Touch gesture improvements */
.leaflet-container {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    touch-action: pan-x pan-y;
}

/* Prevent text selection during racing */
.race-critical {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Touch feedback for interactive elements */
.btn:active,
.nav-link:active,
.form-check-input:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Larger touch areas for wind legend toggles */
.wind-legend .form-check {
    padding: 8px;
    margin: 4px 0;
}

.wind-legend .form-check-input {
    margin-top: 0.25rem;
}

/* Emergency-style button for critical race actions */
.btn-race-critical {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    border-width: 2px;
    font-weight: 600;
}

.btn-race-critical:active {
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
}

/* Touch device specific optimizations */
.touch-device .leaflet-popup-tip {
    /* Larger popup tip for easier targeting */
    border-width: 12px !important;
}

.touch-device .leaflet-popup-close-button {
    /* Larger close button for easier touch */
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    line-height: 30px !important;
}

.touch-device .custom-div-icon:active {
    /* Subtle visual feedback on touch - no positioning changes */
    opacity: 0.8;
    transition: opacity 0.1s ease;
}

/* Swipe indicator */
.swipe-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.swipe-indicator.show {
    opacity: 1;
}

/* Touch-optimized status cards */
.touch-device .card {
    border-width: 2px;
}

.touch-device .card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Race Mode Indicator Styling */
.race-mode-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.race-mode-indicator.real {
    background: rgba(25, 135, 84, 0.9);
    color: white;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.race-mode-indicator.simulation {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.race-mode-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
    .race-mode-indicator {
        top: 70px;
        right: 15px;
        font-size: 11px;
        padding: 4px 8px;
    }
}