.json-dynamic-div fieldset{
    border: none;
}

.json-dynamic-div {
    flex-grow: 1;
}

.popup-content {
    display: flex;
}
.chat-area {
    max-height: 100%;    /* Zajistí, že výška bude omezená na dostupnou výšku nadřazeného elementu */
}
.chat-form{
    width: 100%;
}
.chat-form textarea{
    width: 95%;
    resize: none;
    padding: 5px;
    height: 100px;
    border-radius: 3px;
}
.chat-messages-wrapper{
    overflow-y: auto;
    min-height: 400px;

}

.json-dynamic-div table th label {
    font-size: var(--hn-basic-text-size);
    font-weight: 400;
    padding-right: 10px;
    line-height: 1;
}

.json-dynamic-div table th {
    line-height: 1;
    text-align: left;
    width: 150px;

}
.json-dynamic-div table th,
.json-dynamic-div table td
{
  padding-bottom: 1px;

}
.json-dynamic-div textarea {
    resize: none;
}

.json-dynamic-div fieldset legend {
    width: 97%;
    height: 17px;
    background: var(--hn-table-header-background-color);
    margin-left: -20px;
    margin-top: -20px;
    border-bottom: 5px solid white;
    color: white;
    padding: 8px 20px 8px 24px;
    font-size: var(--hn-basic-text-size);
    font-weight: 600;
}
    #json-dynamic-div-notification-information.json-dynamic-div  fieldset legend {
        width: calc(100% + -3px);
        height: 20px;
        left: -20px;
        top: -4px;
        margin-top: 0;
        margin-left: 0;
        border-bottom: 5px solid white;
        padding: 8px 20px 8px 24px;
    }

#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form{
    padding-top: 10px;
}
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .submit-container{
        margin-top: 0;
}

#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table thead {
    height: 30px;
}
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table thead th{
    background-color: initial;
    color: var(--hn-basic-text-color);
}
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody{
    top: 0;
}
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td label {
        display: flex;
        justify-content: start;
}
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td input{
        height: 32px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        cursor: pointer;
        padding-left: 18px;
        border: none;
        background: white;
        line-height: 28px;
        width: 100%;
        font-size: var(--hn-basic-text-size);
    }
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td input[type="checkbox"]{
        appearance: none;
        -webkit-appearance: none;
        background-color: white;
        border: 2px solid gray;
        border-radius: 4px;
        width: 20px;
        height: 20px;
        margin-left: -1px;
        cursor: pointer;
        display: inline-block;
        position: relative;
        transition: all 0.2s ease;
        font-size: 14px !important;
    }
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td input[type="checkbox"]:checked {
        background-color: #007bff;
        border-color: #007bff;
    }
#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td input[type="checkbox"]:checked::after {
        content: "";
        position: absolute;
        left: 5px;
        top: 1px;
        width: 5px;
        height: 10px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

#json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td{
    margin-top: -5px;
}

@media(max-width: 650px){
    #json-dynamic-div-notification-information.json-dynamic-div fieldset legend {
        padding: 8px 50px 8px 46px;
    }
    #json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form table{
        margin-left: 17px;
    }
    #json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form table th {
        width: 50%;
    }
    #json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form table tr {
        display: flex;
        flex-direction: row;
    }
    #json-dynamic-div-notification-information.json-dynamic-div .settings-fieldset{
        padding: 20px 51px 40px 20px;
    }
    #json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td input{
        width: 68%;
    }
    #json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody td label{
        width: 90%;
    }
    #json-dynamic-div-notification-information.json-dynamic-div .custom_settings-form .settings-table tbody tr{
        margin-top: 10px;
    }
}



    .input-with-currency,
    .select-with-icon,
    .input-with-week,
    .input-with-m3,
    .input-with-year,
    .input-with-kwh,
    .input-with-calendar-day{
        display: flex; /* ne inline-flex */
        align-items: center;
        width: 100%;
    }
    .input-with-currency input,
    .select-with-icon input,
    .input-with-week,
    .input-with-m3 input,
    .input-with-year input,
    .input-with-kwh input,
    .input-with-calendar-day{
        flex: 1 1 auto;
        width: 100%;
        min-width: 0; /* zabrání přetečení */
    }

    .input-with-currency .currency-suffix,
    .input-with-week .currency-suffix,
    .input-with-m3 .currency-suffix,
    .input-with-year .currency-suffix,
    .select-with-icon .currency-suffix,
    .input-with-kwh .currency-suffix,
    .input-with-calendar-day{
        margin-left: 4px;
        white-space: nowrap;
        font-size: var(--hn-basic-text-size);
        min-width: 30px;
    }

    .json-dynamic-div table select
    {
        border: none;
        background: var(--hn-box-background-color);
        line-height: 25px;
        width: 100%;
        font-size: var(--hn-basic-text-size);
        padding: 3px 0px 3px 18px;
    }

    .json-dynamic-div table input,
    .json-dynamic-div table textarea
    {
        border: none;
        background: var(--hn-box-background-color);
        line-height: 25px;
        width: calc(100% - 19px);
        font-size: var(--hn-basic-text-size);
        padding: 3px 0px 3px 18px;
    }

