/* Custom styles for Race Tracker */

.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.badge {
    font-size: 0.8em;
}

.bg-gradient-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.bg-gradient-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

.bg-gradient-warning {
    background: linear-gradient(45deg, #ffc107, #e0a800);
}

.bg-gradient-info {
    background: linear-gradient(45deg, #17a2b8, #138496);
}

.jumbotron {
    padding: 4rem 0;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.navbar-brand {
    font-weight: bold;
}

.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

.progress {
    border-radius: 0.5rem;
}

.modal-body img {
    max-width: 100%;
    height: auto;
}

.img-thumbnail {
    transition: transform 0.2s ease-in-out;
}

.img-thumbnail:hover {
    transform: scale(1.05);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Mobile header tweaks: icon-only navbar on small screens */
@media (max-width: 576px) {
    .navbar { padding-top: 6px; padding-bottom: 3px; }
    .navbar .navbar-brand { font-size: 1rem; line-height: 1.1; display: inline-flex; align-items: center; }
    .navbar .navbar-brand i { font-size: 1rem; margin-right: 6px; }
    .navbar .nav-link { padding-left: 0.5rem; padding-right: 0.5rem; }
    .navbar .nav-link i { font-size: 18px; }
    .navbar .nav-link { color: #fff; }
    .navbar .nav-link span, .navbar .nav-link .text { display: none; }
    .navbar .dropdown-toggle::after { display: none; }
    .navbar-toggler { padding: 2px 8px; font-size: 0.9rem; }
}

/* Larger touch targets for bottom nav */
.bottom-nav .nav-link, .fab-center { touch-action: manipulation; }
.bottom-nav .nav-link { padding: 8px; }

/* Print styles */
@media print {
    .navbar, .btn, .dropdown, .modal {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .bg-primary, .bg-success, .bg-warning, .bg-info {
        color: #000 !important;
        background: #fff !important;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom form styles */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Custom alert styles */
.alert {
    border-radius: 0.5rem;
}

/* Footer styles */
.footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}

/* Statistics page specific styles */
.progress-bar {
    transition: width 0.6s ease;
}

/* Photo gallery styles */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Bottom navigation (mobile) - minimal overrides in central stylesheet */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1080;
    pointer-events: auto;
    background: #ffffff; /* flush opaque footer */
    border-top: 1px solid rgba(0,0,0,0.08);
}
.app-fade-enter {
    opacity: 0;
    transform: translateY(6px);
}
.app-fade-enter-active {
    transition: opacity 320ms ease, transform 320ms ease;
    opacity: 1;
    transform: none;
}
.bottom-nav-inner {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 18px 8px 18px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.photo-item:hover img {
    transform: scale(1.1);
}

/* Add bottom padding to main content so it doesn't scroll under the fixed nav. */
main.container, .container { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
