/* Dark themed scrollbar */
::-webkit-scrollbar {
    width: 12px; /* width of the scrollbar */
}

/* Track */
::-webkit-scrollbar-track {
    background: #333; /* color of the track */
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #555; /* color of the handle */
    border-radius: 6px; /* rounded corners */
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #777;
}

::-webkit-scrollbar-corner {
    background: #333; /* Match this with the track background color */
}

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #111;
}

#background-image {
    /* Set SVG as background */
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-image: url('/images/corrugated_steel.svg');
    background-repeat: repeat;
    background-size: cover;
}

h1, h2, h3, h4, h5, h6, label, li, p, button, .directory, .tab, input[type="submit"] {
    font-family: 'Arial', sans-serif;
    color: White
}

label {
    color: #c9c9c9;
}

input[type="text"], input[type="password"], input[type="number"], input[type="email"] {
    padding: 8px 15px;
    border: 1px solid #444;
    border-radius: 5px;
    color: white;
    background-color: #333;
    flex-grow: 1; /* Allow input to grow and fill available space */
    min-width: 0; /* Prevents input from shrinking below its content width */
    box-sizing: border-box;
    box-shadow: inset 0 3px 3px rgba(0, 0, 0, .25);
}

/* Styling for autofilled inputs */
input[type="text"]:-webkit-autofill,
input[type="password"]:-webkit-autofill,
input[type="number"]:-webkit-autofill,
input[type="email"]:-webkit-autofill {
    -webkit-box-shadow: inset 0 3px 3px rgba(0, 0, 0, .25), 0 0 0px 1000px #333 inset;
    -webkit-text-fill-color: white; /* Ensures text color stays white */
    border: 1px solid #444; /* Matches border color */
    border-radius: 5px; /* Matches border radius */
    transition: background-color 5000s ease-in-out 0s;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus {
    border-color: #555;
}

input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

input[type="submit"], button {
    background-color: #c02222;
    color: white;
    padding: 14px 20px;
    border: none;
    margin: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

input[type="submit"]:hover, button:hover {
    background-color: #9e1c1c;
}

/*banner*/
.banner {
    width: calc(100% - 40px); /* Full width */
    height: 75px;
    /*height: 150px;  Adjust height as needed */
    z-index: 1000;
    display: flex;
    gap: 20px;
    background-color: #222;
    padding-left: 20px;
    padding-right: 20px;
    align-items: center;
    position: relative;
    overflow: hidden; /* Prevents image from overflowing */
    box-shadow: 0 0 8px rgba(0,0,0,.5);
}

.banner img {
    position: relative;
    /*height: auto;  Maintain aspect ratio */
    height: 50px;
}

.banner h3 {
    width: 100%;
    text-align: center; /* Centers the text horizontally */
    margin: 0; /* Removes default margin */
    position: relative;
    z-index: 1; /* Ensures the header is above the image if overlapping */
    color: #666;
}

/*hamburger*/
.menu-content ul, .menu-content .menu-footer {
    list-style: none;
    padding: 20px;
    margin: 0;
}

.menu-content ul li, .menu-content .menu-footer li {
    padding: 10px 0;
}

.menu-content ul li a, .menu-content .menu-footer li a {
    color: #c9c9c9;
    text-decoration: none;
    font-size: 18px;
    display: block;
}

.menu-footer {
    margin-top: auto; /* Forces the footer to the bottom */
    width: 100%; /* Ensures it spans the full width of the menu */
}

.menu-content ul li a:hover {
    text-decoration: underline;
}

.hamburger-menu {
    margin-left: auto; /* Pushes the hamburger menu to the right */
}

.hamburger-menu .hamburger {
    font-size: xx-large;    
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.menu-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 998;
    display: none;
}

.menu-content {
    position: fixed;
    top: 0;
    width: fit-content;
    height: 100%;
    background-color: #151515;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* This will push the footer to the bottom */
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 20px;
}

.menu-content a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

.menu-content i {
    margin-right: 10px; /* Adjust the space between the icon and the text */
    min-width: 20px; /* Ensures icons align even if they are different widths */
    text-align: center;
}

.menu-content .nav-text {
    display: inline; /* Keeps the text aligned with the icon */
    user-select: none;
}

#loadingIndicator {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dim the background */
    z-index: 999; /* Ensure it's above other content */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Start fully transparent */
    visibility: hidden; /* Start hidden */
    transition: opacity 0.5s, visibility 0.5s; /* Smooth transition for opacity and visibility */
}

#progressBar {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dim the background */
    z-index: 1005; /* Ensure it's above other content */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Start fully transparent */
    visibility: hidden; /* Start hidden */
    transition: opacity 0.5s, visibility 0.5s; /* Smooth transition for opacity and visibility */
}

