.document-form .form-group.is-required > label::after {
    content: " *";
    color: #dc3545;
    font-weight: 600;
}

.doc-ux-updated {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    color: #71787e;
    white-space: nowrap;
}

.doc-ux-lang {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(0, 84, 209, .07);
}

.document-header-tools .doc-ux-lang-item a.doc-ux-lang-btn,
.doc-ux-lang-btn {
    width: auto;
    height: 30px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    line-height: 30px;
    color: #0054D1;
    background: transparent;
    text-decoration: none;
    display: inline-block;
    transition: background-color .18s ease, color .18s ease;
}

.document-header-tools .doc-ux-lang-item a.doc-ux-lang-btn:hover,
.document-header-tools .doc-ux-lang-item a.doc-ux-lang-btn:focus-visible {
    background: #fff;
    color: #0054D1;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 84, 209, .18);
}

.document-header-tools .doc-ux-lang-item a.doc-ux-lang-btn:focus-visible {
    box-shadow: 0 0 0 2px #0054D1;
}

.doc-ux-lang-btn.is-current {
    background: linear-gradient(135deg, #0054D1, #2F7BFF);
    color: #fff;
    box-shadow: 0 4px 10px -4px rgba(0, 84, 209, .5);
}

.doc-ux-lang-btn.is-disabled {
    color: #b8bec4;
    background: transparent;
    cursor: not-allowed;
}

.document-header-tools .doc-ux-lang-item:hover {
    opacity: 1;
}

.document-view-wrapper .structures.structure-empty {
    background-color: rgba(255, 204, 0, .22);
    border-bottom: 1px dashed #e0a800;
}

.document-view-wrapper .structures.structure-link {
    cursor: pointer;
}

.document-view-wrapper .structures.structure-link:hover {
    background-color: rgba(81, 143, 235, .18);
}

.document-view-wrapper .structures.active,
.document-view-wrapper .structures.structure-pulse {
    background-color: #cdddf6;
    outline: 2px solid rgba(81, 143, 235, .45);
    border-radius: 2px;
}

.document-view.doc-ux-overlay-off .document-view-background,
.document-view.doc-ux-overlay-off .document-view-download {
    display: none !important;
}

.doc-ux-restore {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #eef4fd;
    border: 1px solid #c9d8f3;
    border-radius: 6px;
    font-size: 14px;
    color: #1d3b6a;
}

.doc-ux-restore-actions .btn + .btn {
    margin-left: 6px;
}

.document-sidebar a.is-complete .count {
    color: #fff;
}

.doc-ux-tabs,
.doc-ux-bottom-bar {
    display: none;
}

@media (max-width: 991.98px) {
    .document-wrapper {
        margin-bottom: 80px;
        overflow-x: hidden;
    }

    .document-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 16px 12px;
        margin-bottom: 12px;
    }

    .document-header .document-title {
        flex: 1 1 100%;
        min-width: 0;
    }

    .document-header h3 {
        overflow-wrap: anywhere;
    }

    .doc-ux-updated {
        display: block;
        margin: 4px 0 0;
        white-space: normal;
    }

    .document-header-tools {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .document-header-tools li {
        margin: 0 3px;
    }

    .document-sidebar,
    .document-header-tools li.ui-tool-view,
    .document-header-tools li.ui-tool-view + li.ui-tool-sep {
        display: none;
    }

    .doc-ux-tabs {
        display: flex;
        gap: 4px;
        margin: 0 12px 12px;
        padding: 4px;
        border-radius: 12px;
        background: #EEF3FB;
        position: sticky;
        top: 0;
        z-index: 20;
        background: #fff;
    }

    .doc-ux-tab {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: #0054D1;
        padding: 9px 0;
        font-weight: 600;
        font-size: 15px;
    }

    .doc-ux-tab .ui-icon {
        width: 19px;
        height: 19px;
    }

    .doc-ux-tab.is-active {
        background: linear-gradient(135deg, #0054D1, #2F7BFF);
        color: #fff;
        box-shadow: 0 6px 14px -6px rgba(0, 84, 209, .55);
    }

    .doc-ux-tab:focus-visible {
        outline: none;
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0054D1;
    }

    .document-content {
        display: block;
        height: auto;
    }

    .document-form {
        min-width: 0;
    }

    .document-form-scroll {
        overflow: visible;
        height: auto;
        padding: 0 12px;
    }

    .document-view {
        display: none;
        margin: 0 12px;
        height: calc(100vh - 170px);
        transform: none;
        flex: none;
    }

    .document-view.document-view-hidden {
        transform: none;
        border: 1px solid #ebebeb;
    }

    .document-view-scroll {
        padding: 0 4px;
        overflow-x: hidden;
    }

    body.doc-ux-show-preview .document-form {
        display: none;
    }

    body.doc-ux-show-preview .document-view {
        display: block;
    }

    .doc-ux-bottom-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #e3e6ea;
        box-shadow: 0 -3px 10px rgba(0, 0, 0, .06);
    }

    .doc-ux-bottom-progress {
        flex: 1;
        min-width: 0;
        height: 44px;
        line-height: 44px;
        padding: 0 12px;
        border-radius: 12px;
        background-color: #f1f3f5;
        background-image: linear-gradient(#d6f0d6, #d6f0d6);
        background-repeat: no-repeat;
        background-size: 0 100%;
        font-size: 14px;
        font-weight: 600;
        color: #2f6b2f;
    }

    .doc-ux-bottom-btn.ui-icon-tile {
        width: auto;
        height: 44px;
        min-width: 44px;
        padding: 0 12px;
        gap: 6px;
        border-radius: 12px;
        font-weight: 700;
        font-size: 13px;
        letter-spacing: .02em;
    }

    .doc-ux-bottom-btn.ui-icon-tile .ui-badge,
    .doc-ux-bottom-btn.ui-icon-tile .ui-badge-text {
        display: none;
    }

    .doc-ux-bottom-btn.ui-icon-tile:hover {
        transform: none;
    }
}

@media print {
    .doc-ux-bottom-bar,
    .doc-ux-tabs,
    .doc-ux-restore {
        display: none !important;
    }
}

/* Icons come from IconHelper; see icons.css. */
.doc-ux-lang-item .ui-icon-tile {
    margin-right: 6px;
}

.doc-ux-updated .ui-icon {
    width: 15px;
    height: 15px;
    margin-right: 3px;
    vertical-align: -.2em;
    color: #2B6CE6;
}
