:root {
    --rh-dark-blue: #003865;
    --rh-green: #9AD500;
    --rh-white: #FFFFFF;
    --rh-purple: #662D91;
    --rh-gray: #01C6B2;
    --rh-text-gray: #333333;
    --rh-light-gray: #F2F2F2;
}


body {
    font-family: sans-serif;
    margin: 0;
    background-color: var(--rh-light-gray);
    color: var(--rh-text-gray);
    /* prevent horizontal scrollbars on the entire page */
    overflow-x: hidden;
}

#main-header {
    background-color: var(--rh-white);
    color: var(--rh-dark-blue);
    padding: 15px 20px;
    display: flex;
    align-items: center; /* Vertically center logo and title */
    justify-content: center;

    border-bottom: 5px solid var(--rh-green);
}

/* Container for logo and title */
#header-left {
    display: flex;
    align-items: center;
}

/* New Logo Container Styles */
#header-logo {
    /* Ensures the logo takes up space on the left */
    margin-right: 20px;
}

#header-logo img {
    height: 35px; /* Set a fixed height for the logo */
    width: auto;
    display: block; /* Important for layout control */
}

#header-left h1 {
    /* Allow the title to use remaining space */
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#input-container {
    max-width: 350px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

#input-container h2 {
    font-size: 1.2em;
    font-weight: normal;
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}


/* Define the spinning animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* New class: Add this to #input-container when results are visible */
.wide-results {
    max-width: 1100px !important; /* Use wider max-width */
}

/* Results table styles */
.status-in-warranty {
    /* Set text color to a shade of green */
    color: #155724; 
    /* font-weight: bold;  */
}

/* Style for "Out of Warranty" status */
.status-out-warranty {
    /* Set text color to a shade of red */
    color: #97222d; 
    /* Optional: Make the text bold for emphasis and add a lighter background */
    font-weight: bold; 
    /* background-color: #f8d7da; */
}

.status-message {
    color: #dc3545; /* Red color for alerts */
    font-weight: bold;
    padding: 10px 0;
    text-align: center;
}

.limit-message {
    color: #dc3545;
    font-weight: bold;
    margin-top: 10px;
}

/* --- Bulk Lookup View Styles (Now the main input view) --- */
#main-input-view {
    display: block; /* Always visible */
}

#bulk-textarea {
    width: 100%;
    max-width: 300px;
    height: 250px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: monospace; /* Easier to read serial numbers */
    resize: vertical;
}

/* New style for the container holding the button and spinner */
#main-input-view > div[style="overflow: auto;"] {
    display: flex; /* Use Flexbox for easy alignment */
    justify-content: flex-end; /* Pushes the contents (button/spinner) to the right */
    align-items: center; /* Vertically centers the button and spinner */
    margin-top: 20px; /* Provides space above the elements */
}

.button-spinner-container {
    display: flex; /* Makes it a flexible container */
    justify-content: flex-end; /* Pushes the contents (button and spinner) to the right */
    align-items: center; /* Vertically centers the items */
    margin-top: 20px; /* Space above the elements */
}

#bulk-lookup-button {
    width: 150px;
    padding: 12px 15px;
    background-color: #003865;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    /* REMOVE float: right; and margin-top: 20px; */
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s;
}

#loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--rh-light-gray);
    border-top: 3px solid var(--rh-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 15px; /* Spacing between button and spinner */
    /* vertical-align: middle is no longer needed due to align-items: center; */
}

#bulk-lookup-button:hover:not(:disabled) {
    background-color: #003865;
}

#bulk-lookup-button:disabled {
    background-color: #003865;
    cursor: not-allowed;
}

/* --- Results View Styles --- */
#results-view {
    display: none; /* Hidden by default, shown by JS */
}

.results-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-actions button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.3s;
}

#return-button {
    background-color: #003865;
    color: white;
}
#return-button:hover {
    opacity: 0.9;
}

#download-csv-button {
    background-color: #003865;
    color: white;
}
#download-csv-button:hover {
    opacity: 0.9;
}

/* --- Table Styles --- */
#results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0; /* Adjusted for placement inside results-view */
}
#results-table th,
#results-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
#results-table th {
    background-color: var(--rh-light-gray);
    font-weight: bold;
    color: #333;
}