/*
 * Settings window (ADR 0027 D8): inside the modal the menu and the pane keep one height and scroll on their own, so
 * the window does not jump while sections change. The look is Metronic's (ver-inline-menu, tabbable-line, portlet);
 * these are layout rules only. On a phone the two stack and scroll with the window.
 */
@media (min-width: 768px) {
    .modal [data-settings-shell] > [data-settings-menu],
    .modal [data-settings-shell] > [data-settings-pane] {
        height: calc(100vh - 220px);
        min-height: 320px;
        overflow-y: auto;
    }
}

/*
 * The pane's title takes the focus when a section arrives, so a phone scrolls down to it and a screen reader starts
 * there. It is not a control: no focus ring around a heading.
 */
[data-settings-title]:focus {
    outline: 0;
}

/*
 * A value that can be changed reads as a control (29.11.2026): a framed value with a pencil, not a bare word the eye
 * takes for text. x-editable starts only on the click (jit_edit), so the link has no class of its own until then; the
 * signed token marks it. A value the viewer may not change has no token and stays plain text.
 */
[data-setting] a[data-editable-token] {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding: 3px 28px 3px 10px;
    border: 1px dashed #c2cad8;
    border-radius: 3px;
    color: #337ab7;
    white-space: normal;
    text-decoration: none;
    cursor: pointer;
}

[data-setting] a[data-editable-token]::after {
    content: "\f040";
    position: absolute;
    top: 50%;
    right: 9px;
    font-family: FontAwesome;
    font-size: 12px;
    color: #8896a0;
    transform: translateY(-50%);
}

[data-setting] a[data-editable-token]:hover,
[data-setting] a[data-editable-token]:focus {
    border-color: #5c9bd1;
    background: #f2f6f9;
}

/*
 * The inline form opened in a narrow column stays in it: the field takes the column's width and the buttons go under
 * it, instead of the select running past the row's edge.
 */
[data-setting] .editable-container.editable-inline {
    display: block;
    max-width: 100%;
    white-space: normal;
}

[data-setting] .editable-container .editableform .control-group,
[data-setting] .editable-container .editableform .form-group,
[data-setting] .editable-container .editable-input {
    display: block;
    max-width: 100%;
}

[data-setting] .editable-container .editable-input select,
[data-setting] .editable-container .editable-input input,
[data-setting] .editable-container .editable-input textarea {
    width: 100%;
    max-width: 100%;
}

[data-setting] .editable-container .editable-buttons {
    display: block;
    margin: 7px 0 0;
}
