/* Main Styles for Judo Tournament History System */

/* ===== GLOBAL STYLES ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== HEADER STYLES ===== */
header {
    background-color: #003366;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.site-description {
    font-size: 1rem;
    margin: 0.5rem 0 0;
    opacity: 0.8;
}

/* ===== NAVIGATION STYLES ===== */
/* Primary navigation */
.navbar {
    background-color: #0066cc; /* Main blue background */
}

.navbar-brand {
    color: #ffffff !important; /* Ensure brand name is always white */
    font-weight: bold;
}

/* Navigation links - make these clearly visible */
.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important; /* Force white text for all nav links */
    font-weight: 500; /* Slightly bolder text */
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin: 0 2px;
}

/* Active navigation link */
.navbar-dark .navbar-nav .nav-link.active {
    background-color: #004999; /* Darker blue background for active link */
    color: #ffffff !important;
}

/* Hover effect for navigation links */
.navbar-dark .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Slightly lighter on hover */
    color: #ffffff !important;
}

/* Dropdown menus */
.dropdown-menu {
    background-color: #f8f9fa;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: #212529;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #e9ecef;
}

.dropdown-divider {
    border-top: 1px solid #dee2e6;
}

/* Search form */
.navbar .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
}

.navbar .btn-outline-light {
    border-color: #ffffff;
    color: #ffffff;
}

.navbar .btn-outline-light:hover {
    background-color: #ffffff;
    color: #0066cc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-collapse {
        background-color: #0066cc; /* Keep the same color on mobile */
        padding: 1rem;
        border-radius: 0 0 8px 8px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-dark .navbar-nav .nav-link {
        margin-bottom: 5px;
    }
}

/* ===== CARD STYLES ===== */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background-color: #f0f0f0;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.card-header.bg-primary {
    background-color: #0066cc !important;
    color: white;
}

.card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.card-body {
    padding: 15px;
}

/* ===== TABLE STYLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f0f0f0;
    font-weight: 600;
}

tr:hover {
    background-color: #f8f8f8;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.03);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 5px;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

button,
.btn {
    display: inline-block;
    background-color: #003366;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

button:hover,
.btn:hover {
    background-color: #002244;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-outline-primary {
    color: #0066cc;
    background-color: transparent;
    border: 1px solid #0066cc;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #0066cc;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ===== BREADCRUMB STYLES ===== */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

@media (max-width: 768px) {
    .breadcrumb {
        white-space: nowrap;
        overflow-x: auto;
        display: block;
        padding: 0.5rem 1rem;
    }
}

/* ===== TOURNAMENT SPECIFIC STYLES ===== */
.tournament-card {
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
}

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

.tournament-date {
    width: 80px;
    text-align: center;
    border-right: 1px solid #ddd;
    padding-right: 15px;
    margin-right: 15px;
}

.tournament-date .day {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.tournament-date .month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.tournament-date .year {
    font-size: 0.9rem;
}

.tournament-table tr.gold {
    background-color: rgba(255, 215, 0, 0.1);
}

.tournament-table tr.silver {
    background-color: rgba(192, 192, 192, 0.1);
}

.tournament-table tr.bronze {
    background-color: rgba(205, 127, 50, 0.1);
}

/* Weight categories list in tournament view */
.weight-category-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.weight-category-link {
    display: block;
    margin-bottom: 5px;
    text-decoration: none;
}

.weight-category-link:hover {
    text-decoration: underline;
}

/* ===== MEDAL STYLES ===== */
.medal-count {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    margin-right: 5px;
}

.gold-medal {
    background-color: gold;
    color: #333;
}

.silver-medal {
    background-color: silver;
    color: #333;
}

.bronze-medal {
    background-color: #cd7f32;
}

.medal-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

/* ===== COMPETITOR SPECIFIC STYLES ===== */
.profile-header {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.medal-summary {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.medal-count.large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    flex-direction: column;
}

.medal-count .number {
    font-size: 1.5rem;
    line-height: 1;
}

.medal-count .label {
    font-size: 0.8rem;
    margin-top: 3px;
}

.total-medal {
    background-color: #003366;
}

/* ===== CLUB SPECIFIC STYLES ===== */
.club-header {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #003366;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* ===== SEARCH FORM STYLES ===== */
.search-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ===== FILTER SECTION STYLES ===== */
.filter-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.year-badge {
    display: inline-block;
    margin: 3px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.year-badge:hover {
    background-color: #e0e0e0;
}

.year-badge.active {
    background-color: #003366;
    color: white;
}

/* ===== PAGINATION STYLES ===== */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    justify-content: center;
    margin-top: 1.5rem;
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.page-item.active .page-link {
    background-color: #003366;
    border-color: #003366;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #003366;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    z-index: 2;
    color: #0066cc;
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* ===== ALERT STYLES ===== */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* ===== BADGE STYLES ===== */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    color: #fff;
    background-color: #003366;
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

/* ===== ADMIN CONTROLS ===== */
.admin-controls {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* ===== FOOTER STYLES ===== */
footer {
    margin-top: 3rem;
    padding: 1rem 0;
    background-color: #f0f0f0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* ===== PRINT STYLES ===== */
@media print {
    .nav, .admin-controls, .no-print {
        display: none;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    body {
        font-size: 12pt;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus indicators for keyboard navigation */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(0, 102, 204, 0.5);
    outline-offset: 2px;
}