/* Default Light Mode Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #ffffff;
    color: #000000;
    flex-direction: column; /* Stack header and main content vertically */
}

/* Apply Aptos font */
body, .header-title {
    font-family: 'Aptos', sans-serif;
}

/* Header Styling */
header {
    width: 100%;
    text-align: center;
    position: fixed;
    top: 0;
    padding: 10px 0;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* Carma Title Styling */
.header-title {
    font-size: 24px;
    font-weight: 700;
    color: #b0b0b0; /* Light grey color for default mode */
    margin: 0;
    text-align: left;
    padding-left: 20px;
}

/* Dark Mode Header Title */
body.dark-mode .header-title {
    color: #d3d3d3; /* Slightly darker grey for dark mode */
}

/* Login Button Styling */
.login-button {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 8px 16px; /* Keep padding as is */
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 20px; /* Add blank space to the right */
}


.login-button:hover {
    background-color: #333; /* Darker grey on hover */
}

/* Edit Profile Button */
.top-button {
    font-size: 12px;
    padding: 5px 10px; /* Keep padding as is */
    background-color: #555;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 20px; /* Add blank space to the right */
}



.top-button:hover {
    background-color: #333;
}

/* Additional padding to main container to avoid overlap with header */
.login-container {
    margin-top: 70px;
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 300px;
    text-align: center;
    margin: auto;
}

/* Comment Container Styling */
.comment-container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 400px; /* Wider width for comment form */
    text-align: center;
    margin: auto;
margin-top: 150px;
}

/* Input Group Styling */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    text-align: left;
}

.input-group input,
input[type="text"],
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    resize: vertical; /* Allow resizing vertically for longer comments */
}

/* Button Styling for "Comment" and "Lookup Plate" Buttons */
.page-button {
    font-size: 12px;
    padding: 5px 10px;
    background-color: #555; /* Changed from blue to dark grey */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.page-button:hover {
    background-color: #333;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

body.dark-mode .login-container,
body.dark-mode .comment-container,
body.dark-mode .reg {
    background-color: #333333;
    color: #ffffff;
}

body.dark-mode .input-group label {
    color: #ffffff;
}

body.dark-mode header {
    background-color: #121212;
    color: #ffffff;
}

/* Footer Styling for Dark Mode Toggle */
footer {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
}

.dark-mode-toggle {
    font-size: 12px;
    padding: 5px 10px;
    background-color: #555; /* Changed from blue to dark grey */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.dark-mode-toggle:hover {
    background-color: #333;
}

/* Lookup Container Styling */
.lookup-container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 400px;
    text-align: center;
    margin: auto;
}

/* Dark Mode for Lookup Container */
body.dark-mode .lookup-container {
    background-color: #333333;
    color: #ffffff;
}

/* Light Mode: Slightly darker grey for labels */
.input-group label {
    color: #888888; /* Darker grey for light mode */
}

/* Dark Mode: For labels in dark mode */
body.dark-mode .input-group label {
    color: #b0b0b0; /* Light grey for dark mode labels */
}

#comments-container {
    width: 50%;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.comment {
    padding: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.comment p {
    margin: 5px 0;
}

/* Dark Mode for Comments */
body.dark-mode #comments-container {
    background-color: #222222; /* Darker background for dark mode */
    border-color: #444444; /* Darker border for dark mode */
}

body.dark-mode .comment {
    border-bottom: 1px solid #444444;
}

body.dark-mode .comment p {
    color: #d3d3d3; /* Lighter text for dark mode */
}

/* Upvote Button Styling */
.upvote-button {
    background-color: #555; /* Changed from blue to dark grey */
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.upvote-button:hover {
    background-color: #333;
}

/* Modal Styling */
.modal-overlay {
    display: none; /* Hide overlay by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-overlay.active {
    display: block; /* Show overlay when active */
}

.modal {
    display: none; /* Hide modal by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 300px;
}

.modal.active {
    display: block; /* Show modal when active */
}

.modal h2 {
    margin-top: 0;
}

.modal button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #555; /* Changed from blue to dark grey */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal button:hover {
    background-color: #333;
}

/* Dark Mode for Login Modal */
body.dark-mode .modal {
    background-color: #333; /* Dark background for modal */
    color: #fff; /* Light text color */
    border: 1px solid #444; /* Border to match dark theme */
}

body.dark-mode .modal button {
    background-color: #555; /* Dark button background */
    color: #fff; /* Light text */
    border: none;
}

body.dark-mode .modal button:hover {
    background-color: #444; /* Slightly darker button on hover */
}

body.dark-mode .modal input {
    background-color: #444; /* Dark input background */
    color: #fff; /* Light text */
    border: 1px solid #555; /* Input border */
}

body.dark-mode .modal label {
    color: #ddd; /* Light label text */
}

/* Modal Overlay in Dark Mode */
body.dark-mode .modal-overlay {
    background-color: rgba(0, 0, 0, 0.7); /* Slightly darker overlay */
}


/* Comment Box Styling */
.comment-box-container textarea {
    width: 100%; /* Full width of the container */
    height: 100px; /* Fixed height */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none; /* Disable resizing */
    box-sizing: border-box; /* Include padding and border in the width/height calculation */
    overflow: auto; /* Ensure scrolling if content exceeds height */
    background-color: #ffffff; /* Light background */
    color: #000000; /* Dark text */

}

