/* Informative pages (projects, policies, policy-edit, conditions): page styles on top of fk-theme.css (fk-* components are defined there, do not redefine them). */

/* =====================================================================================================
   Scope
     .fk-inf                 root of every page of the area (project.html, policy.html, conditions.html,
                             policy-edit.html), plus one page class each:
     .fk-page-projects | .fk-page-policies | .fk-page-conditions | .fk-page-policy-edit
     .inf-prj-modal          project edit modal (mod_ProjectEdit.html, opened from projects and policies)
   Local classes are prefixed inf- (they never redefine fk-* components).

   Contents
     1. Accordion row (projects, policies): fk-item whose head carries status badges outside the button
     2. Shared bits: toolbar, key/value pairs, rich text, flags, tags, chips, icon buttons, checks
     3. Projects
     4. Policies (read-only detail of a policy)
     5. Treatments (conditions)
     6. Policy editor
     7. Project modal
     8. Responsive
   ===================================================================================================== */


/* -----------------------------------------------------------------------------------------------------
   1. Accordion row
   <div class="fk-item">
     <div class="inf-head" id="heading{{$index}}">                (ng-class may add card-header bg-*)
       <button class="fk-item-head collapsed" data-toggle="collapse" ...>title</button>
       <span class="inf-status"><label class="fk-badge is-..." ng-show>..</label></span>
       <i class="fa fa-chevron-down fk-chevron"></i>
     </div>
     <div id="collapse{{$index}}" class="collapse" data-parent="#accordion"><div class="fk-item-body">..</div></div>
   </div>
   The status labels keep their tag and bindings, so they cannot live inside the <button>: the button
   is stretched over the whole row (::after) and badges/chevron let clicks through to it.
   ----------------------------------------------------------------------------------------------------- */
body.fk .fk-inf .inf-list {
    margin-bottom: 8px;
}

body.fk .fk-inf .inf-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 16px 0 0;
    border-radius: var(--fk-r);
}

/* policy.html: ng-class writes "card-header bg-success|bg-dark text-white" on the head: neutralised */
body.fk .fk-inf .inf-head.card-header {
    padding: 0 16px 0 0;
    background: transparent !important;
    border: 0;
    border-radius: var(--fk-r);
    color: var(--fk-ink) !important;
}

body.fk .fk-inf .inf-head:hover,
body.fk .fk-inf .inf-head.card-header:hover {
    background: var(--fk-soft) !important;
}

body.fk .fk-inf .inf-head:has(> .fk-item-head[aria-expanded="true"]:not(.collapsed)) {
    border-radius: var(--fk-r) var(--fk-r) 0 0;
}

body.fk .fk-inf .inf-head > .fk-item-head {
    position: static;
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
}

body.fk .fk-inf .inf-head > .fk-item-head:hover {
    background: transparent;
}

body.fk .fk-inf .inf-head > .fk-item-head::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
}

body.fk .fk-inf .inf-head > .fk-item-head:focus-visible {
    box-shadow: none;
}

body.fk .fk-inf .inf-head > .fk-item-head:focus-visible::after {
    box-shadow: inset 0 0 0 2px var(--fk-accent);
}

body.fk .fk-inf .inf-head > .fk-item-head .fk-item-title {
    font-size: 1rem;
}

body.fk .fk-inf .inf-status {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 60%;
    pointer-events: none;
}

body.fk .fk-inf .inf-status:not(:has(> :not(.ng-hide))) {
    display: none;
}

