/* assets/css/jockey-v2.css */

/* --- 1. CRITICAL UTILITY CLASS --- */
.hidden {
    display: none !important;
}

/* --- 2. Layout & Container --- */
.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.container-title {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    border-left: 5px solid var(--color-secondary);
    padding-left: 1rem;
    font-size: 1.25rem;
}

/* --- 3. Cards --- */
.card {
    background-color: var(--color-white);
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-block: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- 4. Header Section --- */
.header-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d2b18 100%);
    color: var(--color-white);
    padding: 2rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* --- 5. Search Components --- */
.search-container {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 600px;
    /* Limit width for cleaner look */
}

@media (min-width: 768px) {
    .header-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.input-text {
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    width: 100%;
}

.input-text:focus {
    outline: 2px solid var(--color-secondary);
    border-color: transparent;
}

/* --- 6. Buttons --- */
.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--color-secondary-dark);
    color: var(--color-white);
}

/* --- 7. Tables --- */
.table-container {
    overflow-x: auto;
    margin-block: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #eee;
}

.jockey-list-table,
.race-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
    min-width: 600px;
}

.jockey-list-table thead th,
.race-table thead th {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 1rem;
    text-align: left;
    white-space: nowrap;
}

.jockey-list-table td,
.race-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    color: var(--color-text-dark);
    font-size: 0.9rem;
}

.jockey-list-table tbody tr:hover,
.race-table tbody tr:hover {
    background-color: rgba(246, 188, 63, 0.1);
    cursor: pointer;
}

/* Highlight Name */
.jockey-list-table td:nth-child(1) {
    color: var(--color-primary);
    font-weight: 700;
}

/* --- 8. Profile Grid --- */
.profile-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .profile-content {
        grid-template-columns: 2fr 1fr;
        /* Info left, Image right */
    }
}

.profile-details-column p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--color-text-dark);
    border-bottom: 1px dashed #eee;
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.profile-details-column strong {
    color: var(--color-primary);
    margin-right: 0.5rem;
}

.jockey-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 3px solid var(--color-secondary);
    background-color: #f9f9f9;
}

/* --- 9. Stats Table (Center aligned) --- */
.stats-table th,
.stats-table td {
    text-align: center;
}

.stats-table th:first-child,
.stats-table td:first-child {
    text-align: left;
    /* Keep labels left aligned */
}

/* --- 10. Pagination --- */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    color: var(--color-primary);
    background: white;
    cursor: pointer;
}

.pagination button.active,
.pagination button:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* --- 11. Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.modal-header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
}

.close-modal {
    color: var(--color-secondary);
    cursor: pointer;
    font-size: 1.5rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}