.cekos-val-preview-note {
    padding: .75em 1em;
    margin-block: 1em;
    border-inline-start: .25em solid #368400;
    background: #f1f7eb;
    color: #294020;
    font-size: 12px;
    line-height: 1.5;
}
.cekos-val-preview {
    container: cekos-val / inline-size;
    min-width: 0;
    max-width: 100%;
}
.cekos-val-preview #main,
.cekos-val-preview #mainform,
.cekos-val-preview form,
.cekos-val-preview #xml-programs-valorizacija-wrapper,
.cekos-val-preview fieldset {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.cekos-val-preview #xml-programs-valorizacija-wrapper {
    margin: 20px 0;
}
.cekos-val-preview #xml-programs-zatezna-kamata {
    margin: 0;
    padding: clamp(12px, 3vw, 24px);
    border: 1px solid #d9e1e5;
    border-radius: 6px;
    background: #f4f9fc;
}
.cekos-val-preview .fieldset-wrapper {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.cekos-val-preview #edit-valorizacija-od-datuma-wrapper,
.cekos-val-preview #edit-valorizacija-do-datuma-wrapper,
.cekos-val-preview .form-item-valorizacija-iznos,
.cekos-val-preview #actions {
    margin: 0;
    padding: 0;
    min-width: 0;
}
.cekos-val-preview .fieldset-wrapper label {
    display: block;
    margin-block-end: 6px;
    color: #33444e;
    font-weight: 600;
    text-align: left;
}
.cekos-val-preview .fieldset-wrapper input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    margin: 0;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.4;
}
.cekos-val-preview #actions {
    grid-column: 1 / -1;
}
.cekos-val-preview .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}
.cekos-val-preview .wp-block-button {
    margin: 0;
    min-width: 0;
}
.cekos-val-preview .obracunajbutton,
.cekos-val-preview .ponistibutton {
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 16px;
    white-space: normal;
}
.cekos-val-preview #ValorizacijaOutputDiv2,
.cekos-val-preview #edit-output,
.cekos-val-preview #datum-izrade {
    min-width: 0;
    margin-inline: 0;
    overflow-wrap: anywhere;
}
.cekos-val-preview #output-title {
    padding-block: 12px;
}
.cekos-val-preview #OutputResultsAmmountTo {
    font-weight: 700;
    color: #327400;
}
.cekos-val-preview .cekos-val-summary {
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid #d9e1e5;
    border-radius: 6px;
    background: #f7fafc;
    min-width: 0;
    font-size: 14px;
    line-height: 1.5;
}
.cekos-val-preview .cekos-val-summary dt {
    margin: 0;
    color: #62717b;
    font-size: 12px;
    font-weight: 400;
}
.cekos-val-preview .cekos-val-summary dd {
    margin: 0;
    min-width: 0;
    color: #33444e;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.cekos-val-preview .cekos-val-summary-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}
.cekos-val-preview .cekos-val-summary-period {
    padding-block: 10px;
}
.cekos-val-preview .cekos-val-date-range {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}
.cekos-val-preview .cekos-val-summary-total {
    border-top: 1px solid #d9e5d0;
    padding-block-start: 10px;
}
.cekos-val-preview .cekos-val-summary-total dt {
    color: #365726;
    font-weight: 600;
}
.cekos-val-preview .cekos-val-summary-total dd {
    color: #327400;
    font-size: 20px;
    font-weight: 700;
}
.cekos-val-preview #OutputResultsTable {
    width: 100%;
    max-width: 100%;
}
.cekos-val-preview #xml-alatke-options {
    padding: 16px 0 !important;
}
.cekos-val-preview p {
    overflow-wrap: anywhere;
}
@media screen {
    @container cekos-val (max-width: 650px) {
        .cekos-val-preview .fieldset-wrapper {
            grid-template-columns: minmax(0, 1fr);
        }
        .cekos-val-preview #actions .wp-block-button {
            flex: 1 1 0;
        }
        .cekos-val-preview #actions a {
            width: 100%;
            text-align: center;
        }
        .cekos-val-preview #OutputResultsTable,
        .cekos-val-preview #OutputResultsTable tbody {
            display: block;
            width: 100%;
            min-width: 0;
            border: 0;
        }
        .cekos-val-preview #OutputResultsTable tbody {
            position: relative;
        }
        .cekos-val-preview #OutputResultsTable tr:first-child {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip-path: inset(50%);
        }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            padding: 12px;
            margin-block: 0 10px;
            gap: 5px;
            border: 1px solid #d9e1e5;
            border-radius: 6px;
            background: #fff;
        }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            min-width: 0;
            padding: 0;
            border: 0;
            text-align: right;
            overflow-wrap: anywhere;
        }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td::before {
            text-align: left;
            color: #62717b;
        }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td:nth-child(1)::before { content: "Od:"; }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td:nth-child(2)::before { content: "Do:"; }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td:nth-child(3)::before { content: "Broj dana:"; }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td:nth-child(4)::before { content: "Mesečni indeks:"; }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td:nth-child(5)::before { content: "Valorizovan iznos:"; }
        .cekos-val-preview #OutputResultsTable tr:not(:first-child) td:last-child {
            border-top: 1px solid #edf0f2;
            padding-block-start: 5px;
            font-weight: 700;
        }
    }
}
@media print {
    .cekos-val-preview-note { display: none; }
}