/* Dark Mode Comment Box Styling */
body.dark-mode .comment-box-container textarea {
    background-color: #333333; /* Dark background */
    color: #ffffff; /* Light text */
    border-color: #444444; /* Adjust border for dark mode */
}

/* Submit Button Styling */
.comment-box-container button {
    background-color: #555555; /* Default button color */
    color: #ffffff; /* White text */
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.comment-box-container button:hover {
    background-color: #333333; /* Darker color on hover */
}

/* Dark Mode Submit Button Styling */
body.dark-mode .comment-box-container button {
    background-color: #444444; /* Adjusted color for dark mode */
}

body.dark-mode .comment-box-container button:hover {
    background-color: #222222; /* Darker hover color in dark mode */
}


/* Comment Box Styling */
#comment-box textarea {
    width: 100%;
    height: 100px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    box-sizing: border-box;
    overflow: auto;
    background-color: #ffffff;
    color: #000000;
}

/* Dark Mode Styles for Comment Box */
body.dark-mode #comment-box textarea {
    background-color: #333333;
    color: #ffffff;
    border-color: #444444;
}

/* Submit Button */
#comment-box button {
    background-color: #555555;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

#comment-box button:hover {
    background-color: #333333;
}

/* Dark Mode Submit Button */
body.dark-mode #comment-box button {
    background-color: #444444;
}

/* Position the "Comment" button at the top center */
.top-center-container {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center; /* Align content vertically */
    justify-content: center; /* Center content horizontally */
}

#toggle-comment-button {
    font-size: 12px; /* Match the Edit Profile button font size */
    padding: 5px 10px; /* Match the Edit Profile button padding */
    background-color: #555; /* Same background color */
    color: #fff; /* Same text color */
    border: none;
    border-radius: 5px; /* Same border-radius */
    cursor: pointer;
    margin-right: 0; /* No margin adjustment needed */
}

#toggle-comment-button:hover {
    background-color: #333;
}


#state-plate-container {
    margin-top: 200px ;
    padding: 15px;
    display: flex; /* Use flexbox for layout */
    gap: 10px; /* Space between the fields */
    align-items: center; /* Align items vertically */
    justify-content: flex-start; /* Align items to the start of the row */
    background-color: #f9f9f9; /* Light background */
    border: 1px solid #ddd; /* Light border */
    border-radius: 5px; /* Rounded corners */

}

@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-width: 360px) and (max-width: 768px) {
    #state-plate-container {
        margin-top: 330px !important; /* Ensure sufficient space */
    }
}



@supports (-webkit-touch-callout: none) {
    #state-plate-container {
        margin-top: 450px; /* Increase margin for Safari */
    }
}

/* Style for labels in the container */
#state-plate-container label {
    font-size: 14px;
    color: #000000; /* Ensure label text is visible in light mode */
    margin-right: 5px;
}

/* Style for dropdown and input fields */
#state-plate-container select,
#state-plate-container input {
    flex: 1; /* Make dropdown and input the same width */
    padding: 5px; /* Add padding for better spacing */
    font-size: 14px;
    border: 1px solid #ccc; /* Light border for inputs */
    border-radius: 5px; /* Rounded corners for uniform look */
    background-color: #ffffff; /* White background for fields */
    color: #000000; /* Text color in light mode */

}

/* Focus styles for dropdown and input */
#state-plate-container select:focus,
#state-plate-container input:focus {
    border-color: #555; /* Highlighted border on focus */
    outline: none; /* Remove default outline */

}

/* General Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

/* Dark Mode for State/Plate Section */
body.dark-mode #state-plate-container {
    background-color: #333333; /* Dark background for the container */
    border-color: #444444; /* Dark border */
    color: #ffffff; /* White text for labels */
}

/* Dark Mode for labels */
body.dark-mode #state-plate-container label {
    color: #ffffff; /* White label text in dark mode */
}

/* Dark Mode for dropdown and input fields */
body.dark-mode #state-plate-container select,
body.dark-mode #state-plate-container input {
    background-color: #444444; /* Dark background for fields */
    color: #ffffff; /* White text */
    border: 1px solid #555555; /* Darker border for inputs */
}

/* Placeholder styling in dark mode */
body.dark-mode #state-plate-container select::placeholder,
body.dark-mode #state-plate-container input::placeholder {
    color: #aaaaaa; /* Lighter placeholder text */
}

/* Focus styles in dark mode */
body.dark-mode #state-plate-container select:focus,
body.dark-mode #state-plate-container input:focus {
    border-color: #ffffff; /* White border on focus */
    outline: none;
}

/* Dark Mode for Comment Box */
body.dark-mode #comment-box textarea {
    background-color: #333333; /* Dark background for textarea */
    color: #ffffff; /* White text */
    border-color: #444444; /* Adjusted border for dark mode */
}

/* Placeholder styling for textarea in dark mode */
body.dark-mode #comment-box textarea::placeholder {
    color: #aaaaaa; /* Lighter placeholder text */
}

/* Button styles for Comment Box in dark mode */
body.dark-mode #comment-box button {
    background-color: #555555; /* Dark background for button */
    color: #ffffff; /* White text for button */
    border: none;
    cursor: pointer;
}

/* Hover effect for button in dark mode */
body.dark-mode #comment-box button:hover {
    background-color: #333333; /* Darker hover effect */
}

