/*
 * Copyright (c) 2024–2026 Pyracor Engineering Inc. (Qikspace)
 * All rights reserved.
 *
 * This file is part of the Qikspace AI Transaction Platform.
 *
 * CONFIDENTIAL AND PROPRIETARY — NOT FOR DISTRIBUTION
 *
 * Unauthorized use prohibited. accounts@qikspace.com | qikspace.com
 *
 * SPDX-License-Identifier: LicenseRef-Qikspace-Proprietary
 */

/* Global inline file-viewer popup (see file_open.js). Theme tokens come from
   style.css; fallbacks keep it readable if a page hasn't loaded them. */
.qfp-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
}
.qfp-modal.qfp-hidden { display: none; }

.qfp-dialog {
    display: flex;
    flex-direction: column;
    width: 92%;
    max-width: 900px;
    height: 88%;
    max-height: 900px;
    background: var(--bg-panel, #ffffff);
    border: 1px solid var(--border-subtle, #d0d0d0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.qfp-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-panel, #ffffff);
    border-bottom: 1px solid var(--border-subtle, #d0d0d0);
}
.qfp-title {
    flex: 1 1 auto;
    font-weight: 600;
    color: var(--text-main, #111111);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qfp-close {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: var(--text-main, #111111);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.qfp-close:hover { background: rgba(108, 92, 231, 0.14); }

.qfp-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: var(--bg-main, #ffffff);
}
.qfp-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* Text files render in a themed <pre> (not an iframe) so they follow light/dark. */
.qfp-text {
    align-self: stretch;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 16px;
    overflow: auto;
    box-sizing: border-box;
    background: var(--bg-main, #ffffff);
    color: var(--text-main, #111111);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
}
