/* Universal */
* {
    scrollbar-width: thin;
    scrollbar-color: #888 #ffffff00;
}

/* WebKit browsers */
*::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
    border: 2px solid transparent;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

#wheelTable .rpo-description {
    text-align: left;
}

.rpo-wrapper {
    width: 250px;
}

.rpo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 8px;
    justify-content: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

.rpo-card {
    padding: 5px;
    width: 100%;
    text-align: center;
    color: white;
    background-color: #333;
    border-radius: 5px;
}

.rpo-card img {
    width: 100%;
    max-width: 580px;
	aspect-ratio: 580 / 327;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
}

.rpo-description {
    text-align: center;
    font-size: 0.9em;
}

.rpo-card-link {
    display: inline-block;
    text-decoration: none;
    width: 100%;
    height: auto;
}

.rpo-card-link:hover .rpo-card {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#loading-animation {
  position: relative;
  width: 100%;
  border-radius: 8px;
}

.shimmer {
    animation: shimmer 1.5s infinite linear;
    background: linear-gradient(to left, #444 8%, #555 18%, #444 33%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    will-change: background-position;
}

.shimmer-box {
    width: 100%;
    border-radius: 8px;
    padding-top: 56.25%;
    height: 0;
    position: relative;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#site-title {
    transition: text-shadow 0.2s ease-in-out, font-size 0.3s ease-in-out; 
    padding-left: 1rem;
    font-size: 2rem;
}

#site-title:hover {
    text-shadow: 4px 8px 16px rgba(0, 0, 0, 0.9);
}

.pagetitle {
    text-align: center;
    text-decoration: underline;
    padding-top: 20px;
    color: white;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1002;
    transition: height 0.3s ease-in-out;
    height: 70px;
    background-color: transparent;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px; 
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 40%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    transition: height 0.3s ease-in-out;
}

.header-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.25));
    z-index: -1;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    transition: height 0.3s ease-in-out;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, rgba(0, 0, 0, 0.7) 65%, rgba(0, 0, 0, 0.3) 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 40%, rgba(0, 0, 0, 0.7) 65%, rgba(0, 0, 0, 0.3) 85%, transparent 100%);
    pointer-events: none;
}

header.header-minimized {
    height: 40px;
}

header.header-minimized::after {
    height: 40px;
}

header.header-minimized .header-background {
    height: 70px;
}

header.header-minimized #site-title {
    font-size: 1.25rem;
}

header.header-minimized .navbar-toggler[aria-expanded="true"] .top-bar {
    transform: rotate(45deg) translate(2px, 4.5px); 
}

header.header-minimized .navbar-toggler[aria-expanded="true"] .bottom-bar {
    transform: rotate(-45deg) translate(2px, -4.5px);
}

header.header-minimized .hamburger-icon {
    width: 20px;
    height: 15px;
}

header.header-minimized .bar {
    height: 2px;
}

header .d-flex.align-items-center {
    transition: height 0.3s ease-in-out;
    height: 100%;
	position: relative;
    z-index: 1005;
}

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 335px;
    height: 100vh;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, top 0.3s ease-in-out, height 0.3s ease-in-out, padding-top 0.3s ease-in-out;
    transform: translateX(-100%);
    background-color: #333;
    color: white;
    padding: 80px 10px 10px 10px;
    z-index: 1001;
}

#sidebar.show {
    transform: translateX(0);
}

#sidebar.header-minimized { 
    top: 0;
    height: 100vh;
	padding-top: 50px;
}

#sidebar .nav-column > .nav-item:first-child,
#sidebar ul.nav > li:first-child {
    width: 100%;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px !important;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    color: white;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    border-radius: 10px;
}

.nav-link:focus {
    color: #787878;
}

.nav-link.active {
    background: #404040;
}

.nav-link:hover {
    color: #787878;
    background: #2b2b2b;
}

.navbar-toggler {
    transition: text-shadow 0.2s ease-in-out, filter 0.2s ease-in-out;
}

.navbar-toggler:hover {
    filter: drop-shadow(4px 8px 16px rgba(0, 0, 0, 0.9));
}

.hamburger-icon {
    display: inline-block;
    width: 25px;
    height: 20px;
    position: relative;
    cursor: pointer;
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out;
}

.bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, height 0.3s ease-in-out;
}

.top-bar {
    top: 2px;
}

.middle-bar {
    top: 50%;
    transform: translateY(-50%);
}

.bottom-bar {
    bottom: 2px;
    top: auto;
}

.navbar-toggler[aria-expanded="true"] .top-bar {
    transform: rotate(45deg) translate(3px, 6px); 
}

