/* style.css for VIN Research Hub */

/* --- Global Styles & Typography --- */
html, body {
    height: 100%; /* Ensure html and body take full height */
    min-height: 100vh; /* Ensure html and body take full viewport height */
    margin: 0; /* Remove default body margin */
    padding: 0; /* Remove default body padding */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    overflow-y: auto; /* Allow vertical scrolling for content that exceeds viewport height */
}

body {
    /* REMOVE all background properties from body now.
     * #particles-js will handle the background visually. */
    background: none; /* Explicitly remove any remaining background */
    background-color: #0a192f; /* Fallback for very old browsers or if particles.js fails */


    font-family: 'Signika Negative', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* Primary font with fallbacks */
    color: #cdd6f4; /* Default light text color for dark background, if text is ever directly on body */
    line-height: 1.6; /* Improved readability */
    font-size: 16px; /* Base font size */
    -webkit-font-smoothing: antialiased; /* Smoother fonts on WebKit */
    -moz-osx-font-smoothing: grayscale; /* Smoother fonts on Firefox */
}
#infoButton {
    position: fixed; /* Stays in place when scrolling */
    top: 20px;       /* Distance from the top */
    right: 20px;     /* Distance from the right */
    background-color: #007bff; /* Blue background */
    color: white;    /* White text */
    border: none;
    border-radius: 50%; /* Makes it round */
    width: 40px;     /* Width of the button */
    height: 40px;    /* Height of the button */
    font-size: 1.2em; /* Font size of the 'i' */
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Subtle shadow */
    z-index: 1000;   /* Make sure it's above other content */
    transition: background-color 0.3s ease;
}

#infoButton:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* --- Overlay (Modal) Styles --- */
.overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stays in place */
    z-index: 1001; /* Sits on top of everything else */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if content is too long */
    background-color: rgba(0,0,0,0.6); /* Dim the background content */
    /* Removed background-image, background-size, background-position from here */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
}

.overlay-content {
    background-color: #fefefe; /* Default white background for content box */
    /* NEW: Background image for the overlay content box */
    background-image: url('mustang2.jpeg');
    background-size: cover; /* Scale image to cover the entire content box */
    background-position: center center; /* Center the background image */
    background-repeat: no-repeat; /* Ensure image doesn't repeat */

    margin: auto; /* Centered */
    padding: 25px;
    border-radius: 8px;
    width: 80%; /* Width of the content box */
    max-width: 700px; /* Max width for larger screens */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative; /* For close button positioning */
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Max height to allow scrolling */
    color: #222; /* Make default text darker within the overlay content */
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1); /* Slightly transparent border */
    /* Removed color from here as h2 will be explicitly set */
}

.overlay-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: white; /* UPDATED: Very light color for heading */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7); /* Subtle shadow for readability */
}

.close-button {
    color: white; /* UPDATED: Very light color for close button */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7); /* Subtle shadow for readability */
}

.close-button:hover,
.close-button:focus {
    color: #ccc; /* Darker on hover for interaction */
    text-decoration: none;
}

#updatesContent {
    white-space: pre-wrap; /* Preserves whitespace and line breaks */
    max-height: 40vh; /* Max height for update content before scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid rgba(0,0,0,0.1); /* Slightly transparent border */
    padding: 10px;
    margin-bottom: 20px;
    background-color: rgba(255,255,255,0.8); /* Semi-transparent white background for readability */
    border-radius: 4px;
    color: #333; /* Ensuring the text in updates content is dark */
}

#feedbackSection {
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1); /* Slightly transparent border */
}

#feedbackSection textarea {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical; /* Allow vertical resizing */
    min-height: 80px;
    color: #333; /* Ensure text in textarea is dark */
}

#submitFeedbackBtn {
    background-color: #28a745; /* Green background */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#submitFeedbackBtn:hover {
    background-color: #218838; /* Darker green on hover */
}

/* NEW: Styles for the particles container */
#particles-js {
    position: fixed; /* Fixed position relative to the viewport */
    width: 100%;    /* Full width */
    height: 100%;      /* Full height */
    top: 0;            /* Align to top */
    left: 0;           /* Align to left */
    z-index: -1;       /* Place it behind all other content */
    background-color: #0a192f; /* Background color for the particles canvas (from HTML style) */
    background-image: url(''); /* If you have a background image for particles, specify it here */
    background-size: cover; /* Ensure particles canvas covers the area */
    background-position: 50% 50%; /* Center the background */
    /* IMPORTANT: Do NOT use pointer-events: none; here if you want mouse interaction with particles */
}

