/* Plugin catalog (index.html only). Loaded after main.css. */
:root {
    --btn-h: 32px;
    --btn-gap: 6px;
    /* Two stacked buttons: every row and thumbnail uses this height. */
    --row-h: calc(var(--btn-h) * 2 + var(--btn-gap));
    --topbar-h: 66px;
}

.catalog {
    width: min(1180px, 94%);
    margin: 38px auto 70px;
}
.catalog-scroll { overflow-x: auto; }

/* Intro blurb above the table, in the same panel style as the manuals. */
.catalog-intro {
    margin-bottom: 26px;
    padding: clamp(20px, 3vw, 32px);
    background: rgba(17,25,39,.88);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    box-shadow: 0 12px 35px rgba(0,0,0,.22);
}
.catalog-intro p { margin: 0 0 14px; }
/* Donate / Beta Info buttons between the table and the details panel.
   Equal-width columns, each as wide as the widest button. */
.catalog-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 12px;
    width: fit-content;
    margin: 22px auto 0;
}
.catalog-actions .download-btn {
    width: 100%;
    min-width: 140px;
    margin: 0;
    justify-content: center;
}
.catalog-intro .note { margin: 0; }

.plugin-table { 
    background: rgba(94, 5, 94, 0.88);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    margin: 0; 
    border: 0;
}
.plugin-table td { 
    border-radius: 6px;
    vertical-align: middle; 
}
.plugin-table th { 
    border-radius: 6px;
    vertical-align: middle; 
}
.plugin-table td:first-child,
.plugin-table td:nth-child(2),
.plugin-table td:nth-child(5),
.plugin-table td:nth-child(6),
.plugin-table td:nth-child(7) { width: 1%; white-space: nowrap; }

/* Thumbnail matches the height of the button column. */
.thumb {
    display: block;
    height: var(--row-h);
    width: auto;
    border-radius: 4px;
    cursor: zoom-in;
    transition: opacity .15s ease;
}
.thumb:hover { opacity: .85; }

/* Buttons fill a fixed-height stack so one- and two-button rows match. */
.btn-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--btn-gap);
    height: var(--row-h);
    min-width: 110px;
}
.plugin-table .download-btn {
    width: 100%;
    height: var(--btn-h);
    margin: 0;
    padding: 0 14px;
    justify-content: center;
    line-height: 1;
}

/* Close button shared by the lightbox and the details panel. */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    background: var(--panel-main);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.close-btn:hover { background: var(--accent); color: #0b121f; }

/* Lightbox: the image always fits the viewport, so nothing scrolls. */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000; /* above the main site's fixed menu (z-index 1000) */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5,9,16,.88);
    padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
body.no-scroll { overflow: hidden; }

/* Details panel below the table: the manual's content is placed here directly,
   so it flows with the page instead of scrolling inside a frame. */
.details-panel { margin-top: 26px; outline: none; }
.details-panel[hidden] { display: none; }
.details-panel .page { width: 100%; margin: 0; }
.details-error { color: var(--muted); }

@media (max-width: 520px) {
    .catalog { margin-top: 20px; }
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 26px;
}

.headerimg {
display: block;
    width: 100%;
    max-width: 1180px;
    height: auto;
}

.notices {
    margin-top: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 2, 48, 0.88);
    padding: 16px;
}
/* The notices reuse .plugin-table, so undo the catalog's no-wrap columns
   and let the table shrink with its container. */
.notices .plugin-table {
    width: 100%;
    min-width: 0;
}
.notices .plugin-table td {
    width: auto;
    white-space: normal;
    overflow-wrap: anywhere;
}
.notices .plugin-table td[rowspan] { width: 1%; }
/* Fixed width: a % width here would collapse against the shrink-to-fit cell. */
.notices .vst-logo { display: block; width: 81px; max-width: none; height: auto; }

@media (max-width: 520px) {
    .notices { padding: 10px; }
    .notices .plugin-table { font-size: 11px; }
    .notices .plugin-table td[rowspan] { padding-left: 8px !important; }
    .notices .vst-logo { width: 52px; }
}

.brand-ctrl {
    color: #ffa6fc;
  }