.sections-container {
    display: flex;
    /* Use flexbox layout */
    flex-wrap: wrap;
    /* Allow sections to wrap onto new rows */
    gap: 0px 20px;
    /* Space between sections */
    margin: 20px auto;
    /* Center the container */
    width: fit-content;
    max-width: 85vw;
    /* Limit the total width of the container */
    justify-content: center;
    /* Center-align the last row */
}

.section.lines-section,
.section.logo-section {
    flex-basis: 100px;
}

.section {
    flex: 1;
    /* Ensures all sections take up equal width */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 180px;
    max-width: 344px;
    flex-basis: 250px;
}


.section h2 {
    font-size: xx-large;
    color: red;
    margin-bottom: 0px;
    margin-top: 2px;
}

.section h3 {
    color: #333;
    margin-top: 0px;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.controls input {
    display: none;
    /* Hide the radio buttons */
}

/* Tooltip container */
.tooltip-container {
    position: relative;
    display: inline-block;
    width: 50px;
    /* Ensure the container maintains the button's square size */
    height: 50px;
    /* Ensure the container maintains the button's square size */
}

/* Tooltip text */
.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 55px;
    /* Adjusted to hover closer to the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: black;
    color: white;
    text-align: center;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

@media (min-width: 600px) {
    .tooltip-container:hover .tooltip-text {
        /* Ensure tooltips are visible on larger screens */
        visibility: visible;
        opacity: 1;
        /* Tooltips are fully visible */
    }
}

/* Hide tooltips on mobile view */
@media (max-width: 600px) {
    .tooltip-text {
        visibility: hidden;
        /* Tooltips are hidden on mobile */
        opacity: 0;
        /* Ensure tooltips are fully invisible */
    }
}

.color.controls {
    display: flex;
    /* Use flexbox layout */
    flex-wrap: wrap;
    /* Allow buttons to wrap onto new rows */
    gap: 5px;
    /* Space between buttons */
    justify-content: center;
    /* Center-align the buttons */
    align-items: center;
    /* Align buttons vertically */
    width: 100%;
    /* Ensure controls span the full width of the section */
    max-width: 350px;
    /* Limit the total width of the container */
}

/* Button styling */
.color.controls label {
    display: flex;
    /* Use flex layout for the label */
    justify-content: center;
    /* Center-align content inside the label */
    align-items: center;
    /* Align content vertically inside the label */
    cursor: pointer;
    width: 50px;
    /* Ensure buttons remain square */
    height: 50px;
    /* Ensure buttons remain square */
    margin: 0;
    padding: 0;
    border: 2px solid #ccc;
    /* Add a border for visibility */
    border-radius: 5px;
    /* Rounded corners */
    background-color: #fff;
    /* Default background color */
    transition: all 0.3s ease;
    /* Smooth transition for hover effects */
}

/* Highlight the selected color */
.color.controls input[type="radio"]:checked+.tooltip-container {
    outline: 5px solid #007BFF;
    outline-offset: -2px;
}

/* Hover effect */
.color.controls label:hover {
    background-color: #f0f0f0;
    /* Light gray background on hover */
}

/* Color preview styling */
.color-preview {
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    /* Add a border for visibility */
    border-radius: 3px;
    /* Rounded corners */
    pointer-events: none;
    /* Prevent interaction */
    display: block;
    /* Ensure the div is rendered */
}

.lines.controls,
.logo.controls {
    display: flex;
    /* Use flexbox layout */
    flex-wrap: wrap;
    /* Allow buttons to wrap onto new rows */
    gap: 10px;
    /* Space between buttons */
    justify-content: center;
    /* Center-align the buttons */
    align-items: center;
    /* Align buttons vertically */
    width: 100%;
    /* Ensure controls span the full width of the section */
    max-width: 250px;
    /* Limit the total width of the container */
}

.lines.controls label,
.logo.controls label {
    display: grid;
    place-items: center;
    padding: 0px;
    margin: 0;
    border: 2px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    width: 100px;
    height: 50px;
}

.lines.controls input[type="radio"]:checked+label,
.logo.controls label.pressed-once {
    border-color: #007BFF;
    background-color: hsla(211, 100%, 60%, 0.18);
    color: #007BFF;
    font-weight: bold;
}

.logo.controls label.pressed-twice {
    border-color: #005aba;
    background-color: hsla(211, 100%, 60%, 0.18);
    color: #005aba;
    font-weight: bold;
}

.lines.controls label:hover,
.logo.controls label:hover {
    background-color: #f0f0f0;
}