.json-dynamic-div table .text_plus_button
{
    border: none;
    background: var(--hn-box-background-color);
    line-height: 25px;
    width: calc(100% - 160px);
    font-size: var(--hn-basic-text-size);
    padding: 3px 0px 3px 18px;
}
@media (max-width: 650px) {
    .json-dynamic-div table .text_plus_button{
        width: calc(100% - 175px) !important;
    }
}


    .json-dynamic-div table select{
        height: 32px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        cursor: pointer;
        padding-left: 18px;
        width: 100%;
    }

    .json-dynamic-div form{
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 16px;
    }

    .json-dynamic-div form fieldset:last-of-type{
        grid-column: 1 / -1;
    }

    .json-dynamic-div table{
        width: 100%;
    }

    .json-dynamic-div form fieldset:last-of-type td{
        display: flex;
        justify-content: end;
    }
    .json-dynamic-div form fieldset:last-of-type td:has(.nette-Form-alert-text){
        display: block !important;
    }


    .json-dynamic-div table input.button{
        min-width: 155px;
        max-width: fit-content;
        border-radius: 3px;
        background: #878DA1;
        color: white;
        cursor: pointer;
        padding: 0 20px;
        margin: 5px;
    }

    .json-dynamic-div table input.button:hover{
        min-width: 155px;
        max-width: fit-content;
        border-radius: 3px;
        background: #6887a1;
        color: white;
        padding: 0 20px;


    }


    .json-dynamic-div button.disabled, input.disabled {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
    }

    .popup-form-headline-row{
        width: 100%;
        display: flex;
        align-items: start;
        margin-top: -30px;
        padding-bottom: 13px;
        font-size: var(--hn-popup-form-headline-font-size);
        color: black;
        font-weight: 600;
    }

    .popup-form-title-row{
        width: 100%;
        display: flex;
        align-items: start;
        margin-top: -30px;
        padding-bottom: 13px;
        padding-top: 13px;
        font-size: var(--hn-popup-form-headline-font-size);
        color: black;
        font-weight: 600;
    }
    .popup-form-notification-content{
        height: 170px;
        font-size: var(--hn-popup-form-headline-font-size);
        font-weight: 600;
        display: flex;
        align-items: center;
        background: var(--hn-box-background-color);
        padding-left: 25px;
        margin-bottom: 30px;
    }

    .popup-form-warning-content{
        height: 170px;
        font-size: var(--hn-popup-form-headline-font-size);
        padding-top: 20px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        background: var(--hn-box-background-color);
        padding-left: 25px;
        margin-bottom: 30px;
        gap: 10px;
    }
    .popup-form-warning-content ul {
        list-style-type: none; /* odstraní odrážky */
        padding: 0; /* odstraní odsazení */
        margin: 0; /* odstraní okraje, pokud nějaké existují */
    }

    .formValidationError{
        border: 2.5px solid black !important;
        border-radius: 5px;
    }
    .nette-Form-alert-text{
        padding: 5px;
        position: relative;
        border: 1px solid black;
        width: 220px;
        min-height: 35px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 8px;
        font-size: var(--hn-basic-text-size);
        font-weight: 400;
        background: white;
        box-shadow: var(--hn-universal-box-shadow);
        border-radius: 5px;
    }
    .nette-Form-alert-text::after {
        content: '';
        position: absolute;
        top: -19px; /* pozice zobáčku nad obdélníkem */
        left: 30%; /* horizontální střed obdélníku */
        transform: translateX(-50%); /* vycentrování zobáčku */
        border-width: 10px; /* velikost zobáčku */
        border-style: solid;
        border-color: transparent transparent #878DA1 transparent; /* barva zobáčku */
    }


    .add-role-form-wrapper form {
        display: block !important;
    }

    select.disabled {
        background-color: #f0f0f0;
        color: #666;
        pointer-events: none;
        cursor: not-allowed;
    }

    .select2-results__options {
        font-size: 14px;
    }

    #file-list {
        list-style-type: none;
        padding: 0;
        margin-left: 30px;
    }

    #file-list li {
        font-size: 14px;
        font-style: italic;
        color: #666;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
    }

    #file-list li span {
        margin-left: 10px;
        cursor: pointer;
        color: #888;
    }

    .dropdown-item {
        font-family: var(--hn-default-font-family) !important;
        font-weight: 400 !important;
    }

    .request-action-buttons-row {
        display: flex;
        justify-content: space-between;
        align-items: end;
    }

    .action-image {
        margin-left: auto;
        cursor: pointer;
        width: 37px;
        margin-right: 20px;
    }

    .notification-box {
        position: relative;
        padding: 8px 12px;
        border-radius: 6px;
        margin: 4px 0;
        display: flex;
        align-items: center;
        font-size: 0.95rem;
        font-weight: 500;
        gap: 8px;
        justify-content: space-between;
    }

    .notification-icon {
        font-size: 1.2rem;
    }
    .notification-warning {
        background-color: #fff3cd;
        color: #856404;
        border-left: 4px solid #ffeeba;
    }

    .notification-error {
        background-color: #f8d7da;
        color: #721c24;
        border-left: 4px solid #f5c6cb;
    }

    .notification-success {
        background-color: #d4edda;
        color: #155724;
        border-left: 4px solid #c3e6cb;
    }

    .notification-info {
        background-color: #d1ecf1;
        color: #0c5460;
        border-left: 4px solid #bee5eb;
    }

    .notification-text {
        flex-grow: 1;
    }

    .notification-close {
        cursor: pointer;
        font-size: 1.1rem;
        padding-left: 8px;
        color: #888;
        transition: color 0.2s;
    }

    .notification-close:hover {
        color: #000;
    }

    .notification-restore{
        font-size: 18px;
        color: black !important;
        cursor: pointer;
        display: inline-flex;
        align-items: flex-start;  /* zarovnání nahoru */
        justify-content: center;
        width: 18px;
        height: 18px;
        font-weight: bold;
        text-decoration: none;
        vertical-align: top;
        margin-top: 1px;

    }

    /* Zarovnáme checkbox jako ostatní inputy */
    .json-dynamic-div td label input[type="checkbox"] {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    /* Zarovnáme popisek vedle checkboxu */
    .json-dynamic-div td label {
        display: inline-flex;
        align-items: center;
        flex-direction: row-reverse; /* přehodí pořadí v rámci labelu */
        font-size: var(--hn-basic-text-size);
        width: 100%; /* zajistí stejné zarovnání */
        font-weight: 400;
        justify-content: space-between;
        gap: 8px; /* mezera mezi checkboxem a textem */
    }

    /* Volitelné: pokud chceš checkbox zarovnat do stejné „linky“ jako ostatní inputy */
    .json-dynamic-div table td {
        vertical-align: middle;
    }

    .json-dynamic-div table th:empty {
        display: none;
    }

    .image-preview-wrapper{
        display: flex;
        align-items: center;
        justify-content: center;
        height: calc(80vh - 60px);
        overflow: hidden;
    }

    .image-gallery-button{
        cursor: pointer;
        width: 40px;
        height: 40px;
        margin-right: 20px;
        margin-left: 20px;
    }

    .image-preview-content{
        flex-grow: 1;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .text-area-150px{
        height: 150px;
    }

    .QRcodeImage{
        margin: 10px 10px 10px 0px;
    }

.select2-container--default.select2-container--disabled .select2-selection--single {
    color: #666 !important;
    cursor: not-allowed;
    font-style: italic;
    opacity: 0.7;
}

.select2-container--default.select2-container--disabled .select2-selection--multiple {
    color: #666 !important;
    cursor: not-allowed;
    font-style: italic;
    opacity: 0.7;
}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    width: 90%;
    max-width: 600px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #878da1; /* podobná barva jako záhlaví formuláře */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    background-color: white;
}

.modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e3e3e3;
}

