/* MoonlightWeb — Admin (Server Settings) specifics:
 * PIN display, internet-access info boxes, DNS propagation, tunnel URLs. */

/* ── PIN display ───────────────────────────────────────────────────────── */
.pin-display-area {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-2) 0;
    flex-wrap: wrap;
}
.pin-display {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    /* Light tracking between digits; word-spacing trims the full mono space so
     * the gap between the two groups of 3 stays small ("123 456"). */
    letter-spacing: 2px;
    word-spacing: -0.35em;
    color: var(--text-1);
    user-select: all;
    padding: 6px 14px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent-ring);
}
.pin-consumed {
    color: var(--text-3);
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-2);
    letter-spacing: 4px;
    user-select: none;
}
.pin-display-area .btn {
    flex-shrink: 0;
}

/* ── Session count + tunnel URL rows (inline-style extraction) ──────────── */
#admin-session-count {
    font-weight: 500;
    margin-bottom: var(--space-1);
}
.admin-url-row {
    padding: 6px 0;
    font-family: var(--font-mono);
}
.pin-consumed-hint {
    color: var(--c-warning);
    font-weight: 500;
}

/* ── Internet access info box ──────────────────────────────────────────── */
.internet-info-box {
    background: var(--c-info-soft);
    border: 1px solid rgba(86, 182, 230, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: var(--space-3);
    font-size: var(--fs-xs);
    line-height: 1.55;
    color: var(--text-2);
}
.internet-info-box p {
    margin-bottom: var(--space-1);
}
.internet-info-box p:last-child {
    margin-bottom: 0;
}
.internet-info-box code {
    font-family: var(--font-mono);
    background: rgba(86, 182, 230, 0.14);
    padding: 1px 5px;
    border-radius: 4px;
}
.internet-important-label {
    color: var(--c-warning);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.internet-info-error {
    background: var(--c-danger-soft);
    border-color: rgba(239, 93, 100, 0.25);
    color: #f0a6a9;
}

/* ── DNS propagation indicator ─────────────────────────────────────────── */
.dns-propagating {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 12px;
    margin-top: var(--space-3);
    background: var(--c-warning-soft);
    border: 1px solid rgba(240, 180, 41, 0.2);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    color: #f3d488;
    line-height: 1.4;
}

/* ── Internet Access activation loader ─────────────────────────────────────
   Stepped checklist shown while Internet Access is coming up; the backend
   reports the live step via statusJson "phase" (polled by AdminView). */
.internet-activation {
    margin-top: var(--space-3);
    padding: 12px 14px;
    background: var(--c-info-soft, rgba(45, 212, 240, 0.08));
    border: 1px solid rgba(45, 212, 240, 0.2);
    border-radius: var(--radius-sm);
}
.internet-activation-title {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: var(--space-2);
}
.activation-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}
.activation-steps li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 3px 0;
    font-size: var(--fs-xs);
    line-height: 1.4;
}
.activation-steps .step-dot {
    color: var(--text-3);
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}
.activation-steps .step-check {
    color: var(--c-success, #5ad17a);
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}
.activation-steps .step-pending {
    color: var(--text-3);
    opacity: 0.7;
}
.activation-steps .step-active {
    color: var(--text-1);
    font-weight: 600;
}
.activation-steps .step-done {
    color: var(--text-2);
}

/* ── Tunnel URLs ───────────────────────────────────────────────────────── */
.tunnel-url-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-1);
    text-decoration: underline;
    word-break: break-all;
}
.tunnel-url-link:hover {
    color: var(--accent-1);
}
.tunnel-url-disabled {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-3);
    opacity: 0.6;
    word-break: break-all;
    cursor: default;
}

/* Spinner used in DNS / pending states */
.tunnel-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(240, 180, 41, 0.3);
    border-top-color: #f3d488;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: var(--space-1);
    flex-shrink: 0;
}

/* ── Cyberpunk "signal" loader ─────────────────────────────────────────────
   Three pulsing neon bars shown next to a section title while the feature is
   still coming up (yellow / cyan / magenta — CP2077 palette). The element is
   the centre bar; ::before / ::after are the side bars. */
.cyber-loader {
    display: inline-block;
    position: relative;
    width: 3px;
    height: 13px;
    margin-left: var(--space-2);
    vertical-align: middle;
    background: var(--accent-1);
    box-shadow: 0 0 5px var(--accent-1);
    transform-origin: bottom;
    animation: cyber-signal 1s ease-in-out infinite 0.15s;
}
.cyber-loader::before,
.cyber-loader::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 13px;
    transform-origin: bottom;
    animation: cyber-signal 1s ease-in-out infinite;
}
.cyber-loader::before {
    left: -6px;
    background: var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan);
}
.cyber-loader::after {
    left: 6px;
    background: var(--neon-magenta);
    box-shadow: 0 0 5px var(--neon-magenta);
    animation-delay: 0.3s;
}
@keyframes cyber-signal {
    0%,
    100% {
        transform: scaleY(0.3);
        opacity: 0.55;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}