.navbar-toggler[aria-expanded="true"] .middle-bar {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .bottom-bar {
    transform: rotate(-45deg) translate(3px, -6px);
}

html, body {
    height: auto;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #2e2e2e;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

h1, h2, h4, p {
    color: white;
}

.i-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 10px;
    background-color: transparent;
    color: white !important;
    text-decoration: none !important;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.i-link a:hover {
    color: #787878 !important;
    background-color: #2b2b2b;
}

/* Ensure it stays white even after being clicked */
.i-link a:visited, 
.i-link a:active {
    color: white;
    text-decoration: none !important;
}

.container {
    width: 95%;
}

.custom-container {
    width: 95%;
    margin: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.custom-container > .row {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.small-dropdown {
    font-size: inherit;
    height: auto;
}

#totalCount {
    color: rgb(103, 103, 103);
    margin: 0;
}

.highlight {
    background-color: #ff7f7f;
}

#sample {
    margin-right: 8px;
    border-radius: 50%;
}

.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.table-responsive {
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

/* Index */
img {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.content {
    flex-grow: 1;
}

.text-legacy {
    color: #535353 !important;
}

.model-btn.text-legacy {
    color: #666 !important;
    border-color: #444 !important;
}

.model-btn.text-legacy:hover {
    color: #888 !important;
    background-color: #2b2b2b;
}

.model-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background-color: #3d3d3d;
    color: white !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.2s ease, background-color 0.2s ease;
    border: 1px solid #444;
    text-align: center;
}

.model-btn:hover {
    color: #787878 !important;
    background-color: #2b2b2b;
}

@media (max-width: 1521px) {
    .model-btn {
        font-size: 0.7rem;
        padding: 10px 5px;
    }
}

/* Corvette Featured Button */
.featured-corvette-btn {
    background: linear-gradient(145deg, #444, #222) !important;
    border: 1px solid #cc0000 !important;
    font-weight: 800 !important;
    letter-spacing: 3px;
}

.featured-corvette-btn:hover {
    background-color: #cc0000 !important;
    color: white !important;
}

.vette-variant-btn {
    font-size: 0.75rem !important;
    background-color: #2b2b2b !important;
    border: 1px dashed #555 !important;
}

.vette-variant-btn:hover {
    border-style: solid !important;
    border-color: #cc0000 !important;
}

/* GMC/Hummer Featured Button */
.featured-gmc-btn {
    background: linear-gradient(145deg, #444, #222) !important;
    border: 1px solid #007bff !important;
    font-weight: 800 !important;
    letter-spacing: 3px;
}

.featured-gmc-btn:hover {
    background-color: #007bff !important;
    color: white !important;
}

.hummer-variant-btn {
    font-size: 0.75rem !important;
    background-color: #2b2b2b !important;
    border: 1px dashed #555 !important;
}

.hummer-variant-btn:hover {
    border-style: solid !important;
    border-color: #007bff !important;
}

/* Escalade Featured Button */
.featured-caddy-btn {
    background: linear-gradient(145deg, #444, #222) !important;
    border: 1px solid #585858 !important;
    font-weight: 800 !important;
    letter-spacing: 3px;
}

.featured-caddy-btn:hover {
    background-color: #585858 !important;
    color: white !important;
}

.caddy-variant-btn {
    font-size: 0.75rem !important;
    background-color: #2b2b2b !important;
    border: 1px dashed #555 !important;
}

.caddy-variant-btn:hover {
    border-style: solid !important;
    border-color: #585858 !important;
}

/* Glowing effect for new features/buttons */
.glow-new-btn {
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.8) !important; /* Premium metallic gold */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4), 
                inset 0 0 5px rgba(212, 175, 55, 0.2);
    animation: border-glow 2s infinite alternate;
}

@keyframes border-glow {
    0% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.3), inset 0 0 3px rgba(212, 175, 55, 0.1);
    }
    100% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.7), inset 0 0 7px rgba(212, 175, 55, 0.3);
    }
}

.footer {
    width: 100%;
    text-align: inherit;
    padding: 0 0 5px;
    color: #858585;
    margin-top: auto;
}

/* Vehicles */
.form-check-label {
    color: white;
}

.form-select.small-dropdown {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: visible;
}

.form-select.small-dropdown optgroup {
    font-weight: bold;
    padding-left: 0 !important;
}

.form-select.small-dropdown optgroup option {
    padding-left: 1.25rem;
}

.form-select.small-dropdown option {
    font-weight: normal;
}

.form-select.small-dropdown option:checked {
    font-weight: bold;
}

.form-select.small-dropdown.active-filter {
    font-weight: bold;
}

