.main {
    display: flex;
    flex-direction: column;
    /* min-height: 100vh; */
    /* CRITICAL FIX: Use flex:1 instead of width:100% to prevent sidebar+main exceeding viewport */
    flex: 1;
    min-width: 0;
    /* Allow flex item to shrink below content size */
    /* overflow: hidden; */
    transition: all 0.25s ease-in-out;
    background-color: #F4F4F5;
    /* Must allow scrolling for sticky elements to work */
    /* overflow-y: auto; */
    height: 100vh;
    /* IMPORTANT: Needs explicit height to control overflow */
    min-height: auto;
    /* Remove 100vh from here if wrapper is 100vh */
    /* overflow-y: auto; */
}

html,
body {
    height: 100%;
    /* Important: Tells the body to fill the screen */
    margin: 0;
    overflow: hidden;
    /* CRITICAL: Disables BODY scrolling */
}

.wrapper {
    /* align-items: stretch; */
    display: flex;
    width: 100%;
    height: 100vh;
}

#page-content-body {
    /* CRITICAL: Allows this div to grow and take up all available space, 
       but also ensures it doesn't push the parent container's height 
       beyond its bounds. */
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* padding: 1rem; */

}

.content-wrapper {
    position: relative;
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

#messages-container {
    position: fixed;
    /* floats on top */
    top: 1rem;
    right: 1rem;
    /* left: 1rem; */
    z-index: 6000;
    /* above everything */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: min(90%, 500px);
    left: 50%;
    transform: translateX(-50%);
}

.video-thumbnail {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.video-thumbnail video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}


.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: white;
    background-color: rgba(254, 3, 0, 0.5);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.media-wrapper {
    position: relative;
    width: 100%;
    /* or set to 540px if you want exact 1080px scaled down */
    aspect-ratio: 3 / 2;
    /* 1080:720 aspect ratio */
    overflow: hidden;
    border-radius: 0.5rem;
    background: #000;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.notif-link {
    /* transition: all 0.2s ease-in-out; */
    /* transition: color 0.2s ease, text-decoration 0.2s ease; */

    transition: font-size 0.2s ease-in-out;

}

.notif-link:hover {
    cursor: pointer;
    font-size: 1.01rem;
    font-weight: 600;
    /* text-shadow: 0 0 .75px rgba(0, 0, 0, 0.6); */
}


/* Custom page */
.custom-container {
    padding: 0 1rem;
}

/* Custom cards */
.custom-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    background-color: #ffffff;
}

/* Table */
.custom-container .table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #6c757d;
    background-color: #f8f9fa;
}

.custom-container .table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

table.service-report th,
table.service-report td {
    border: none;
}

.service-report-heading {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    /* border-bottom: 1px solid #ddd;
    padding-bottom: 4px; */
}

mark {
    padding: 0;
    background-color: rgb(248, 248, 179);
}

#spinner {
    z-index: 2;
    pointer-events: none;
    /* so it doesn't block clicks in the input */
}

.car-card-header {
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
    background-color: #ffffff;
    border-bottom: 0.5px solid rgb(156, 156, 156);
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    /* color: #c71a1a; */
}

.readonly-input {
    background-color: #dcdee1;
    color: #333;
    pointer-events: none;
    border-color: #ced4da;
}


ul.errorlist {
    color: rgb(220, 53, 69);
    list-style: none;
    padding-left: 0;
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

textarea {
    transition: all 0.2s ease;
    width: 100%;
    min-height: 50px;
    resize: vertical;
}

textarea:focus {
    min-height: 500px;
    /* Default for desktop */
}

/* For screens 768px or smaller (commonly considered "mobile") */
@media (max-width: 768px) {
    textarea:focus {
        min-height: 700px;
    }
}

.nav-pills .nav-link {
    border-radius: 30rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    color: #aeaeae;
    /* light grey text for inactive pills */
    /* border: 1px solid #555; */
    /* subtle grey border */
    /* background-color: transparent; */
}

.nav-pills .nav-link.active {
    background-color: #c62828;
    border-color: #c62828;
    color: #fff;
}

.nav-pills .nav-link:hover {
    background-color: rgba(255, 182, 182, 0.7);
    color: #333;
}


.nav-tabs {
    border: none;
    /* Light gray border */
    /* border-radius: 0.5rem; */
    /* Rounded corners */
    /* background-color: #fff; */
    /* White background so it doesn't blend into page */
}

.nav-tabs .nav-link {
    border: 1px solid rgba(255, 182, 182, 0.7);
    border: 1px solid #c62828;

    border-radius: 0.5rem 0.5rem 0 0;
    color: #333;
    background-color: #fff;

}

.nav-tabs .nav-link.active {
    border-bottom-color: transparent;
    border: 1px solid #c62828;
    background-color: #c62828;
    color: #fff;
    /* Slightly different bg for active tab */
}

.nav-tabs .nav-link:hover {
    background-color: rgba(255, 182, 182, 0.7);
    color: #333;
    border: 1px solid #c62828;

}

.hidden {
    display: none;
}

#toast-container>.toast {
    opacity: 1 !important;
}

/* .toast {
    color: #000 !important;
} */


#search-overlay {
    position: fixed;
    top: 0;
    /* Must start below the topbar's fixed height */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    /* Dark transparency */
    z-index: 900;
    /* Higher than main content, lower than the floating search results (1100) */
    display: none;
    /* Initially hidden */
    transition: opacity 0.3s;
}

/* Class to make it visible */
.overlay-visible {
    display: block !important;
}

.highlight-fade {
    /* background-color: #15b391; */
    border: 2px solid #15b391 !important;
    transition: all 0.5s ease;
}


/* .highlight-fade {
    border: 2px solid #15b391 !important;

    border-radius: 4px !important;
    color: #000 !important;

    transition: all 0.5s ease;
} */