body.fk .fk-inf .inf-status .fk-badge {
    margin: 0;
    font-size: .7rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.fk .fk-inf .inf-head > .fk-chevron {
    pointer-events: none;
}

body.fk .fk-inf .inf-head > .fk-item-head[aria-expanded="true"]:not(.collapsed) ~ .fk-chevron {
    transform: rotate(180deg);
}


/* -----------------------------------------------------------------------------------------------------
   2. Shared bits
   ----------------------------------------------------------------------------------------------------- */

/* Page head as tall as a button even without actions: the title stays at the same height when
   switching between the section tabs (projects and policies have a button, treatments and the
   editor do not) */
body.fk .fk-inf .fk-page-head {
    min-height: 34px;
}

/* Action bar at the top of an item body: primary first, destructive pushed to the right */
body.fk .fk-inf .inf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

body.fk .fk-inf .inf-toolbar:not(:has(> :not(.ng-hide))) {
    display: none;
}

body.fk .fk-inf .inf-toolbar .inf-push {
    margin-left: auto;
}

/* right-hand group of a toolbar: status + destructive action (policies), as Disable on projects */
body.fk .fk-inf .inf-toolbar-end {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

body.fk .fk-inf .inf-toolbar-end:not(:has(> :not(.ng-hide))) {
    display: none;
}

body.fk .fk-inf .inf-toolbar .btn i {
    margin-right: 2px;
}

/* key/value pairs: a wrapper that only groups a key and its value inside fk-kv */
body.fk .fk-inf .fk-kv > .inf-pair {
    display: contents;
}

body.fk .fk-inf .fk-kv-k {
    margin: 0;
    line-height: 1.45;
}

body.fk .fk-inf .fk-kv-v {
    font-size: .9rem;
}

body.fk .fk-inf .fk-kv-v > span[ng-bind-html],
body.fk .fk-inf .inf-rich {
    display: block;
}

body.fk .fk-inf .fk-kv-v p:last-child,
body.fk .fk-inf .inf-rich p:last-child,
body.fk .fk-inf .inf-readonly p:last-child {
    margin-bottom: 0;
}

/* key with its explanation on the same line ("API Token - Use this token...") */
body.fk .fk-inf .inf-k-note {
    color: var(--fk-muted);
    font-weight: 400;
}

/* Block title inside an item body or a card (Settings, section names) */
body.fk .fk-inf .inf-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--fk-line);
}

body.fk .fk-inf .inf-block-title {
    margin: 0 0 12px;
    color: var(--fk-ink);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

/* Language flag (img/flags/*.png, 20x20) */
body.fk .fk-inf img.inf-flag {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: -4px;
}

body.fk .fk-inf .inf-lang-v {
    display: inline-flex;
    align-items: center;
    color: var(--fk-ink);
    font-size: .875rem;
    white-space: nowrap;
}

/* Small uppercase tags: required, staff, phone alternative */
body.fk .fk-inf .inf-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: var(--fk-r-pill);
    background: var(--fk-accent-soft);
    color: var(--fk-accent);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .05em;
    line-height: 1.5;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

body.fk .fk-inf .inf-tag small,
body.fk .fk-inf .inf-tag b {
    font-size: inherit;
    font-weight: inherit;
}

/* Read-only chips (requested data) */
body.fk .fk-inf .inf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.fk .fk-inf .inf-chip {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    max-width: 100%;
    padding: 6px 10px;
    background: var(--fk-soft);
    border: 1px solid var(--fk-line);
    border-radius: var(--fk-r-sm);
    color: var(--fk-ink);
    font-size: .85rem;
    line-height: 1.4;
}

/* Square icon button (expand, remove) as the consents panel's cp-icon-btn */
body.fk .fk-inf .inf-icon-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--fk-surface);
    border: 1px solid var(--fk-line);
    border-radius: var(--fk-r-sm);
    color: var(--fk-muted);
    font-size: .85rem;
}

body.fk .fk-inf .inf-icon-btn:hover {
    border-color: var(--fk-line-2);
    color: var(--fk-ink);
}

body.fk .fk-inf .inf-icon-btn.inf-remove:hover {
    border-color: rgba(217, 48, 37, .35);
    background: var(--fk-bad-bg);
    color: var(--fk-bad);
}

/* Checkbox + text, the text is the label of the box */
body.fk .fk-inf .inf-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--fk-ink-2);
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
}

body.fk .fk-inf .inf-check > input {
    width: 15px;
    height: 15px;
    margin: 0;
    vertical-align: 0;
}

body.fk .fk-inf .inf-check > input:disabled + span {
    color: var(--fk-muted);
}

body.fk .fk-inf .inf-check:has(> input:disabled) {
    cursor: default;
}

/* Number of months: input + unit */
body.fk .fk-inf .inf-months {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    width: 150px;
}

