/* The mask preview popover (Messages.WebUi's MaskPreviewPopover renders it). Global: index.html links this file right
   after loading-overlay.css, where the rules stood in app.css. */

/* ============================================================
   Shared Module Mask Preview Popover
   Used by MessageSidebar (Links tab).
   Position (top/left/right) is set inline by the host component.
   ============================================================ */

.lv-mask-preview {
    position: fixed;
    z-index: 11000;
    width: min(780px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    border-radius: 12px;
    overflow: hidden;
    background: #f8fbfd;
    border: 1px solid rgba(23, 57, 88, 0.14);
    box-shadow: 0 18px 40px rgba(16, 42, 67, 0.24);
    pointer-events: auto;
    animation: lv-mask-preview-fadein 0.15s ease-out;
}

@keyframes lv-mask-preview-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.lv-mask-preview__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #102a43 0%, #173958 100%);
    color: #ffffff;
    font-size: 12px;
}

.lv-mask-preview__module {
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.lv-mask-preview__section {
    color: rgba(255, 255, 255, 0.78);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lv-mask-preview__body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: min(718px, calc(100vh - 74px));
    overflow: auto;
}

.lv-mask-preview--sidebar .lv-mask-preview__body {
    max-height: calc(100vh - 150px);
}

.lv-mask-preview__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 9px;
    background: rgba(16, 42, 67, 0.03);
    min-width: max-content;
}

.lv-mask-preview__row--target {
    background: #fff3bf;
    outline: 2px solid #d98b00;
    box-shadow: inset 5px 0 0 #a24b00;
}

.lv-mask-preview__label {
    color: #234;
    font-size: 13px;
    flex: 1 1 260px;
    min-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lv-mask-preview__var {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.lv-mask-preview__value {
    font-weight: 700;
    color: #173958;
    font-variant-numeric: tabular-nums;
}

.lv-mask-preview__value--target {
    color: #ffffff;
    background: #102a43;
    border-radius: 6px;
    padding: 2px 7px;
}

.lv-mask-preview__value--calc {
    text-decoration: underline dotted;
}

.lv-mask-preview__unit {
    font-size: 12px;
    color: #5d7285;
    white-space: nowrap;
}

.lv-mask-preview__var--target .lv-mask-preview__unit {
    color: #5a3300;
    font-weight: 700;
}
