/* ===================================================================
   public/css/solaice-footer.css

   The parts every SOLAICE page shares: the footer line, the clickable
   [keys] and [links], and the help / info windows. Used together with
   app/Views/partials/footer.php and public/js/solaice-footer.js.

   Load it BEFORE a page's own <style>, so a page can still adjust
   anything here (for example the footer's spacing).
   =================================================================== */

:root {
    --phosphor:       #33ff33;   /* the screen's lit green */
    --phosphor-soft:  #a3ffa3;   /* lighter green for body text */
    --phosphor-dim:   #1f9a2a;   /* dimmed text: credits, version */
    --screen:         #031204;   /* unlit phosphor, green-black */
    --screen-edge:    #000400;   /* where the tube curves away */
    --glow:           rgba(51, 255, 51, 0.55);
    --font:           'VT323', 'Courier New', Courier, monospace;
}

/* ---- The footer line --------------------------------------------- */

.sol-credits {
    margin: clamp(1.25rem, 4vh, 2.5rem) 0 0;
    font-size: 0.8em;
    color: var(--phosphor-dim);
    text-shadow: none;
}

/* ---- Clickable keys and links ---------------------------------------
   [help], [info], [Terminal], [eldr AI], [fennaio] and the keys in the
   windows: the same white-hot phosphor as "AI" in the title, with a
   dashed outline on hover. */

.sol-key,
.sol-link,
.sol-link:visited {
    color: #d9ffd9;
    text-shadow:
        0 0 4px #ffffff,
        0 0 14px var(--phosphor);
    white-space: nowrap;
    cursor: pointer;
}

.sol-link,
.sol-link:hover,
.sol-link:focus {
    text-decoration: none;
}

.sol-key:hover,
.sol-key:focus-visible,
.sol-link:hover,
.sol-link:focus-visible {
    color: #ffffff;
    outline: 2px dashed var(--phosphor);
    outline-offset: 2px;
}

/* "Press" on computers, "Tap" on phones and tablets. */
.sol-tap {
    display: none;
}

@media (hover: none) {
    .sol-press { display: none; }
    .sol-tap   { display: inline; }
}

/* ---- Help and info windows -------------------------------------------
   Black, with the bright green border and glow used across the site.
   Native <dialog>: keyboard focus stays inside while it's open. */

/* Hidden until opened (another stylesheet can override the browser's
   own rule for <dialog>). */
.sol-modal:not([open]) {
    display: none !important;
}

.sol-modal {
    box-sizing: border-box;
    width: min(36rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 2px solid var(--phosphor);
    border-radius: 14px;
    background: #000000;
    color: var(--phosphor-soft);
    font-family: var(--font);
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    line-height: 1.35;
    text-align: left;
    text-shadow: 0 0 4px var(--glow);
    box-shadow:
        0 0 10px var(--phosphor),
        0 0 34px var(--glow);
}

.sol-modal::backdrop {
    background: rgba(0, 4, 0, 0.78);
}

.sol-modal-body {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.sol-modal-title {
    margin: 0 0 1rem;
    font-family: var(--font);
    font-weight: 400;
    font-size: 1.6em;
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--phosphor);
    text-shadow:
        0 0 6px var(--glow),
        0 0 22px rgba(51, 255, 51, 0.35);
}

/* A section heading inside a window, e.g. TERMINAL in the help. */
.sol-modal-subtitle {
    margin: 1.4rem 0 0.6rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--phosphor-dim);
    font-family: var(--font);
    font-weight: 400;
    font-size: 1.2em;
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--phosphor);
    text-shadow: 0 0 6px var(--glow);
}

/* Each line is a "> " terminal line, wrapped lines sitting under the text. */
.sol-modal .sol-line {
    margin: 0 0 0.6rem;
    max-width: none;
    padding-left: 2ch;
    text-indent: -2ch;
    color: var(--phosphor-soft);
}

.sol-modal .sol-line::before {
    content: "> ";
    color: var(--phosphor);
}

.sol-modal em {
    font-style: normal;
    color: var(--phosphor);
}

.sol-modal .ai-glow {
    color: #d9ffd9;
    text-shadow:
        0 0 4px #ffffff,
        0 0 14px var(--phosphor),
        0 0 34px var(--phosphor);
}

/* Things the player types ('hint 3', 'register'...): single quotes,
   bright green, a little extra glow. */
.sol-modal .sol-cmd {
    color: var(--phosphor);
    font-style: normal;
    white-space: nowrap;
    text-shadow:
        0 0 4px var(--glow),
        0 0 10px var(--glow);
}

/* Example input: white, like the other key details. Allowed to wrap,
   as the register example is long on a phone. */
.sol-modal .sol-example {
    color: #ffffff;
    text-shadow:
        0 0 3px #ffffff,
        0 0 10px var(--phosphor);
}

/* The question types: white-hot. */
.sol-modal .sol-tag {
    color: #ffffff;
    white-space: nowrap;
    text-shadow:
        0 0 3px #ffffff,
        0 0 10px var(--phosphor),
        0 0 22px var(--glow);
}

.sol-modal-close {
    margin: 1.5rem 0 0;
    color: var(--phosphor-dim);
}

/* Opens like the screen switching on, only quicker. */
.sol-modal[open] {
    animation: modal-on 0.25s ease-out both;
}

@keyframes modal-on {
    0%   { transform: scale(1, 0.02); filter: brightness(3); }
    100% { transform: none;           filter: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sol-modal[open] { animation: none; }
}