.btn-cancel {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
}

.btn-confirm {
    padding: 8px 15px;
    background-color: #8e98aa; /* podobná barva jako tlačítko Uložit */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-confirm:hover {
    background-color: #7a869b;
}

.activities-results {
    margin-top: 20px;
}

.selected-activity-info {
    background-color: #e8f0fe;
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
    border-left: 3px solid #8e98aa;
}
.form-list-wrapper {
    margin: 0.5em 0;
    padding: 0.75em 1em;
    border-radius: 2px;
    font-family: var(--hn-default-font-family) !important;
    font-size: var(--hn-basic-text-size);
}

/* Hlavní seznam */
.form-list-view {
    list-style-type: none;
    margin: 0;
    padding-left: 0;
}

/* Kategorie (hlavní úroveň) */
.form-list-view > li {
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #23263b;
    padding-bottom: 0.2em;
    position: relative;
    padding-left: 1em; /* prostor pro tečku */
}

/* Tečka před kategorií */
.form-list-view > li:before {
    content: "•";
    color: #b2b6c0; /* decentní šedá */
    position: absolute;
    left: 0;
}

/* Podseznam (položky v kategorii) */
.form-list-view > li > ul.form-list-view {
    margin-top: 0.25em;
    padding-left: 1.2em;
    background: none;
}

