/* Home LED sign — black dot-matrix panel in place of the welcome band.
   The panel is always dark (it is a physical sign), in both themes. */
.led-sign { margin-bottom: var(--sp-md, 16px); }

.led-sign__panel {
    position: relative;
    border-radius: 22px;
    background: #050505;
    box-shadow: inset 0 0 0 1px #222, 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 6px 12px;
    overflow: hidden;
}

.led-sign__screen {
    display: block;
    position: relative;
    min-height: 66px;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
}
.led-sign__screen[href] { cursor: pointer; }
.led-sign__screen:not([href]) { cursor: default; }
.led-sign__screen:focus-visible { outline: 2px solid #4DA3FF; outline-offset: 3px; }

.led-sign__canvas { display: block; width: 100%; height: 153px; }

/* Without JavaScript (or before the font loads) the message still shows,
   in a sign-like monospace. Hidden once the canvas is running. */
.led-sign__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font: 700 18px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 6px currentColor;
}
.led-sign--running .led-sign__fallback { display: none; }

.led-sign__pause {
    /* Over the bottom-right corner of the grid (rows below the letters). */
    position: absolute;
    right: 10px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #333;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.85);
    color: #BDBDBD;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}
.led-sign__pause svg { fill: currentColor; }
.led-sign__pause:hover, .led-sign__pause:focus-visible { opacity: 1; color: #fff; }
.led-sign__pause:focus-visible { outline: 2px solid #4DA3FF; outline-offset: 2px; }
.led-sign__pause .led-sign__icon-play { display: none; }
.led-sign__pause[aria-pressed="true"] .led-sign__icon-play { display: block; }
.led-sign__pause[aria-pressed="true"] .led-sign__icon-pause { display: none; }

@media (max-width: 600px) {
    .led-sign__panel { padding: 6px 10px; border-radius: 22px; }
    .led-sign__canvas { height: 68px; }
    .led-sign__screen { min-height: 44px; }
    .led-sign__fallback { font-size: 14px; }
    .led-sign__pause { width: 24px; height: 24px; right: 8px; bottom: 6px; }
}

/* Advert form: LED sign section */
.af-led__preview { border-radius: 18px; background: #050505; padding: 5px 8px; box-shadow: inset 0 0 0 1px #222; cursor: pointer; }
.af-led__preview canvas { display: block; width: 100%; height: 153px; }
@media (max-width: 600px) { .af-led__preview { border-radius: 22px; padding: 6px 10px; } .af-led__preview canvas { height: 68px; } }
.af-led__colors { display: flex; flex-direction: column; gap: 8px; }
.af-led__swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.af-led__swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 3px solid var(--bg-primary, #fff); box-shadow: 0 0 0 1px var(--separator, #ccc); cursor: pointer; }
.af-led__swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--b-primary, #007AFF); }
.af-led__swatch:focus-visible { outline: 2px solid var(--b-primary, #007AFF); outline-offset: 3px; }
.af-led__any input[type="color"] { width: 40px; height: 40px; padding: 2px; border: 1px solid var(--separator, #ccc); border-radius: 50%; background: var(--bg-primary, #fff); cursor: pointer; }
.af-led__file-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* `hidden` must win over the display rules above. */
.led-sign [hidden], .af-led [hidden] { display: none !important; }