body.fk .fk-inf .inf-months .form-control {
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

body.fk .fk-inf .inf-months.input-group-sm .form-control,
body.fk .fk-inf .inf-months.input-group-sm .input-group-text {
    height: 32px;
    padding: 4px 10px;
    font-size: .85rem;
}

body.fk .fk-inf .inf-months.input-group-sm {
    width: 132px;
}

/* Validation message under a field */
body.fk .fk-inf .inf-error,
body.fk .inf-prj-modal .inf-error {
    display: block;
    margin-top: 4px;
    color: var(--fk-bad-ink);
    font-size: .78rem;
}

/* Summernote editors: label above, spacing between editors */
body.fk .fk-inf .inf-editor {
    margin-bottom: 16px;
}

body.fk .fk-inf .inf-editor:last-child {
    margin-bottom: 0;
}

body.fk .fk-inf .inf-editor > label {
    display: block;
}

/* Colour swatch (read-only input coloured by ng-style) and preview box */
body.fk .fk-inf .inf-swatch {
    width: 32px !important;
    height: 32px;
    padding: 0;
    border: 1px solid var(--fk-line-2);
    border-radius: var(--fk-r-sm) !important;
    vertical-align: middle;
    cursor: default;
}

body.fk .fk-inf .inf-color {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

body.fk .fk-inf .inf-default {
    color: var(--fk-muted);
    font-style: italic;
}

body.fk .fk-inf .inf-preview {
    max-width: 100%;
    border: 1px solid rgba(20, 30, 60, .08);
    border-radius: var(--fk-r-sm) !important;
    box-shadow: var(--fk-shadow-1);
    font-weight: 500;
}

body.fk .fk-inf .inf-yes {
    color: var(--fk-ok);
    font-size: 1.05rem;
}

body.fk .fk-inf .inf-no {
    color: var(--fk-neutral);
    font-size: 1.05rem;
}


/* -----------------------------------------------------------------------------------------------------
   3. Projects
   ----------------------------------------------------------------------------------------------------- */
body.fk .fk-page-projects .fk-kv {
    grid-template-columns: minmax(140px, 260px) minmax(0, 1fr);
}

body.fk .fk-page-projects .fk-code {
    font-size: .8rem;
}


/* -----------------------------------------------------------------------------------------------------
   4. Policies
   ----------------------------------------------------------------------------------------------------- */

/* Project picker: light toolbar card instead of the dark "Choose project" panel */
body.fk .fk-page-policies .inf-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 16px;
}

body.fk .fk-page-policies .inf-picker .fk-label-caps {
    flex: 0 0 auto;
}

body.fk .fk-page-policies .inf-picker select.form-control {
    flex: 1 1 260px;
    width: auto;
    max-width: 420px;
}

body.fk .fk-page-policies .inf-picker .btn {
    margin-left: auto;
}

/* Detail: data on the left, logo on the right */
body.fk .fk-page-policies .inf-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 32px;
}

body.fk .fk-page-policies .inf-detail > .fk-kv {
    flex: 1 1 360px;
    min-width: 0;
}

body.fk .fk-inf .inf-logo {
    flex: 0 0 auto;
}

body.fk .fk-inf .inf-logo:not(:has(img:not(.ng-hide))) {
    display: none;
}

body.fk .fk-inf .inf-logo img,
body.fk .fk-inf img.inf-logo-img {
    display: block;
    max-width: 220px;
    max-height: 160px;
    padding: 6px;
    background: var(--fk-surface);
    border: 1px solid var(--fk-line);
    border-radius: var(--fk-r-sm);
}

/* Sections of the policy (rendered text) */
body.fk .fk-page-policies .inf-sec {
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f6;
}

body.fk .fk-page-policies .inf-sections > :last-child > .inf-sec {
    border-bottom: 0;
}

body.fk .fk-inf .inf-sec-title {
    display: block;
    margin: 0 0 6px;
    color: var(--fk-ink);
    font-size: .9rem;
    font-weight: 600;
}

body.fk .fk-inf .inf-sec-text {
    color: var(--fk-ink-2);
    font-size: .9rem;
}

/* Treatments of the policy */
body.fk .fk-inf .inf-conds {
    display: grid;
    gap: 10px;
}

body.fk .fk-inf .inf-cond {
    min-width: 0;
    padding: 12px 14px;
    background: var(--fk-surface);
    border: 1px solid var(--fk-line);
    border-radius: 10px;
}