/* Položky v podseznamu */
.form-list-view > li > ul.form-list-view > li {
    font-weight: normal;
    color: #52576c;
    margin-bottom: 0.18em;
    padding-left: 0.8em;
    position: relative;
    line-height: 1.6;
}

/* Pomlčka před položkami */
.form-list-view > li > ul.form-list-view > li:before {
    content: "–";
    color: #b2b6c0;
    font-size: var(--hn-basic-text-size);
    position: absolute;
    left: 0;
}

@media (max-width: 600px) {
    .form-list-wrapper {
        padding: 0.5em 0.2em;
        font-size: 0.95rem;
    }
}

.popup-form-error-box {
    background-color: #fff3cd;      
    color: #856404;                 
    border: 1px solid #ffeeba;      
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.popup-form-error-box ul {
    margin: 0;
    padding-left: 1.2rem;
}

.popup-form-error-box li {
    margin-bottom: 0.25rem;
}


.popup-form-buttons {
    display: flex;
    justify-content: end;
}

/* sekce podle labelu checkboxu */
.meter-section {
    margin-bottom: 15px;
}

/* název sekce (label) */
.meter-section .section-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.95em;
    color: #333;
}

/* seznam metrů v sekci */
.meter-section .meters-sublist {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

/* jednotlivý metr */
.meter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 0.9em;
}

/* text metru */
.meter-text {
    flex: 1;
}

/* ikonka smazání */
.remove-meter {
    cursor: pointer;
    color: #c0392b;
    font-weight: bold;
    margin-left: 10px;
    transition: color 0.2s;
}

.remove-meter:hover {
    color: #e74c3c;
}

.form-separator {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 15px 0;
}

.qr-input-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center; /* nebo flex-end pro spodní zarovnání */
    gap: 5px; /* mezera mezi inputem a tlačítkem */
}

.qr-input-wrapper input.text_plus_button {
    flex: 1; /* input zabere dostupnou šířku */
}

.qr-input-wrapper input.button_with_input {
    flex: 0 0 auto; /* button si zachová svou šířku */
}

li.meter-item.already-planned .meter-text {
    text-decoration: line-through;
    color: #888;
}

li.meter-item.already-planned {
    cursor: help; /* tooltip */
}

li.meter-item.already-planned .remove-meter {
    display: none;
}

li.meter-item.already-planned .info {
    text-decoration: none;
    color: #444;
}