.rpo-tag {
    background-color: #f0f0f06a;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: black;
    border: none;
    outline: none;
}

#rpoResults {
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    z-index: 1000;
    width: 100%;
}

#selectedRPOs .rpo-tag {
    font-size: 0.75rem;
}

.stats {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
    margin-bottom: 10px;
}

.pagination .page-link {
    background-color: #444;
    color: white;
    border: 1px solid #555;
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    min-width: 28px;
    text-align: center;
}

.pagination .page-link:hover {
    background-color: #666;
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: #d1d1d1;
    color: black;
    border-color: #d1d1d1;
    font-weight: bold;
}

.pagination .page-item.disabled .page-link {
    color: #888;
    pointer-events: none;
}

.pagination .page-link:focus,
.pagination .page-link:focus-visible {
    outline: 3px solid #d1d1d1;
}

.table-veh {
    font-size: 0.75rem;
    table-layout: auto;
    width: 100%;
}

.table-veh thead th {
    background-color: #2e2e2e;
    color: #fff;
    border-bottom: 2px solid #000;
    padding: 10px;
}

.table-veh td, .table-veh th {
    border: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;
    padding: 5px;
    white-space: nowrap;
}

.table-veh th .dropdown-container {
    display: block;
    width: 100%;
}

.table-veh tbody tr {
    transition: background-color 0.3s ease;
}

.table-veh tbody tr:nth-child(odd) {
    background-color: #ececec;
}

.table-veh tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.table-veh tbody tr:hover {
    background-color: #cacaca;
}

.table-stats-veh {
    font-size: 0.75rem;
    table-layout: auto;
    width: 100%;
}

.table-stats-veh thead th {
    background-color: #2e2e2e;
    color: #fff;
    border-bottom: 2px solid #000;
    padding: 10px;
}

.table-stats-veh td, .table-stats-veh th {
    border: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;
    padding: 5px;
    white-space: nowrap;
}

.table-stats-veh th .dropdown-container {
    display: block;
    width: 100%;
}

.table-stats-veh tbody tr {
    transition: background-color 0.3s ease;
}

.table-stats-veh tbody tr:nth-child(odd) {
    background-color: #ececec;
}

.table-stats-veh tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.table-stats-veh tbody tr:hover {
    background-color: #cacaca;
}

.sortable {
    transition: color 0.2s ease, background-color 0.2s ease;
}

.sortable:hover {
    color: rgb(152, 152, 152);
    background: #4a4a4a;
}

#filterToggle {
    padding: 0.5rem;
    display: inline-flex;
    cursor: pointer;
}

#filterContent {
    overflow: hidden;
    max-height: 0;
}

#filterContent.show {
    max-height: 1000px;
}

#filterIcon {
    color: white;
    margin-left: 0.6rem;
    transition: transform 0.1s ease-out;
    transform: rotate(-90deg);
}

#filterIcon.rotate {
    transform: rotate(0deg);
}

.accounting-format {
    font-feature-settings: "tnum";
    white-space: nowrap;
}

.accounting-format span:first-child {
    margin-right: auto;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Stats */
#barChart {
    max-height: 600px;
    overflow: auto;
    margin-bottom: 20px;
    width: 100%;
    height: 600px !important;
    max-width: 100%;
}

.statsDropdown {
    flex: 1 1 150px;
}

.color-link {
    color: black;
}

/* Search */
#image-warning {
    color: white;
    width: 100%;
    margin-bottom: 2px;
}

.spinner {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid #fff;
    border-left: 4px solid #0008ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.flex-row-wrap {
    display: flex;
    gap: 1px;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 10px;
}

#image-gallery {
    scroll-snap-type: x mandatory;
    display: none;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    max-width: 100%;
    gap: 5px;
    padding: 10px 0 0 0;
}

#image-gallery img {
    scroll-snap-align: center;
    display: inline-block;
}

#image-gallery-shimmer {
  display: flex;
  gap: 5px;
  overflow: hidden;
  width: 100%;
  padding: 10px 0 0 0;
  justify-content: center;
  align-items: center;
}

#image-gallery-shimmer .shimmer-box {
  width: 100px;
  height: 60px;
  padding-top: 0;
  border-radius: 4px;
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to left, #444 8%, #555 18%, #444 33%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  will-change: background-position;
}

#carousel-container {
    box-sizing: border-box;
    flex: 2;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    min-width: auto;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

#carousel-image {
    opacity: 1;
    width: 100%;
    display: none;
    transition: opacity 0.2s ease-in-out;
}

#prev, #next {
    position: absolute;
    top: 40%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 100;
}

#prev { left: 0;}

#next { right: 0;}

