﻿.yesno-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.yesno-item, .can-item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #ffffff88;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.yesno-item {
    width: 12rem;
    max-width: 24rem;
    min-height: 3.8em;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

    .yesno-item:hover {
        background: #ffffffcc;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    }

    .yesno-item:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(100, 100, 100, 0.3);
    }

    .yesno-item.on {
        border-color: #4caf50;
    }

    .yesno-item.off {
        border-color: #f44336;
    }

/* Label text stays left-aligned, can wrap */
.yesno-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 0.5rem;
    flex: 1;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: left;
}

/* Fake toggle inside button */
.yesno-toggle {
    display: inline-block;
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 3rem;
    text-align: center;
    color: #fff;
    pointer-events: none; /* click handled by parent */
}

.yesno-item.on .yesno-toggle {
    background: #4caf50;
}

.yesno-item.off .yesno-toggle {
    background: #f44336;
}

/*CAN*/

.can-item {
    display: flex;
    flex-direction: column; /* Title on top, inputs below */
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1.2rem 1.5rem;
    margin: 1rem 0;
}

.can-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    border-bottom:#CCC solid 1px;
    color: #333;
}

.can-input-row {
    display: flex;
    flex-wrap: wrap; /* Will stack nicely on smaller screens */
    gap: 0.75rem;
    align-items: center;
}

.can-query {
    flex: 1 1 60%; /* Take most of the space */
    display: flex;
    flex-direction:row;
}
.can-query {
    flex: 1 1 auto; /* Take most of the space */
    display: flex;
    align-items:center;
    flex-direction: row;
}
    .can-query .form-control {
        margin: 0 0.2rem;
    }

.can-interval > * {
    flex: 1 1 auto; /* Take remaining space (but wrap if too narrow) */
    min-width: 8rem;
    width:fit-content;
}

/*MultiChoice*/

.multichoice-container {
    display: flex;
    align-items: center;
    flex-wrap:wrap;
    margin: 0.7rem 0;
    gap: 0.5rem;
}

.multichoice-label {
    flex: 0 0 auto;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 100px; /* aligns nicely if you have multiple rows */
}

.multichoice-options {
    display: flex;
    flex:1;
}

.multichoice-button {
    flex:1;
    max-width:6rem;
    min-width:fit-content;
    border: none;
    background: #f5f5f588;
    padding: 0.4rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border:solid #bbb 1px;
    border-right:none;
    transition: background 0.2s ease, color 0.2s ease;
}
    .multichoice-button:first-child {
        border-radius: 10rem 0 0 10rem;
    }
    .multichoice-button:last-child {
        border-radius: 0 10rem 10rem 0;
        border: solid #bbb 1px;
    }

    .multichoice-button:not(:last-child) {
        border-right: 1px solid #ddd;
    }

    .multichoice-button:hover {
        background: #e9e9e9aa;
    }

    .multichoice-button.selected {
        background: #4caf50;
        color: white;
        font-weight: 600;
    }

/*Entry*/

.input-row {
    display: flex;
    gap: 0 1rem;
    flex-wrap: wrap; /* stack on small screens */
}

.input-field {
    position: relative;
    flex: 1;
    min-width: 16rem;
    margin: 0.8rem 0 0.5rem 0;
}


.input-box {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: white;
}

.input-label {
    position: absolute;
    top: -0.6rem;
    left: 0.75rem;
    max-width:85%;
    text-wrap:nowrap;
    text-overflow: ellipsis;
    overflow:hidden;
    padding: 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: white;
    color: #555;
    border-radius:7px;
    border-top:solid 1px #DDD;
    pointer-events: none;
}

/* Optional: slight focus effect */
.input-box:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

/* Primary Section Separator */
.section-primary {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    padding: 0.75rem 0;
    border-bottom: 2px solid #f44336;
    margin: 1.0rem 0 1.75rem 0;
}

/* Secondary Section Separator */
.section-secondary {
    height: 1px;
    background-color: #E8E8E8;
    margin: 1rem 1.0em;
    border: none;
}
.section-tetiary {
    height: 0px;
    background-color: #bbb;
    margin: 0.8rem 0;
    width: 0px;
    border: none;
}

h5{
    margin:0.6em 0;
    font-size:1.2rem;
    font-weight:300;
}


@media (max-width: 1000px) {
    .yesno-container {
        display: grid;
        gap: 0.75rem;
        font-size:0.9rem;
        grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    }
    .yesno-item{
        width:100%;
        max-width:100%;
    }
    .input-row .yesno-item {
        min-width: 10rem;
        width:fit-content;
    }
}