/*
    Styles for the ΚΗΜΔΗΣ pages.

    The ΚΗΜΔΗΣ pages were first written with Bootstrap grid and utility classes (row, col-md-*, card,
    badge, d-flex, text-muted) while the application loaded no Bootstrap, so every control stacked down
    the page. Layout now uses DxFormLayout, which is responsive on its own, and the few presentational
    needs are defined here. (Since 12.10.2026 the Fluent theme adds Bootstrap's styles, ThemeManager
    UseBootstrapStyles; these rules stay, being independent of it.)

    Everything is prefixed khmdhs- so it cannot collide with site.css or the DevExpress themes, and
    colours come from DevExpress theme variables so these follow a theme switch instead of fighting it.
*/

.khmdhs-page {
    padding: 0 1rem 1rem;
}

/* Filter panel ---------------------------------------------------------------------------------- */

.khmdhs-filters {
    border: 1px solid var(--dxbl-border-color, #dee2e6);
    border-radius: var(--dxbl-border-radius, 0.25rem);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background-color: var(--dxbl-panel-bg, transparent);
}

/* Notes and warnings ---------------------------------------------------------------------------- */

.khmdhs-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.8125rem;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.khmdhs-warning {
    border: 1px solid var(--dxbl-warning, #ffc107);
    border-left-width: 4px;
    border-radius: var(--dxbl-border-radius, 0.25rem);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.khmdhs-error {
    border: 1px solid var(--dxbl-danger, #dc3545);
    border-left-width: 4px;
    border-radius: var(--dxbl-border-radius, 0.25rem);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.khmdhs-error-title {
    font-weight: 600;
}

/* Empty and idle states ------------------------------------------------------------------------- */

.khmdhs-placeholder {
    text-align: center;
    padding: 2.5rem 1rem;
    opacity: 0.7;
}

.khmdhs-busy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
}

/* Pager ----------------------------------------------------------------------------------------- */

.khmdhs-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.khmdhs-pager-count {
    font-size: 0.8125rem;
    opacity: 0.75;
}

.khmdhs-pager-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Status badges --------------------------------------------------------------------------------- */

.khmdhs-badge {
    display: inline-block;
    padding: 0.2em 0.55em;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.75rem;
    white-space: nowrap;
    color: #fff;
}

.khmdhs-badge-cancelled { background-color: var(--dxbl-danger, #dc3545); }
.khmdhs-badge-active    { background-color: var(--dxbl-success, #198754); }
.khmdhs-badge-unknown   { background-color: var(--dxbl-secondary, #6c757d); }
.khmdhs-badge-amend     { background-color: var(--dxbl-warning, #ffc107); color: #212529; }
.khmdhs-badge-approved  { background-color: var(--dxbl-info, #0dcaf0); color: #212529; }

/* ΑΔΑΜ chain groups ----------------------------------------------------------------------------- */

.khmdhs-chain-group {
    border: 1px solid var(--dxbl-border-color, #dee2e6);
    border-radius: var(--dxbl-border-radius, 0.25rem);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.khmdhs-chain-header {
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid var(--dxbl-border-color, #dee2e6);
}

.khmdhs-chain-count {
    font-weight: 400;
    opacity: 0.7;
}

.khmdhs-chain-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-bottom: 1px solid var(--dxbl-border-color, #dee2e6);
}

.khmdhs-chain-entry:last-child {
    border-bottom: none;
}

.khmdhs-chain-adam {
    font-family: var(--bs-font-monospace, ui-monospace, "Cascadia Mono", "Consolas", monospace);
}

.khmdhs-chain-adam + .khmdhs-badge {
    margin-left: 0.5rem;
}

/* Result summary -------------------------------------------------------------------------------- */

.khmdhs-summary {
    font-size: 0.8125rem;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

/* Placeholder for a cell with nothing to show. */
.khmdhs-muted {
    opacity: 0.55;
}

/* Wizard step panel ------------------------------------------------------------------------------ */

.khmdhs-step-panel {
    border: 1px solid var(--dxbl-border-color, #dee2e6);
    border-left: 4px solid var(--dxbl-primary, #0d6efd);
    border-radius: var(--dxbl-border-radius, 0.25rem);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.khmdhs-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.khmdhs-step-title { font-weight: 600; }

.khmdhs-step-adam {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.khmdhs-issues {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
}

/* What the submission still needs, by where it is put right (KhmdhsFixList). */
.khmdhs-fix-group {
    margin-top: 0.5rem;
}

.khmdhs-fix-title {
    font-weight: 600;
}

.khmdhs-fix-where {
    font-weight: 400;
    margin-left: 0.25rem;
}

.khmdhs-fix-group .khmdhs-issues {
    margin: 0.15rem 0 0.25rem;
}

.khmdhs-fix-note {
    font-style: italic;
    opacity: 0.8;
    padding-left: 1.25rem;
}

.khmdhs-issue-error   { color: var(--dxbl-danger, #dc3545); }
.khmdhs-issue-warning { color: var(--dxbl-warning-text, #997404); }

.khmdhs-step-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Values to be registered and their legal basis (owner decision Ε2) ------------------------------ */

.khmdhs-basis {
    margin-top: 0.75rem;
}

.khmdhs-basis-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.khmdhs-basis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.khmdhs-basis-table th,
.khmdhs-basis-table td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid var(--dxbl-border-color, #dee2e6);
    text-align: left;
    vertical-align: top;
}

.khmdhs-basis-table th {
    font-weight: 600;
    white-space: nowrap;
}

.khmdhs-basis-table td:first-child { white-space: nowrap; }

.khmdhs-basis-law {
    opacity: 0.8;
}

.khmdhs-basis-table .khmdhs-badge {
    margin-left: 0.4rem;
}