.rarity-container {
    display: flex;
    margin-bottom: 15px;
}

.rarity-btn {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.response-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.response {
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: x-large;
}

.window-sticker {
    height: 80vh;
    min-height: 800px;
}

#vinTable, #rpoTable {
    max-width: 80%;
    margin: 0 auto;
    table-layout: fixed;
}

#vinTable td, #rpoTable td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 4.5em;
    line-height: 1.5;
    overflow: hidden;
}

#vinTable td:first-child {
    text-align: left;
}

#vinTable td:nth-child(2) {
    text-align: right;
}

#rpoTable td:first-child {
    text-align: center;
    font-weight: bold;
}

#vinTable td:first-child,
#vinTable th:first-child,
#rpoTable td:first-child,
#rpoTable th:first-child {
    width: 25%;
}

#vinTable td:nth-child(2),
#vinTable th:nth-child(2),
#rpoTable td:nth-child(2),
#rpoTable th:nth-child(2) {
    width: 75%;
}

/* Wheels */
.wheel-image {
    height: 200px;
    width: auto;
}

/* Mobile Styles */
@media (min-width: 768px) and (max-width: 1521px) {
    .about-page .table-veh {
        display: table !important;
        width: 100% !important;
    }

    .wheel-image {
        height: 120px;
    }
}

@media (max-width: 1521px) {
    /* Universal */
    .custom-container {
        padding: 0 10px;
    }

    .custom-container > .row {
        flex-direction: column !important;
    }

    .form-select {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .form-select.small-dropdown {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: visible;
    }

    #top-scroll-wrapper, #bottom-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #top-scroll-wrapper {
        width: 100%;
    }

    #top-scroll {
        display: block;
        height: 8px;
        pointer-events: auto;
        background: transparent;
        cursor: grab;
        box-sizing: border-box;
    }

    #top-scroll:active {
        cursor: grabbing;
    }

    .rpo-container {
        gap: 6px 4px;
    }

    .rpo-wrapper {
        width: 130px;
    }

    .rpo-card {
        width: 100%;
        padding: 3px;
    }

    .rpo-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 580 / 327;
        object-fit: cover;
    }

    .rpo-card p {
        font-size: 0.9em; 
        margin-bottom: 0;
        font-weight: bold;
    }
    
    .rpo-description {
        font-size: 0.75em;
    }

    .footer {
        font-size: 0.75rem;
    }

    .footer .container-fluid {
        display: flex;
    }

    .footer a {
        text-align: right;
    }

    /* Vehicles */
    .form-check {
        margin-bottom: 6px;
    }
    
    #filterToggle h4 {
        font-size: 1rem;
    }
    #filterForm .form-check-input, #filterForm .form-check-label {
        font-size: 0.75rem;
    }

    #filterForm button {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    #filterForm .form-check {
        margin-bottom: 1px;
    }

    .rpo-tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    #rpoSearchInput {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    #rpoResults {
        font-size: 0.8rem;
    }

    .stats {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        font-size: 0.75rem;
        gap: 8px;
    }

    .stats p {
        font-size: 0.75rem;
        margin: 0;
        flex-shrink: 1;
    }

    #limitSelect {
        width: auto;
        min-width: 60px;
        font-size: 0.75rem;
        padding: 4px 8px;
        flex-shrink: 0;
    }

    .table-veh {
        display: block;
        font-size: 0.65rem;
        width: max-content;
        table-layout: auto !important;
    }

    .table-veh td, .table-veh th {
        padding: 4px 6px;
        white-space: nowrap;
    }

    .table-responsive {
        margin: 0 auto;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #vinTable, #rpoTable {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100%;
        table-layout: fixed !important;
        word-wrap: break-word;
    }

    #vinTable, #rpoTable, #colorTable {
        display: table;
    }

    .dropdown-container select {
        min-width: 130px;
        width: 100%;
        font-size: 0.75rem;
        height: auto;
    }

    .pagination-wrapper {
        justify-content: center;
        padding: 0 5px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-link {
        padding: 0.25rem 0.4rem;
        font-size: 0.65rem;
        min-width: 28px;
        text-align: center;
    }
    
    .pagination .page-item {
        flex: 0 0 auto;
    }

    /* Search */
    .flex-row-wrap {
        flex-direction: column;
    }

    .window-sticker {
        height: 20vh;
    }

    /* Stats */
    #barChart {
        height: 400px;
    }
}

/* Desktop Alignment for Header and Sidebar */
@media (min-width: 1522px) {
    header .container-fluid {
        padding-left: 0.75vw;
        padding-right: 0.75vw;
    }

    #sidebar {
        padding-left: 0.75vw;
    }
}