﻿/* ------------------------------
   Base Styles & Utility
------------------------------ */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Merriweather', serif;
    margin: 0;
    padding: 0;
    background-color: #1B2432;
    color: #000;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

.section-divider {
    border: none;
    height: 40px;
    background: linear-gradient(to right, #1B2432, #888, #1B2432);
    margin: 0;
    border-block: ridge #ff0000;
}

#captcha-display {
    display: inline-block;
    background-color: #1B2432;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid #FF0000;
    border-radius: 6px;
    margin-top: 10px;
    letter-spacing: 5px;
    text-align: center;
}

/* ------------------------------
   Header Styles
------------------------------ */
header {
    background-image: url('/images/0399cropped.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 10px;
    margin-top: 40px;
}

    header h1 {
        font-size: 4rem;
        font-weight: bold;
        text-shadow: 4px 4px 8px rgba(0, 0, 0, 1);
    }

    header p {
        font-size: 2rem;
    }

header2 {
    background-image: url('/images/0399cropped.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

    header2 h1 {
        font-size: 3rem;
        font-weight: bold;
        text-shadow: 4px 4px 8px rgba(0, 0, 0, 1);
    }

    header2 p {
        font-size: 2rem;
    }

/* ------------------------------
   Navigation Bar
------------------------------ */
nav {
    background-color: #000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    font-size: 16px;
    gap: 10px;
    padding: 10px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

    nav a {
        color: white;
        text-decoration: none;
        padding: 10px 15px;
        transition: color 0.3s ease;
    }

        nav a:hover {
            color: #ff0000;
        }

.nav-toggle {
    display: none;
}

.nav-menu {
    display: flex;
    position: static;
    width: 100%;
    justify-content: space-evenly;
    align-items: center;
}

.nav-quote {
    position: relative;
    display: inline-block;
}

    .nav-quote .quote-content {
        display: none;
        position: absolute;
        background-color: #aaaaaa;
        min-width: 250px;
        max-height: 300px;
        overflow-y: auto;
        box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
        z-index: 1000;
        right: 0;
    }

    .nav-quote:hover .quote-content {
        display: block;
    }

    .nav-quote .quote-item {
        padding: 8px 12px;
        border-bottom: 1px solid #ccc;
        font-size: 14px;
    }

        .nav-quote .quote-item:last-child {
            border-bottom: none;
        }

    .nav-quote a {
        text-align: center;
        display: block;
        padding: 10px;
        text-decoration: none;
    }

.dropdown {
    position: relative;
}

.dropbtn {
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    text-align: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #e6e6e6;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 999;
}

    .dropdown-content a {
        color: black;
        padding: 12px 16px;
        display: block;
    }

        .dropdown-content a:hover {
            background-color: #f1f1f1;
        }

.dropdown:hover .dropdown-content {
    display: block;
}

/* ------------------------------
   Banner
------------------------------ */
.banner {
    background-color: #31572C;
    padding: 15px;
    text-align: center;
}

    .banner a {
        color: white;
        font-weight: bold;
        text-decoration: underline;
    }

    .banner a:hover {
        color: #ff0000;
    }

/* ------------------------------
   Footer
------------------------------ */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
}

    footer a {
        color: white;
        text-decoration: none;
        margin: 0 10px;
    }

        footer a:hover {
            color: #ff0000;
        }

/* ------------------------------
   Parts Page Elements
------------------------------ */
.parts-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    overflow-y: hidden;
    margin: 0 50px;
}

    .parts-layout + div button {
        margin-top: 20px;
    }

.diagram-container {
    flex: 2.4;
    height: 60vh;
    overflow-y: scroll;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
    background-color: #aaaaaa;
}

    .diagram-container img {
        width: 90%;
        height: auto;
        object-fit: contain;
        object-position: top center;
    }

.form-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    height: calc(40vh - 20px);
    background-color: #aaaaaa;
    border-block: ridge #ff0000;
}

#data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #aaaaaa;
}

    #data-table th, #data-table td {
        padding: 10px;
        text-align: left;
        border: 1px solid #ccc;
    }

        #data-table td input[type="text"] {
            width: 80%;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

    /* Zebra striping for table rows */
    #data-table tbody tr:nth-child(odd) {
        background-color: #dddddd; /* Light row */
    }

    #data-table tbody tr:nth-child(even) {
        background-color: #cccccc; /* Slightly darker row */
    }