.spinner {
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid #00000000; /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.warningText {
    color: #FF5555; 
    text-align:center; 
    font-size: large; 
    font-weight: bold;
    animation: flash_warning 1s linear infinite;
}

@keyframes flash_warning {
    0% { color: #FF5555; }
    50% { color: #FFBB66; }
    100% { color: #FF5555; }
}

/* General styling for the dropdown */
select {
    width: 200px; /* Set the width of the dropdown */
    height: 40px; /* Set the height of the dropdown */
    background-color: #333; /* Dark background color */
    color: #fff; /* Light text color */
    border: 1px solid #555; /* Slightly lighter border for some depth */
    border-radius: 5px;  /*Rounded corners */
    padding: 5px 10px; /* Padding inside the dropdown */
    font-size: 16px; /* Larger text size */
    cursor: pointer; /* Cursor indicates it's clickable */
}

/* Styling for options */
option {
    background-color: #444; /* Darker background for options */
    color: #fff; /* White text for options */
}

/* modal image viewer stuff */

.modal {
    display: none; /* Hidden by default and will be controlled via jQuery */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8); /* Black with opacity */
}

#modalImage {
    max-height: var(--ih) * 70; /* 70% of the viewport height */
    max-width: 100%; /* Full width of the modal content */
    object-fit: contain; /* Ensures image is completely visible */
}

.modal-content {
    position: relative;
    margin: 10% auto;
    padding: 20px;
    width: 80vw;
    max-width: 600px;
    border-radius: 8px;
    text-align: center;
}

.modal-body {
    white-space: pre-wrap; /* Keep text formatting */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.icon-button {
    color: white; /* White color for icons */
    font-size: 28px; /* Larger icons */
    cursor: pointer;
    display: block;
    margin: 20px auto; /* Centering download icon */
}

#downloadImage {
    display: inline-block; /* Only as wide as necessary */
    margin-top: 20px; /* Space from the image */
    padding: 8px 16px; /* Padding for button */
    background-color: #c02222; /* Green background */
    color: white; /* White text */
    text-decoration: none; /* No underline */
    border-radius: 4px; /* Rounded edges */
    cursor: pointer;
}

/* Error Modal Styles */
#forgotPasswordModal, #resetPasswordModal, #multiFactorModal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
}

#errorModal, #popupModal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    overflow: auto;
}

#errorModal .modal-content, #popupModal .modal-content, #forgotPasswordModal .modal-content, #resetPasswordModal .modal-content, #multiFactorModal .modal-content {
    background-color: #222;
    color: #fff;
    width: 80vw;
    padding: 20px;
    border-radius: 15px;
}

/* Main Page Styling */
.page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    height: calc(var(--ih) * 100 - 75px);
}

.span-row {
    display: flex;
    justify-content: space-between; 
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, calc((100% / 3) - 7px))); /* Minimum column width of 150px */
    grid-auto-rows: minmax(200px, calc((100% / 3) - 5px)); /* Minimum row height of 100px */
    height: 100%;
    gap: 10px;
}

.highlighted-button {
    background-color: #225bd6;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.highlighted-button:hover {
    background-color: #1f4597;
}

/* Responsive layout for smaller screens */
@media screen and (max-width: 768px) {
    .banner h3 {
        display: none; /* Hides the text */
    }
}