/* /download (app/Providers/Interface/Download.php): the game launcher window. Platform tabs on the
   left, the chosen platform on the right over the login scene, and the launcher's status bar with
   its big Play / Download button at the foot. Tokens only, so the light theme follows. */

.dl-launcher {
    position: relative;
    background: linear-gradient(180deg, var(--hx-body-top), var(--hx-body-bottom));
    border: 1px solid var(--hx-edge);
    clip-path: var(--hx-shape);
    box-shadow: 0 24px 60px rgba(var(--hx-shadow-rgb), calc(.45 * var(--hx-shadow-k)));
}

/* the window's title bar */
.dl-launcher__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 20px;
    background: linear-gradient(180deg, var(--hx-head-top), var(--hx-head-bottom));
    border-bottom: 1px solid var(--hx-edge-soft);
    color: var(--hx-ice);
}
.dl-launcher__bar img { border-radius: 4px; }
.dl-launcher__bar b { font-family: var(--hx-font-display); letter-spacing: .08em; font-size: .95rem; }
.dl-launcher__ver {
    padding: 1px 8px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--hx-accent);
    background: var(--hx-chip);
    border: 1px solid var(--hx-edge-soft);
    clip-path: var(--hx-shape-sm);
}
.dl-launcher__dots { margin-left: auto; display: inline-flex; gap: 6px; }
.dl-launcher__dots i { width: 12px; height: 12px; border: 1px solid var(--hx-edge-soft); background: var(--hx-chip); clip-path: var(--hx-shape-sm); }
.dl-launcher__dots i:last-child { background: color-mix(in srgb, var(--hx-bad) 55%, var(--hx-chip)); }

.dl-launcher__body { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); min-height: 420px; }

/* platform tabs */
.dl-launcher__tabs { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--hx-inset); border-right: 1px solid var(--hx-line); }
.dl-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--hx-text-dim);
    font-weight: 600;
    border: 1px solid transparent;
    clip-path: var(--hx-shape-sm);
    transition: color .2s, background .2s, border-color .2s;
}
.dl-tab i { width: 22px; text-align: center; font-size: 1.15rem; color: var(--hx-accent); }
.dl-tab span:not(.dl-tab__dot) { flex: 1; min-width: 0; }
.dl-tab:hover { color: var(--hx-ice); background: var(--hx-chip); }
.dl-tab.is-on { color: var(--hx-ice); background: linear-gradient(90deg, color-mix(in srgb, var(--hx-gold) 16%, transparent), transparent); border-color: color-mix(in srgb, var(--hx-gold) 45%, transparent); box-shadow: inset 3px 0 0 var(--hx-gold); }
.dl-tab.is-on i { color: var(--hx-gold); }
.dl-tab__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hx-text-faint); flex-shrink: 0; }
.dl-tab__dot.is-ready { background: var(--hx-good); box-shadow: 0 0 8px var(--hx-good); }

/* the selected platform, over the login scene (always a dark scene, like PageBanner) */
.dl-launcher__view {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    min-width: 0;
    background: var(--hx-void);
}
.dl-launcher__view::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url("/resources/GWHelios/web/helios-login.jpg") 95% 45% / cover no-repeat;
    filter: blur(1.5px) saturate(1.1);
    transform: scale(2.2);
    transform-origin: 95% 45%;
}
.dl-launcher__view::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, color-mix(in srgb, var(--hx-void) 92%, transparent), color-mix(in srgb, var(--hx-void) 55%, transparent) 70%, color-mix(in srgb, var(--hx-void) 35%, transparent));
}
.dl-pane { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: clamp(18px, 3vw, 32px); min-width: 0; color: var(--hx-text); }
.dl-launcher.is-tabbed .dl-pane:not(.is-on) { display: none; }
.dl-launcher:not(.is-tabbed) .dl-pane + .dl-pane { border-top: 1px solid var(--hx-line); }
.dl-pane { scroll-margin-top: calc(var(--hx-topbar-h) + 16px); }
.dl-pane__main { display: flex; gap: 22px; align-items: flex-start; }
.dl-pane__icon {
    width: 86px;
    height: 86px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: var(--hx-gold);
    background: var(--hx-socket);
    border: 1px solid color-mix(in srgb, var(--hx-gold) 50%, transparent);
    clip-path: var(--hx-shape-sm);
    box-shadow: inset 0 0 26px color-mix(in srgb, var(--hx-gold) 22%, transparent);
}
.dl-pane__copy { min-width: 0; }
.dl-pane__name { font-family: var(--hx-font-display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 4px; color: var(--hx-ice); text-shadow: 0 2px 12px rgba(var(--hx-shadow-rgb), .7); }
.dl-pane__meta { margin: 0 0 8px; font-weight: 700; color: var(--hx-gold); }
.dl-pane__note { margin: 0 0 16px; color: var(--hx-text-dim); max-width: 620px; }
.dl-plates { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-plate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--hx-ice);
    background: color-mix(in srgb, var(--hx-void) 60%, transparent);
    border: 1px solid var(--hx-edge-soft);
    clip-path: var(--hx-shape-sm);
}
.dl-plate i { color: var(--hx-accent); }

