/* Global Typography Standardization */
h2 {
    font-size: 2rem !important; /* 32px */
    font-weight: 700 !important;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem !important; /* 24px */
    font-weight: 600 !important;
    margin-bottom: 1.25rem;
}

.section-header {
    border-bottom: 2px solid var(--bs-border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Content Management Styles (My Cars, My Tracks) */

.search-container {
    position: sticky;
    top: 56px; /* Below the navbar */
    z-index: 1020;
    background: var(--bs-body-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: 1rem;
}

.search-input-group {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    padding-left: 2.5rem;
    border-radius: 50px;
    border: 2px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
}

.progress-container {
    margin-bottom: 2rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.content-table-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    background: var(--bs-body-bg);
}

.content-table thead th {
    background: var(--bs-tertiary-bg);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--bs-border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-table tbody tr {
    transition: all 0.2s ease;
}

.content-table tbody tr:hover {
    background-color: var(--bs-tertiary-bg) !important;
}

.content-table td {
    padding: 1rem !important;
    vertical-align: middle !important;
}

/* Ensure table-hover is active and consistent */
.table-hover tbody tr:hover {
    background-color: var(--bs-tertiary-bg) !important;
}

/* Custom Toggle Switch */
.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.owned-badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 50px;
}

[data-bs-theme="dark"] .content-table-container {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.row-owned {
    background-color: rgba(25, 135, 84, 0.08) !important;
}

[data-bs-theme="dark"] .row-owned {
    background-color: rgba(25, 135, 84, 0.15) !important;
}

.row-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .search-input-group {
        max-width: 100%;
    }
}

.fav-star {
    font-size: 1.25rem;
    color: var(--bs-secondary-color);
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fav-star:hover {
    transform: scale(1.15);
}
.fav-star.is-favorite {
    color: #ffc107 !important;
}

i.fas.fa-star.fav-star.is-favorite {
    color: #ffc107 !important;
}

tr[data-fav-content="Yes"] td:first-child {
    box-shadow: inset 4px 0 0 0 var(--bs-warning) !important;
}

/* Subtle Ownership Backgrounds */
.bg-success-subtle-custom {
    background-color: rgba(25, 135, 84, 0.2) !important;
}
.bg-warning-subtle-custom {
    background-color: rgba(255, 193, 7, 0.25) !important;
}
.bg-danger-subtle-custom {
    background-color: rgba(220, 53, 69, 0.18) !important;
}

[data-bs-theme="dark"] .bg-success-subtle-custom {
    background-color: rgba(25, 135, 84, 0.3) !important;
}
[data-bs-theme="dark"] .bg-warning-subtle-custom {
    background-color: rgba(255, 193, 7, 0.35) !important;
}
[data-bs-theme="dark"] .bg-danger-subtle-custom {
    background-color: rgba(220, 53, 69, 0.28) !important;
}

/* Responsive Table Adjustments for Series/Series Compare */
@media (max-width: 576px) {
    .content-table thead th.text-center {
        font-size: 0.7rem;
        padding: 0.5rem;
    }
    
    .content-table td.text-center {
        padding: 0.5rem !important;
    }

    .ownership-badge {
        min-width: 70px;
        font-size: 0.75rem;
        padding: 0.15rem 0.4rem;
    }
}
