/*
 * =========================================================
 * FILE        :: /public/assets/css/core/page-report.css
 * DOMAIN      :: Core
 * LAYER       :: Presentation Asset
 * PURPOSE     :: Style BusinessOS Copy Page Report compact utility and fallback dialog
 * OWNER       :: Core Runtime Authority
 * VERSION     :: 1.0.0
 * =========================================================
 */

.bos-page-report-utility {
    position: sticky;
    top: 0;
    z-index: 1010;
    width: min(100%, 1120px);
    margin: -1rem auto 1rem;
    display: grid;
    justify-items: center;
    gap: 0;
}

.bos-page-report-tab {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, .34);
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, .98);
    color: #1e293b;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
    cursor: pointer;
    font-weight: 800;
}

html[data-theme="dark"] .bos-page-report-tab,
body.dark-mode .bos-page-report-tab {
    border-color: var(--bos-border-strong);
    background: var(--bos-surface-elevated);
    color: var(--bos-text-primary);
    box-shadow: var(--bos-shadow-elevated);
}

html[data-theme="dark"] .bos-page-report-tab:hover,
body.dark-mode .bos-page-report-tab:hover {
    border-color: var(--bos-link);
    background: var(--bos-surface-hover);
    color: var(--bos-link);
}

.bos-page-report-tab:hover {
    border-color: rgba(37, 99, 235, .54);
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .16);
}

.bos-page-report-tab:focus,
.bos-page-report-panel__close:focus,
.bos-page-report-button:focus {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

.bos-page-report-tab__chevron {
    font-size: 1rem;
    line-height: 1;
    transition: transform .16s ease;
}

.bos-page-report-utility.is-open .bos-page-report-tab__chevron {
    transform: rotate(180deg);
}

.bos-page-report-tab__label {
    display: none;
    font-size: .75rem;
    line-height: 1;
    white-space: nowrap;
}

@media (min-width: 1080px) {
    .bos-page-report-tab__label {
        display: inline;
    }
}

.bos-page-report-panel[hidden] {
    display: none;
}

.bos-page-report-panel {
    width: min(760px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, auto);
    align-items: center;
    gap: 12px 18px;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .13);
}

html[data-theme="dark"] .bos-page-report-panel,
body.dark-mode .bos-page-report-panel {
    border-color: var(--bos-border-default);
    background: var(--bos-surface-elevated);
    color: var(--bos-text-primary);
    box-shadow: var(--bos-shadow-elevated);
}

html[data-theme="dark"] .bos-page-report-panel__header span,
html[data-theme="dark"] .bos-page-report-panel__help,
html[data-theme="dark"] .bos-page-report-status,
body.dark-mode .bos-page-report-panel__header span,
body.dark-mode .bos-page-report-panel__help,
body.dark-mode .bos-page-report-status {
    color: var(--bos-text-muted);
}

html[data-theme="dark"] .bos-page-report-panel__header h2,
body.dark-mode .bos-page-report-panel__header h2 {
    color: var(--bos-text-primary);
}

html[data-theme="dark"] .bos-page-report-panel__close,
html[data-theme="dark"] .bos-page-report-button--secondary,
body.dark-mode .bos-page-report-panel__close,
body.dark-mode .bos-page-report-button--secondary {
    border-color: var(--bos-border-strong);
    background: var(--bos-surface-input);
    color: var(--bos-text-primary);
}

.bos-page-report-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.bos-page-report-panel__header span {
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bos-page-report-panel__header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.25;
}

.bos-page-report-panel__close {
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.bos-page-report-panel__help {
    grid-column: 1 / -1;
    margin: -4px 0 0;
    color: #475569;
    font-size: .88rem;
    line-height: 1.45;
}

.bos-page-report-panel__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.bos-page-report-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #2563eb;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.bos-page-report-button--secondary {
    border-color: #cbd5e1;
    background: #fff;
    color: #0f172a;
}

.bos-page-report-button[disabled] {
    opacity: .65;
    cursor: not-allowed;
}

.bos-page-report-status {
    margin: 0;
    color: #475569;
    font-size: .84rem;
    line-height: 1.35;
}

.bos-page-report-modal[hidden] {
    display: none;
}

.bos-page-report-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
}

.bos-page-report-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}

.bos-page-report-modal__dialog {
    position: relative;
    width: min(920px, calc(100vw - 28px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    display: grid;
    grid-template-rows: auto minmax(280px, 1fr) auto;
    gap: 14px;
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .32);
}

.bos-page-report-modal__dialog header,
.bos-page-report-modal__dialog footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.bos-page-report-modal__dialog header span {
    color: #9a3412;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bos-page-report-modal__dialog h2,
.bos-page-report-modal__dialog p {
    margin: 0;
}

.bos-page-report-modal__dialog header button {
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
}

.bos-page-report-modal textarea {
    width: 100%;
    min-height: 320px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .9rem;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .bos-page-report-utility {
        position: sticky;
        top: 0;
        width: 100%;
        margin: -1rem auto .85rem;
    }

    .bos-page-report-tab {
        border-radius: 0 0 999px 999px;
    }

    .bos-page-report-panel {
        width: calc(100vw - 28px);
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
        border-radius: 16px;
    }

    .bos-page-report-panel__actions {
        justify-content: stretch;
    }

    .bos-page-report-modal__dialog header,
    .bos-page-report-modal__dialog footer {
        align-items: stretch;
        flex-direction: column;
    }

    .bos-page-report-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .bos-page-report-tab,
    .bos-page-report-panel {
        transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
    }
}