/* --- Color Palette (CarMax Inspired) --- */
.carmax-blue-text { color: #00539f; } /* Primary blue text */
.carmax-gold-text { color: #ffc600; } /* Accent gold text */
.bg-carmax-blue { background-color: #00539f !important; } /* Primary blue background */
.bg-carmax-gold { background-color: #ffc600 !important; } /* Accent gold background */

/* --- Main Container --- */
.main-container {
    /* Ensure main-container is positioned above the particles background */
    position: relative; /* Needs a position other than static for z-index to work */
    z-index: 1; /* Ensures it's above z-index: -1 of #particles-js */

    background-color: #fff; /* White background for the main content area - contrasts with dark body */
    /* If you want the particles to subtly show through the main content area,
     * change this to an rgba color with transparency, e.g.: */
    /* background-color: rgba(255, 255, 255, 0.9); */
    color: #333; /* Reset text color for content within the container */
    border-radius: 10px; /* Slightly more pronounced rounded corners */
    /* Reduced top and bottom margins for the main container */
    margin-top: 15px; /* Was 25px */
    margin-bottom: 15px; /* Was 25px */
    padding-top: 20px !important; /* Custom padding */
    padding-bottom: 30px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); /* Slightly enhanced shadow for depth on dark bg */

    max-width: 1200px; /* Or whatever maximum width you prefer */
    margin-left: auto; /* Center the container */
    margin-right: auto; /* Center the container */
    min-height: 100vh; /* Ensure content pushes footer down if needed */
    display: flex; /* Adjust if your layout changes, but keep relative/z-index */
    flex-direction: column;
}

/* Style for elements on top of the particles to ensure visibility */
.header-title-vin, .header-title-research, .logo-text, .manual-select-btn, .vin-input-bar, .identified-make-text, .card, .section-title, p, h1, h2, h4, h5, h6, label, input, button, textarea, ul, li, a {
    position: relative; /* Ensure these elements are above the particles */
    z-index: 2; /* Give them a higher z-index than particles */
    color: #00539f; /* Set a default color for text if it's white particles on a dark background */
}
.text-muted { /* Override default text-muted for visibility on dark background */
    color: rgba(255, 255, 255, 0.75) !important;
}
.card { /* Adjust card background if needed to be transparent or semi-transparent */
    background-color: rgba(255, 255, 255, 0.1); /* Example: semi-transparent white */
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Header Section --- */
.header-title-vin {
    color: #00539f;
    font-weight: 900;
    font-family: 'Chivo', sans-serif;
}
.header-title-research {
    color: #00539f;
    font-weight: 700;
    font-family: 'Chivo', sans-serif;
}
.header-title-hub {
    background-color: #00539f;
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85em;
    vertical-align: middle;
    display: inline-block;
    margin-left: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.header-logo-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.header-logo-area img {
    margin-right: 10px;
}
.logo-text {
    font-size: 1.8em;
    color: #ffc600;
    font-family: Impact, Haettenschweiler, 'Franklin Gothic Bold', 'Arial Black', sans-serif;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* --- Navigation Bar (VIN Input & Manual Select) --- */
.nav-bar-section {
    background-color: #00539f;
    border-radius: 8px;
    margin-left: 0;
    margin-right: 0;
    /* Reduced vertical padding to make this area more compact */
    padding: 15px !important; /* Was 20px */
}

.manual-select-btn {
    background-color: #ffc600 !important;
    color: #003366 !important;
    border: none;
    font-weight: 700;
    transition: background-color 0.2s ease, transform 0.1s ease;
    padding: 1px 15px;
    font-size: 0.95em;
    border-radius: 6px;
}
.manual-select-btn:hover, .manual-select-btn:focus {
    background-color: #e6b400 !important;
    color: #003366 !important;
    transform: translateY(-1px);
}
.dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    padding: 5px 0;
}
.dropdown-item {
    font-weight: 500;
    color: #333;
    padding: 8px 15px;
}
.dropdown-item:hover {
    background-color: #f0f8ff;
    color: #00539f;
}
.dropdown-item:active, .dropdown-item.active {
    background-color: #00539f;
    color: #fff !important;
}

.vin-input-bar {
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    display: flex;
    align-items: stretch; /* Ensure children stretch to the same height */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.vin-input-bar input.form-control {
    border: none;
    text-transform: uppercase;
    font-size: 1em;
    flex-grow: 1;
    padding-top: .5rem;    /* Bootstrap's default vertical padding for form-control-lg is often .5rem */
    padding-bottom: .5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    line-height: 1.5;
    box-sizing: border-box;
    margin: 0; /* Reset margin */
    height: auto; /* Allow padding to determine height */
}
.vin-input-bar input.form-control:focus {
    box-shadow: none;
}
.vin-input-bar:focus-within {
    border-color: #ffc600;
    box-shadow: 0 0 0 0.2rem rgba(255, 198, 0, 0.25), inset 0 1px 3px rgba(0,0,0,0.06);
}
.vin-input-bar .input-group-text { /* Search button styling */
    background-color: #ffc600;
    color: #003366;
    border: none; /* Reset Bootstrap border */
    cursor: pointer;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    padding-top: .5rem; /* Matching vertical padding to the input field */
    padding-bottom: .5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    line-height: 1.5; /* Matching line-height */
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0; /* Reset margin */
    /* height: 100%; Removed as align-items: stretch on parent is preferred */
}
.vin-input-bar .input-group-text:hover {
    background-color: #e6b400;
}
.vin-input-bar .input-group-text i {
    color: #003366;
    font-size: 1.1em;
}

.identified-make-text {
    min-height: 28px;
    color: #00539f;
    font-weight: 700;
    font-size: 1.15em;
    /* Reduced top and bottom margins */
    margin-top: 10px !important; /* Was 15px */
    margin-bottom: 10px !important; /* Was 15px */
}

/* --- Link Sections (General Links on Left & Right Sidebars) --- */
.link-section {
    /* Reduced bottom margin to shrink space between these content blocks */
    margin-bottom: 15px; /* Was 25px */
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
}
.link-section .section-title {
    color: #00539f;
    font-family: 'Chivo', sans-serif;
    font-weight: 700;
    margin-bottom: 18px;
    border-bottom: 3px solid #ffc600;
    padding-bottom: 12px;
    font-size: 1.3em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.link-section ul {
    padding-left: 0;
}
.link-section ul li {
    margin-bottom: 10px;
}
.link-section ul li a {
    color: #00539f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease-in-out, padding-left 0.2s ease-in-out, background-color 0.2s ease-in-out;
    display: block;
    padding: 1px 5px;
    border-radius: 4px;
}
.link-section ul li a:hover {
    color: #ffc600;
    background-color: #f0f8ff;
    padding-left: 10px;
    text-decoration: none;
}

/* --- Accordion for CarMax Search --- */
.accordion-button-style {
    background-color: #00539f;
    color: white;
    border: none;
    width: 100%;
    text-align: left;
    font-weight: 700;
    padding: 15px 20px;
    font-size: 1.1em;
    transition: background-color 0.2s ease;
}
.accordion-button-style:hover, .accordion-button-style:focus {
    background-color: #004080;
    color: white;
}
.accordion .card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}
.accordion .card-header {
    padding: 0;
    background-color: #00539f;
    border-bottom: 1px solid #004080;
}
.accordion .card-header button {
    border-radius: 0;
}
.accordion .card-body {
    background-color: #fdfdff;
    padding: 20px;
}
.search-form input[type="text"] {
    margin-bottom: 12px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 10px;
}
.search-form .options label {
    margin-right: 15px;
    margin-bottom: 8px;
    font-weight: 500;
    display: inline-block;
}
.carmax-search-button {
    background-color: #ffc600;
    color: #003366;
    font-weight: 700;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 1.05em;
}
.carmax-search-button:hover {
    background-color: #e6b400;
    color: #003366;
    transform: translateY(-1px);
}

/* --- Output Box --- */
#outputbox {
    background-color: #e7f3fe;
    color: #004085;
    border: 1px solid #b8daff;
    border-radius: 8px;
    font-weight: 500;
    padding: 20px;
}
#outputbox pre {
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #d1e7fd;
    font-size: 0.9em;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
#outputbox a {
    color: #00539f;
    font-weight: 600;
}
#outputbox a:hover {
    color: #ffc600;
    text-decoration: underline;
}


/* --- Make-Specific Content Sections & Common Div --- */
.make-specific-content {
    padding: 25px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-top: 20px;
    border: 1px solid #e9ecef;
}
.make-specific-content p:first-child {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 1.5rem;
    color: #00539f;
}
.make-specific-content p strong {
    color: #004080;
}
.make-specific-content .card {
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    background-color: #f8f9fa;
    border-radius: 8px;
    height: 100%;
}
.make-specific-content .card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    cursor: pointer;
}
.make-specific-content .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.make-specific-content .card-title {
    color: #00539f;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 0.6rem;
}
.make-specific-content .card-subtitle {
    font-size: 0.8em;
    color: #6c757d;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}
.make-specific-content .card-text {
    font-size: 0.95em;
    color: #495057;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.make-specific-content .card-link {
    color: #00539f;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s ease;
    margin-top: auto;
}
.make-specific-content .card-link:hover {
    color: #ffc600;
    text-decoration: underline;
}
.make-specific-content .card .btn-sm {
    padding: .3rem .8rem;
    font-size: .9rem;
}
.make-specific-content .bg-success .card-title,
.make-specific-content .bg-success .card-subtitle,
.make-specific-content .bg-success .card-text,
.make-specific-content .bg-success .card-link {
    color: #fff;
}
.make-specific-content .bg-warning .card-title,
.make-specific-content .bg-warning .card-subtitle,
.make-specific-content .bg-warning .card-text,
.make-specific-content .bg-warning .card-link {
    color: #212529;
}
.make-specific-content .bg-warning .card-link:hover {
    color: #000;
}

/* Styling for the "visible_div" (Owner's Manuals section) */
#visible_div {
    /* Reduced top margin to bring it closer to the content above */
    overflow: visible 
    margin-top: 15px; /* Was 20px */
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
#visible_div .dropdown .manual-select-btn {
    font-size: 1.1em;
}

/* NHTSA Data Text Area */
#nhtsa_data textarea {
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    background-color: #eef1f5;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    padding: 15px;
    min-height: 150px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}


/* --- Utility Classes --- */
.d-none {
    display: none !important;
}
.d-block { display: block; }
.mb-1 { margin-bottom: 0.25rem !important; }

/* --- Responsive Adjustments --- */
@media (max-width: 767.98px) {
    .main-container {
        margin-top: 15px;
        margin-bottom: 15px;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .header-title-vin, .header-title-research {
        font-size: 1.3rem;
    }
    .header-title-hub {
        font-size: 0.75em;
        padding: 4px 8px;
    }
    .logo-text {
        font-size: 1.4em;
    }
    .nav-bar-section {
        /* Adjusted for mobile also */
        padding: 10px !important; /* Was 15px */
    }
    .nav-bar-section .col-md-4, .nav-bar-section .col-md-8,
    .nav-bar-section .col-lg-3, .nav-bar-section .col-lg-9 {
        padding-left: 5px;
        padding-right: 5px;
    }
    .vin-input-bar input.form-control {
        font-size: 0.9em;
    }
    .vin-input-bar .input-group-text {
        padding: .5rem .75rem;
    }
    .link-section, .make-specific-content {
        /* Adjusted for mobile also */
        padding: 15px;
        margin-bottom: 10px; /* Was 15px for desktop, previously unadjusted for mobile */
    }
    .link-section .section-title {
        font-size: 1.15em;
        padding-bottom: 1px;
        margin-bottom: 15px;
    }
    .accordion-button-style {
        font-size: 1em;
        padding: 12px 15px;
    }
    #left-sidebar-column, #right-sidebar-column, #main-content-column {
        margin-bottom: 15px; /* Was 20px */
        order: initial !important;
    }
    #main-content-column { order: 1 !important; }
    #left-sidebar-column { order: 2 !important; }
    #right-sidebar-column { order: 3 !important; }

}

@media (min-width: 768px) and (max-width: 991.98px) {
    .vin-input-bar input.form-control {
        font-size: 0.95em;
    }
    .link-section .section-title {
        font-size: 1.2em;
    }
}

#dancebkstatic {
    position: relative;
}