body.fk .fk-inf .inf-cond-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 10px;
    color: var(--fk-ink);
    font-weight: 600;
}

body.fk .fk-inf .inf-cond .fk-kv {
    gap: 8px 20px;
    font-size: .875rem;
}

body.fk .fk-inf .inf-cond .fk-badge > i {
    font-size: .85em;
}

body.fk .fk-page-policies .inf-cond-head {
    display: block;
    line-height: 1.8;
}

body.fk .fk-page-policies .fk-kv {
    grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
}

body.fk .fk-page-policies .inf-sections > :first-child > .inf-sec {
    padding-top: 0;
}

body.fk .fk-page-policies .inf-channels-v {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


/* -----------------------------------------------------------------------------------------------------
   5. Treatments (conditions)
   ----------------------------------------------------------------------------------------------------- */
body.fk .fk-page-conditions .inf-cond-new {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    margin-bottom: 20px;
}

body.fk .fk-page-conditions .inf-cond-new .inf-name {
    flex: 1 1 280px;
    max-width: 480px;
}

body.fk .fk-inf .inf-lang {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.fk .fk-inf .inf-lang > label {
    margin: 0;
}

body.fk .fk-page-conditions .inf-cond-new .inf-lang {
    min-height: 38px;
    justify-content: flex-end;
}

body.fk .fk-page-conditions .inf-list-title {
    margin: 28px 0 12px;
    color: var(--fk-ink);
    font-size: 1.05rem;
    font-weight: 600;
}

body.fk .fk-page-conditions .inf-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 10px 16px;
}

body.fk .fk-page-conditions .inf-row .fk-item-title {
    flex: 1 1 200px;
    min-width: 0;
}

body.fk .fk-page-conditions .inf-row .inf-lang {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

body.fk .fk-page-conditions .inf-row-actions {
    display: flex;
    gap: 8px;
}


/* -----------------------------------------------------------------------------------------------------
   6. Policy editor
   ----------------------------------------------------------------------------------------------------- */
body.fk .fk-page-policy-edit .inf-lock {
    margin-bottom: 16px;
}

body.fk .fk-page-policy-edit .inf-lock .alert-heading {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Every block of the form is a card */
body.fk .fk-page-policy-edit .inf-section {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--fk-surface);
    border: 1px solid var(--fk-line);
    border-radius: var(--fk-r);
    box-shadow: var(--fk-shadow-1);
}

body.fk .fk-page-policy-edit .inf-section.highlighted {
    background: #f3f8fd;
    border-color: #b9d3ee;
    border-left: 4px solid var(--fk-info);
}

body.fk .fk-page-policy-edit .inf-section > .form-group:last-child {
    margin-bottom: 0;
}

/* last row of fields: cancel the form-group bottom margin (whatever the columns stack like) */
body.fk .fk-page-policy-edit .inf-section > .form-row:last-child {
    margin-bottom: -1rem;
}

body.fk .fk-page-policy-edit .inf-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}

body.fk .fk-page-policy-edit .inf-section-title {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    color: var(--fk-ink);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

body.fk .fk-page-policy-edit .inf-section-title > i {
    color: var(--fk-muted);
    font-size: .9em;
}

body.fk .fk-page-policy-edit .inf-section-head .inf-section-title {
    margin-right: auto;
}

/* General data: logo + upload, name, language, dates */
body.fk .fk-page-policy-edit .inf-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--fk-line);
}

body.fk .fk-page-policy-edit .inf-upload-field > label {
    display: block;
}

body.fk .fk-page-policy-edit .inf-upload-field .fk-hint {
    margin: 0 0 8px;
}

body.fk .fk-page-policy-edit .inf-file {
    max-width: 100%;
    color: var(--fk-muted);
    font-size: .85rem;
}

