/* bitfieldwizard/static/app.css */

/* Global style settings for dark mode */
body {
    background-color: #121212; /* Dark background */
    color: #e0e0e0; /* Light text color for readability */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

main {
    padding: 1.5rem;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items horizontally within main container */
    gap: 1.5rem;
    padding: 0; /* Removed unnecessary side padding */
    max-width: 1200px; /* Constrain the maximum width of the main content */
    margin: 0 auto; /* Center the main content */
}

.bitmask-container,
.settings-tools-container {
    background-color: #1e1e1e; /* Darker section background */
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 1rem;
    width: 100%;
    box-sizing: border-box; /* Ensure padding is included in the width */
    transition: background-color 0.3s ease;
}

.settings-tools-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Style inputs and buttons */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #bbb;
    max-width: 100%;
    overflow: hidden; /* Prevent label text from overflowing */
}

.styled-input,
select,
.table-input {
    width: 100%; /* Ensure inputs fully utilize available space */
    padding: 0.5rem;
    margin-top: 0.5rem; /* Add margin to the top for spacing */
    background-color: #232323;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}

.styled-input.invalid {
    border-color: red;
}

button {
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    outline: none;
}

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

/* Style for table */
.bits-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th,
td {
    padding: 0.75rem;
    text-align: left; /* Left-align text within table cells */
    border-bottom: 1px solid #333;
}

.table-header {
    background-color: #292929;
    color: #e0e0e0;
    font-weight: bold;
}

.bit-row:hover {
    background-color: #262626;
}

.bit {
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bit.active {
    background-color: #007acc;
}

@media (min-width: 768px) {
    /* Align sections side by side for larger screens */
    .main-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start; /* Align panels to the start vertically */
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .bitmask-container,
    .settings-tools-container {
        max-width: 100%; /* Allow full width on small screens */
        margin: 0 auto; /* Center content on smaller screens */
    }
}

a {
    color: #007acc; /* Base color for links */
    text-decoration: none; /* Remove default underline */
    transition: color 0.3s ease; /* Smooth transition for color changes */
}

a:hover {
    color: #005f99; /* Darker color on hover for visual feedback */
    text-decoration: underline; /* Optionally add underline on hover */
}

a:active {
    color: #004466; /* Even darker color for active state */
}

a:visited {
    color: #4b6983; /* Different color for visited links */
}
