/* Chrome for the in-dashboard dialogs that replaced navigations away from /dashboard:
   DocumentPreviewDialog, BlogPostPreviewDialog, LeaveReviewDialog, CsvImportResultDialog,
   and the CSV import result banner rendered by the admin sections. */

/* ── Shared ────────────────────────────────────────────────────────────────── */

/* Dialog header text. Matches the weight the older dialogs set inline. */
.pvd-title {
    font-weight: 700;
}

.pvd-muted {
    color: var(--antologa-gray);
}

/* ── DocumentPreviewDialog ─────────────────────────────────────────────────── */

.docprev-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* Tall enough for a portrait licence scan, capped so the dialog actions stay on screen. */
    height: min(70vh, 720px);
    background: var(--antologa-surface-muted, #f5f5f5);
    border: 1px solid var(--antologa-light-gray, #e0e0e0);
    border-radius: 0.5rem;
    overflow: auto;
}

.docprev-img {
    max-width: 100%;
    max-height: 100%;
}

.docprev-pdf {
    width: 100%;
    border: 1px solid var(--antologa-light-gray, #e0e0e0);
}

/* ── BlogPostPreviewDialog ─────────────────────────────────────────────────── */

.bpp-body {
    max-height: 68vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.bpp-cover {
    width: 100%;
    max-height: 260px;
    border-radius: 0.75rem;
}

.bpp-headline {
    font-weight: 800;
}

.bpp-excerpt {
    font-style: italic;
}

/* The post body is author-supplied HTML — keep wide content inside the dialog
   rather than letting a stray table or <pre> force the page to scroll sideways. */
.bpp-body img,
.bpp-body table,
.bpp-body pre {
    max-width: 100%;
}

.bpp-body pre {
    overflow-x: auto;
}

/* ── CsvImportResultDialog ─────────────────────────────────────────────────── */

.csvres-errors {
    max-height: 22rem;
    overflow: auto;
}

/* ── CSV import result banner (admin sections) ─────────────────────────────── */

.csvbanner-list {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}

.csvbanner-list li {
    font-size: 0.8rem;
}

/* ── Support ticket attachment thumbnails ──────────────────────────────────── */

.ticket-attachment-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid var(--antologa-light-gray, #e0e0e0);
    cursor: pointer;
}

@media (max-width: 600px) {
    .docprev-frame { height: 60vh; }
    .bpp-body      { max-height: 60vh; }
}