body.fk .fk-page-policy-edit .inf-file::file-selector-button {
    margin-right: 10px;
    padding: 5px 12px;
    background: var(--fk-surface);
    border: 1px solid var(--fk-line-2);
    border-radius: var(--fk-r-sm);
    color: var(--fk-ink);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

body.fk .fk-page-policy-edit .inf-file::file-selector-button:hover {
    background: var(--fk-soft);
    border-color: #c3cad6;
}

body.fk .fk-page-policy-edit .inf-k {
    display: block;
    margin: 0 0 2px;
    color: var(--fk-muted);
    font-size: .8rem;
    font-weight: 600;
}

body.fk .fk-page-policy-edit .inf-v {
    color: var(--fk-ink);
}

body.fk .fk-page-policy-edit .inf-lang-field {
    display: flex;
    align-items: center;
    height: 38px;
}

/* Sortable list of the sections (ui-sortable): the structure is the editor's, only the look changes */
body.fk .fk-page-policy-edit .inf-sortlist {
    border-radius: var(--fk-r-sm);
}

body.fk .fk-page-policy-edit .inf-sortlist .list-group-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 44px;
    padding: 5px 10px 5px 6px;
    background: var(--fk-surface);
    color: var(--fk-ink);
    font-size: .9rem;
}

body.fk .fk-page-policy-edit .inf-sortlist[ui-sortable] .list-group-item {
    cursor: move;
}

body.fk .fk-page-policy-edit .inf-sortlist[ui-sortable] .list-group-item:hover {
    background: var(--fk-soft);
}

body.fk .fk-page-policy-edit .inf-sortlist .list-group-item.ui-sortable-helper {
    border-radius: var(--fk-r-sm);
    box-shadow: var(--fk-shadow-2);
}

body.fk .fk-page-policy-edit .inf-sortlist .input-group {
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
}

/* published list (no handle): same left inset as the sortable one */
body.fk .fk-page-policy-edit .inf-sortlist:not([ui-sortable]) .list-group-item {
    padding-left: 14px;
}

body.fk .fk-page-policy-edit .inf-sortlist .input-group-text {
    padding: 0 8px 0 4px;
    background: transparent;
    border: 0;
    color: var(--fk-neutral);
}

body.fk .fk-page-policy-edit .inf-sortlist .form-control {
    height: 32px;
    border-radius: var(--fk-r-sm) !important;
    font-size: .9rem;
}

/* fixed names start where the text of the editable names starts (input padding + border) */
body.fk .fk-page-policy-edit .inf-sortlist .input-group > input + span.px-2 {
    padding-left: 13px !important;
}

body.fk .fk-page-policy-edit .inf-sortlist .inf-comp {
    color: var(--fk-muted);
    font-size: .82rem;
    white-space: nowrap;
}

body.fk .fk-page-policy-edit .inf-ai:not(:has(> :not(.ng-hide))) {
    display: none;
}

body.fk .fk-page-policy-edit .inf-ai {
    margin-bottom: 16px;
    text-align: center;
}

/* Read-only text of a published policy */
body.fk .fk-page-policy-edit .inf-readonly {
    padding: 12px 16px;
    background: var(--fk-soft);
    border: 1px solid var(--fk-line);
    border-radius: var(--fk-r-sm);
    color: var(--fk-ink-2);
    font-size: .9rem;
}

/* Requested data: picker + "Frictionless UX" meter */
body.fk .fk-page-policy-edit .inf-ux {
    flex: 0 1 320px;
    min-width: 200px;
}

body.fk .fk-page-policy-edit .inf-ux small {
    display: block;
    margin-bottom: 4px;
    color: var(--fk-muted);
    font-size: .75rem;
}

body.fk .fk-page-policy-edit .inf-ux .progress {
    height: auto;
    min-height: 22px;
    background: var(--fk-soft);
    border: 1px solid var(--fk-line);
    border-radius: var(--fk-r-pill);
}

body.fk .fk-page-policy-edit .inf-ux .progress-bar {
    border-radius: var(--fk-r-pill);
}

