/*
    ---------------------------------------------------------------------------------
    -- General/Global Styles
    -- Styles that apply to the overall layout, cards, buttons and input elements.
    ---------------------------------------------------------------------------------
*/
.card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.input-text {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    width: 100%;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
}

/*
    ---------------------------------------------------------------------------------
    -- Jockey List Table
    -- Styles for the table that lists jockeys.
    ---------------------------------------------------------------------------------
*/
.jockey-list-table {
    width: 100%;
    border-collapse: collapse;
}

.jockey-list-table th {
    background-color: #004d00;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    z-index: 10;
    /* cursor: pointer; */
    white-space: nowrap;
}

.jockey-list-table th,
.jockey-list-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.jockey-list-table td:nth-child(1) {
    color: var(--color-primary);
    font-weight: bold;
    font-size: larger;
}

.jockey-list-table th:not(:first-child),
.jockey-list-table td:not(:first-child) {
    text-align: center;
}

.jockey-list-table th:last-child,
.jockey-list-table td:last-child {
    text-align: right;
}

/* Zebra striping for table rows */
.jockey-list-table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* Hover effect for table rows */
.jockey-list-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.jockey-link {
    color: var(--primary-color);
}

.pagination {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination a {
    text-decoration: none;
    color: #1f2937;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.pagination a:hover {
    background-color: #f3f4f6;
}

.pagination a.active {
    background-color: #166534;
    color: white;
    border-color: #166534;
}

/*
    ---------------------------------------------------------------------------------
    -- Jockey Profile Page
    -- Styles specifically for the single jockey profile view.
    ---------------------------------------------------------------------------------
*/
.jockey-main-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
}

.jockey-name-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.jockey-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #374151;
}

.jockey-silks {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #facc15;
    border: 1px solid #000000;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.jockey-silks .square-1,
.jockey-silks .square-4 {
    background-color: #000000;
}

/*
    ---------------------------------------------------------------------------------
    -- Profile Layout & Sections
    -- Layout for the photo and stats.
    ---------------------------------------------------------------------------------
*/
.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.jockey-photo-container {
    flex-shrink: 0;
}

.jockey-photo {
    object-fit: cover;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.stats-section {
    flex-grow: 1;
    font-size: 0.875rem;
    color: #4b5563;
}

/* Stats Bar */
.stats-bar {
    background-color: #e5e7eb;
    color: #374151;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Stats Table */
.stats-table-container {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.stats-table th,
.stats-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.stats-table th {
    background-color: #d1d5db;
    font-weight: 600;
    text-transform: uppercase;
}

#jockey-list-container>div.data-state>div.card.jockey-list-container>table>tbody>tr {
    cursor: pointer;
}

.stats-table thead tr th:first-child {
    border-top-left-radius: 0.5rem;
}

.stats-table thead tr th:last-child {
    border-top-right-radius: 0.5rem;
}

.stats-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/*
    ---------------------------------------------------------------------------------
    -- Search & Filter Bar
    -- Styles for the search bar and filter options.
    ---------------------------------------------------------------------------------
*/
.header-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 900px;
}

.search-container .search-select {
    width: max-content;
}

.search-inputs {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.filter-bar {
    background-color: #166534;
    color: white;
    padding: 0.75rem;
    margin-block: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.filter-bar span {
    padding: 0.5rem;
}


.jockey-list-table {
    width: 100%;
    border-collapse: collapse;
}

.jockey-list-table thead th {
    background-color: #166534;
    /* Darker green for the header */
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    z-index: 10;
    /* cursor: pointer; */
    white-space: nowrap;
}

.jockey-list-table th,
.jockey-list-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.jockey-list-table th:not(:first-child),
.jockey-list-table td:not(:first-child) {
    text-align: center;
}

.jockey-list-table th:last-child,
.jockey-list-table td:last-child {
    text-align: right;
}

/* Zebra striping for table rows */
.jockey-list-table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* Hover effect for table rows */
.jockey-list-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.jockey-link {
    color: var(--primary-color);
}

/*
    ---------------------------------------------------------------------------------
    -- Responsive Styles
    -- Media queries to adjust layout for different screen sizes.
    ---------------------------------------------------------------------------------
*/
@media (min-width: 1200px) {
    .profile-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

@media (min-width: 700px) {
    .jockey-photo {
        width: 200px;
        height: 200px;
    }
}

@media (min-width: 768px) {
    .header-section {
        flex-direction: column;
    }
}

@media (min-width: 640px) {
    .search-container {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
}