/* the launcher's status bar and its big button */
.dl-pane__foot {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--hx-line);
}
.dl-pane__status { flex: 1; min-width: 0; }
.dl-pane__actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 240px; }
.dl-play { justify-content: center; }

/* The launcher scene is dark in both themes: in the light theme it keeps the dark theme's ink and
   steel (the same values as :root in helios.css), like the /play game window. */
[data-theme="light"] .dl-launcher__view {
    --hx-void: #04070e;
    --hx-text: #e4eef8;
    --hx-text-dim: #b5c4d6;
    --hx-text-faint: #7d90a8;
    --hx-ice: #ecf6ff;
    --hx-accent: #80ecff;
    --hx-teal: #46e2f5;
    --hx-teal-hot: #a0f6ff;
    --hx-gold: #ffcc60;
    --hx-gold-deep: #d9a43a;
    --hx-good: #6eec8c;
    --hx-edge-soft: rgba(115, 164, 210, .35);
    --hx-edge-faint: rgba(115, 164, 210, .14);
    --hx-line: rgba(128, 236, 255, .16);
    --hx-chip: rgba(14, 24, 42, .72);
    --hx-socket: radial-gradient(circle at 50% 35%, #1d3352, #0a1424);
    --hx-well: rgba(2, 5, 13, .7);
    --hx-teal-rgb: 70, 226, 245;
    --hx-steel-rgb: 115, 164, 210;
    --hx-steel-lo: #0d192d;
    --hx-steel-hi: #243e62;
    --hx-steel-hover-lo: #0a3a58;
    --hx-steel-hover-hi: #2284aa;
    --hx-hover-text: #fff;
    --hx-btn-text: #e4eef8;
    --hx-shadow-rgb: 0, 0, 0;
    --hx-shadow-k: 1;
    color-scheme: dark;
}

/* requirements + FAQ */
.dl-req__name { width: 34%; color: var(--hx-ice) !important; font-weight: 700; white-space: nowrap; }
.dl-faq { margin: 0; }
.dl-faq dt { color: var(--hx-ice); font-weight: 700; margin-top: 14px; }
.dl-faq dt:first-child { margin-top: 0; }
.dl-faq dd { color: var(--hx-text-dim); margin: 2px 0 0; }

@media (max-width: 991.98px) {
    .dl-launcher__body { grid-template-columns: minmax(0, 1fr); }
    .dl-launcher__tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--hx-line); padding: 8px; scrollbar-width: thin; }
    .dl-tab { flex: 0 0 auto; padding: 10px 12px; }
    .dl-tab.is-on { box-shadow: inset 0 -3px 0 var(--hx-gold); }
}
@media (max-width: 575.98px) {
    .dl-launcher__ver { display: none; }
    .dl-pane__main { flex-direction: column; gap: 14px; }
    .dl-pane__icon { width: 64px; height: 64px; font-size: 1.8rem; }
    .dl-pane__foot { flex-direction: column; align-items: stretch; }
    .dl-pane__actions { min-width: 0; }
    .dl-req__name { white-space: normal; }
}
.dl-pane .hx-btn { white-space: normal; }