/* uib-progressbar writes bg-{{type}} (Bootstrap colours): mapped on the palette */
body.fk .fk-page-policy-edit .inf-ux .progress-bar.bg-success { background-color: var(--fk-ok) !important; }
body.fk .fk-page-policy-edit .inf-ux .progress-bar.bg-info    { background-color: var(--fk-info) !important; }
body.fk .fk-page-policy-edit .inf-ux .progress-bar.bg-warning { background-color: var(--fk-warn) !important; color: #3d2e00; }
body.fk .fk-page-policy-edit .inf-ux .progress-bar.bg-danger  { background-color: var(--fk-bad) !important; }

body.fk .fk-page-policy-edit .inf-ux .progress-bar .h5 {
    margin: 2px 6px !important;
    font-size: .9rem;
}

body.fk .fk-page-policy-edit .inf-add {
    flex-wrap: nowrap;
    max-width: 560px;
    margin-bottom: 12px;
}

body.fk .fk-page-policy-edit .inf-add .btn {
    padding-left: 12px;
    padding-right: 12px;
    color: var(--fk-ink-2);
}

/* Requested data: one chip per field with its options */
body.fk .fk-page-policy-edit .inf-fchips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.fk .fk-page-policy-edit .inf-fchip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    max-width: 100%;
    /* same height with or without the remove button (email, phone alternative) */
    min-height: 44px;
    padding: 7px 8px 7px 12px;
    background: var(--fk-soft);
    border: 1px solid var(--fk-line);
    border-radius: 10px;
    font-size: .875rem;
}

body.fk .fk-page-policy-edit .inf-fchip-name {
    color: var(--fk-ink);
    font-weight: 500;
}

/* "phone alternative" box of the email chip: on the same line as the other boxes */
body.fk .fk-page-policy-edit .inf-check-wrap {
    display: inline-flex;
    align-items: center;
}

body.fk .fk-page-policy-edit .inf-fchip .inf-icon-btn {
    width: 28px;
    height: 28px;
}

/* Treatments of the policy: one block per treatment, its editors inside */
body.fk .fk-page-policy-edit .inf-cond-edit {
    margin-top: 12px;
    padding: 14px 16px 16px;
    background: var(--fk-soft);
    border: 1px solid var(--fk-line);
    border-radius: 10px;
}

body.fk .fk-page-policy-edit .inf-cond-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

body.fk .fk-page-policy-edit .inf-cond-name {
    flex: 1 1 200px;
    min-width: 0;
    color: var(--fk-ink);
    font-weight: 600;
}

body.fk .fk-page-policy-edit .inf-channels {
    margin: 12px 0 16px;
    padding: 10px 0 0;
    border-top: 1px solid var(--fk-line);
}

body.fk .fk-page-policy-edit .inf-channels .custom-control-label {
    font-size: .85rem;
}

body.fk .fk-page-policy-edit .inf-channels .form-inline.ml-3 {
    margin-top: 4px;
    gap: 4px 0;
}

body.fk .fk-page-policy-edit .inf-channels small.w-100 {
    font-size: .78rem;
}

body.fk .fk-page-policy-edit .inf-cond-edit .note-editor.note-frame {
    background: var(--fk-surface);
}

/* Published: chips and treatment blocks */
body.fk .fk-page-policy-edit .inf-cond-ro + .inf-cond-ro {
    margin-top: 10px;
}

body.fk .fk-page-policy-edit .inf-cond-ro .inf-cond-head {
    font-weight: 400;
}

body.fk .fk-page-policy-edit .inf-cond-ro .inf-cond-head b {
    font-weight: 600;
}

body.fk .fk-page-policy-edit .inf-channels-v {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Settings */
body.fk .fk-page-policy-edit .inf-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-bottom: 20px;
}

body.fk .fk-page-policy-edit .inf-checks .inf-check {
    font-size: .9rem;
    font-weight: 600;
}

body.fk .fk-page-policy-edit .inf-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 32px;
}

body.fk .fk-page-policy-edit .inf-colors > .form-group > label {
    display: block;
}

body.fk .fk-page-policy-edit .inf-color-input {
    width: 140px;
    font-family: var(--fk-mono);
    font-size: .85rem;
}

body.fk .fk-page-policy-edit .inf-swatch {
    width: 38px !important;
    height: 38px;
}

/* Confirm: sticky bar at the bottom of the (very long) form */
body.fk .fk-page-policy-edit .inf-form-actions {
    position: -webkit-sticky;
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 12px;
    background: var(--fk-surface);
    border: 1px solid var(--fk-line);
    border-radius: var(--fk-r);
    box-shadow: 0 6px 20px rgba(20, 30, 60, .10);
}