button {
    background-color: #D72638;
    color: white;
    font-size: 1.2rem;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    button:hover {
        background-color: #FFA630;
    }

/* ------------------------------
   Scrollbar Styling
------------------------------ */
.diagram-container::-webkit-scrollbar,
.form-container::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.diagram-container::-webkit-scrollbar-thumb,
.form-container::-webkit-scrollbar-thumb {
    background-color: #D72638; /* Bright red thumb */
    border-radius: 8px;
    border: 3px solid #aaaaaa; /* Creates a padded thumb effect */
}

.diagram-container::-webkit-scrollbar-track,
.form-container::-webkit-scrollbar-track {
    background-color: #eeeeee; /* Lighter background for contrast */
    border-radius: 8px;
}

/* Firefox fallback */
.diagram-container,
.form-container {
    scrollbar-width: thick; /* Makes scrollbar wider */
    scrollbar-color: #D72638 #eeeeee; /* Thumb color, then track color */
}

.diagram-container {
    overflow-y: scroll;
    overflow-x: hidden;
}

.form-container {
    overflow-y: scroll;
    overflow-x: scroll;
}



/* ------------------------------
   Mobile Styles
------------------------------ */
@media screen and (max-width: 768px) {
    nav {
        justify-content: flex-start;
        flex-direction: row;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 2rem;
        padding: 10px 20px;
        cursor: pointer;
        z-index: 1100;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 75%;
        background-color: #000;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 60px 20px 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-x: hidden;
        box-sizing: border-box;
    }

        .nav-menu.open {
            transform: translateX(0);
        }

        .nav-menu a {
            width: 100%;
            padding: 15px 20px;
            border-bottom: 1px solid #333;
            text-align: left;
            display: block;
            box-sizing: border-box;
        }

        .nav-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: rgba(0, 0, 0, 0.5);
            display: none;
            z-index: 900; /* less than nav menu (1000), more than content */
        }

            .nav-overlay.show {
                display: block;
            }


    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        background-color: #111;
        display: none;
        width: 100%;
        box-sizing: border-box;
    }

        .dropdown-content a {
            padding: 12px 20px;
            border-bottom: 1px solid #222;
            background-color: #111;
            color: #fff;
            width: 100%;
            display: block;
            box-sizing: border-box;
        }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .parts-layout {
        flex-direction: column;
        height: auto;
        margin: 10px;
    }

    .diagram-container {
        height: auto;
        padding: 10px;
    }

        .diagram-container img {
            width: 100%;
            max-width: 100%;
            height: auto;
        }

    .form-container {
        height: auto;
        padding: 10px;
        margin-top: 20px;
    }

    #data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }

        #data-table th, #data-table td {
            font-size: 0.9rem;
            padding: 8px;
        }

    .quote-button-wrapper {
        padding: 15px 10px;
    }

        .quote-button-wrapper button {
            width: 90%;
            max-width: 100%;
            font-size: 1.1rem;
        }

    footer {
        font-size: 0.9rem;
        padding: 15px 10px;
    }

        footer a {
            display: inline-block;
            margin: 5px;
        }
}

@media screen and (max-width: 480px) {
    nav {
        padding: 4px 10px;
        height: 48px;
    }

    header {
        margin-top: 60px;
    }

        header h1 {
            font-size: 2rem;
        }

        header p {
            font-size: 1rem;
        }

    .parts-layout {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 180px); /* Viewport minus nav/header/banner/footer */
        margin: 10px;
        overflow: hidden;
    }

    .diagram-container {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        background-color: #aaaaaa;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
    }

        .diagram-container img {
            width: 100%;
            height: auto;
            object-fit: contain;
            touch-action: pan-y;
            pointer-events: auto;
        }

    .form-container {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 10px;
        background-color: #aaaaaa;
        border-block: ridge #ff0000;
    }

    #data-table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
    }

        #data-table th,
        #data-table td {
            font-size: 0.8rem;
            padding: 6px;
            word-wrap: break-word;
        }

        #data-table td {
            word-break: break-word;
        }

    .quote-button-wrapper {
        padding: 15px 10px;
    }

        .quote-button-wrapper button {
            width: 100%;
            font-size: 1rem;
            padding: 10px;
        }

    footer {
        font-size: 0.85rem;
        padding: 15px 10px;
    }

        footer a {
            display: inline-block;
            margin: 4px;
        }
}
