/* Custom styles for the Wild Sea Swimming app */

/* Override any necessary Bootstrap styles while maintaining dark theme */
:root {
    --swimming-blue: #0d6efd;
    --ocean-blue: #0ea5e9;
    --safe-green: #198754;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
}

/* Ensure proper spacing for mobile */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Custom card styling for better visual hierarchy */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Safety rating colors */
.safety-safe {
    color: var(--safe-green) !important;
}

.safety-caution {
    color: var(--warning-yellow) !important;
}

.safety-danger {
    color: var(--danger-red) !important;
}

/* Tide indicators */
.tide-high {
    color: var(--ocean-blue) !important;
}

.tide-low {
    color: var(--bs-secondary) !important;
}

/* Loading states */
.loading-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive improvements for mobile */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    /* Adjust button sizes on mobile */
    .btn-group-sm .btn, .btn-sm {
        font-size: 0.8rem;
    }
    
    /* Better spacing for cards on mobile */
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    /* Make tab navigation scrollable on very small screens */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
    }
}

/* Accessibility improvements */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

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

::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Toast notifications positioning */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1055;
}

/* Search result hover effects */
.search-result-item {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: var(--bs-gray-800) !important;
}

/* Ensure proper contrast for safety indicators */
.text-success {
    color: #20c997 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #fd7e14 !important;
}

/* Loading spinner customization */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Ensure proper spacing in navigation */
.navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
}

/* Better visual separation */
.border-bottom {
    border-bottom: 1px solid var(--bs-gray-700) !important;
}

.border-top {
    border-top: 1px solid var(--bs-gray-700) !important;
}

/* Custom alert styles */
.alert {
    border: none;
    border-radius: 0.375rem;
    background-color: transparent !important;
    color: white !important;
}

/* Improve button group appearance */
.btn-group .btn {
    border-color: var(--bs-gray-600);
}

.btn-group .btn:hover {
    border-color: var(--bs-gray-500);
}

/* Fix navbar text visibility */
.navbar-brand,
.navbar-brand strong {
    color: #ffffff !important;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.85) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #ffffff !important;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Ensure consistent icon sizing */
.bi {
    font-size: 1em;
    line-height: 1;
}

/* Large display icons */
.display-1 .bi,
.display-4 .bi {
    font-size: 1em;
}

/* Form improvements */
.form-control:focus {
    border-color: var(--swimming-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Tab content styling */
.tab-content {
    background-color: var(--bs-gray-900);
}

/* Breadcrumb styling */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--bs-gray-500);
}

/* Emergency Coast Guard Button Styling */
.emergency-btn {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4) !important;
}

.emergency-btn:hover {
    background-color: #bb2d3b !important;
    border-color: #bb2d3b !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.6) !important;
}

.emergency-btn:active {
    transform: scale(0.98) !important;
}

/* No animation - keeps button visible but not distracting */

/* Mobile responsiveness for emergency button */
@media (max-width: 768px) {
    .emergency-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }
}