body.fk .fk-page-policy-edit .inf-form-actions .btn {
    min-width: 120px;
}

/* The AI assistant (fixed bottom-right, when enabled) would cover Confirm: Confirm moves left */
body.fk .fk-page-policy-edit:has(~ .chatbox) .inf-form-actions {
    justify-content: flex-start;
}

/* jQuery UI datepicker (appended to body, inline z-index 1): above the sticky Confirm bar */
body.fk:has(.fk-page-policy-edit) #ui-datepicker-div {
    z-index: 1010 !important;
}


/* -----------------------------------------------------------------------------------------------------
   7. Project modal (fk-modal on the template's container-fluid)
   ----------------------------------------------------------------------------------------------------- */
body.fk .inf-prj-modal .form-group {
    margin-bottom: 14px;
}

body.fk .inf-prj-modal .inf-stack > .form-control + .form-control {
    margin-top: 8px;
}

body.fk .inf-prj-modal .inf-modal-section {
    margin: 20px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--fk-line);
    color: var(--fk-ink);
    font-size: .95rem;
    font-weight: 600;
}

body.fk .inf-prj-modal .inf-mono {
    font-family: var(--fk-mono);
    font-size: .82rem;
}

body.fk .inf-prj-modal .input-group-append .btn {
    padding-left: 12px;
    padding-right: 12px;
    color: var(--fk-ink-2);
}

body.fk .inf-prj-modal .inf-alert {
    display: block;
    margin: 8px 0 0;
    padding: 8px 12px;
    font-size: .82rem;
    font-weight: 500;
}

body.fk .inf-prj-modal .form-check {
    margin-bottom: 10px;
}

body.fk .inf-prj-modal .form-check-label {
    color: var(--fk-ink);
    font-size: .9rem;
}

body.fk .inf-prj-modal .inf-subfield {
    max-width: 340px;
    margin: 6px 0 4px;
    padding: 0;
}

body.fk .inf-prj-modal .inf-subfield .form-control:disabled {
    opacity: .7;
}

body.fk .inf-prj-modal .fk-modal-actions .btn {
    min-width: 120px;
}


/* -----------------------------------------------------------------------------------------------------
   8. Responsive
   ----------------------------------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    body.fk .fk-page-policies .inf-picker .btn {
        margin-left: 0;
    }

    body.fk .fk-page-policies .inf-picker select.form-control {
        flex-basis: 100%;
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    /* accordion row: status badges under the title */
    body.fk .fk-inf .inf-head {
        flex-wrap: wrap;
        row-gap: 0;
    }

    body.fk .fk-inf .inf-head > .fk-item-head {
        flex-basis: 0;
    }

    body.fk .fk-inf .inf-head > .inf-status {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        justify-content: flex-start;
        padding: 0 0 12px 16px;
        margin-top: -4px;
    }

    body.fk .fk-inf .inf-head > .fk-chevron {
        order: 2;
    }

    body.fk .fk-inf .inf-toolbar .inf-push {
        margin-left: 0;
    }

    /* key/value: one column, as the theme's fk-kv on phones (the page rules above set two) */
    body.fk .fk-page-projects .fk-kv,
    body.fk .fk-page-policies .fk-kv {
        grid-template-columns: minmax(0, 1fr);
    }

    body.fk .fk-inf .inf-cond .fk-kv {
        gap: 2px;
    }

    body.fk .fk-inf .inf-cond {
        padding: 10px 12px;
    }

    body.fk .fk-inf .fk-item-body {
        padding: 14px;
    }

    body.fk .fk-page-conditions .inf-row {
        padding: 10px 12px;
    }

    body.fk .fk-page-conditions .inf-row .fk-item-title {
        flex-basis: calc(100% - 48px);
    }

    body.fk .fk-page-conditions .inf-row-actions {
        width: 100%;
    }

    body.fk .fk-page-policy-edit .inf-section {
        padding: 14px 12px;
    }

    body.fk .fk-page-policy-edit .inf-cond-edit {
        padding: 12px 10px 12px;
    }

    body.fk .fk-page-policy-edit .inf-ux {
        flex-basis: 100%;
    }

    body.fk .fk-page-policy-edit .inf-form-actions .btn {
        flex: 1 1 auto;
    }
}
