/* ──────────────────────────────────────────────────────────────────────
 * trial-mode.css — Free-tier encrypted-bubble UI surface.
 * Loaded after the existing style stack so it overrides where needed.
 * ────────────────────────────────────────────────────────────────────── */

/* === Trial banner on login screen ==================================== */

.trial-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px 0;
    padding: 14px 18px;
    border: 1px solid rgba(20, 241, 149, 0.35);
    background: linear-gradient(180deg, rgba(20, 241, 149, 0.06), rgba(20, 241, 149, 0.02));
    border-radius: 6px;
    box-shadow:
        0 0 0 1px rgba(20, 241, 149, 0.08) inset,
        0 12px 28px -10px rgba(20, 241, 149, 0.18);
}
.trial-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #14f195;
    box-shadow: 0 0 14px #14f195;
    flex-shrink: 0;
    animation: trial-pulse 2.4s ease-in-out infinite;
}
@keyframes trial-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.85); }
    50%      { opacity: 1;    transform: scale(1.10); }
}
.trial-banner__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}
.trial-banner__label {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #14f195;
}
.trial-banner__text {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.82);
}
.trial-banner__text b { color: #fff; font-weight: 600; }

/* === Login footer — disclosure + CTAs ================================ */

.login-foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.login-foot__disclaimer {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.42);
    margin: 0;
}
.login-foot__row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
}
.login-foot__link {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #00d4ff;
    text-decoration: none;
    opacity: 0.78;
    transition: opacity 180ms ease, color 180ms ease;
}
.login-foot__link:hover { opacity: 1; color: #fff; }

/* === Trial countdown in chat header =================================== */

.trial-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    margin-right: 8px;
    border: 1px solid rgba(20, 241, 149, 0.4);
    background: rgba(20, 241, 149, 0.08);
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #14f195;
    cursor: default;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.trial-counter__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #14f195;
    box-shadow: 0 0 8px #14f195;
}
.trial-counter--warn {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.10);
    color: #fbbf24;
}
.trial-counter--warn .trial-counter__dot { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.trial-counter--danger {
    border-color: rgba(255, 0, 60, 0.65);
    background: rgba(255, 0, 60, 0.12);
    color: #ff003c;
    animation: trial-blink 1.1s steps(2) infinite;
}
.trial-counter--danger .trial-counter__dot { background: #ff003c; box-shadow: 0 0 8px #ff003c; }
@keyframes trial-blink {
    50% { opacity: 0.45; }
}

/* === SOL-gate panel on login screen ================================= */

.sol-gate {
    margin: 0 0 22px 0;
    padding: 16px 18px;
    border: 1px solid rgba(0, 212, 255, 0.30);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.05), rgba(123, 47, 247, 0.04));
    border-radius: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 28px -12px rgba(0, 212, 255, 0.18);
}
.sol-gate--collapsed {
    padding: 10px 14px;
    background: rgba(20, 241, 149, 0.06);
    border-color: rgba(20, 241, 149, 0.35);
}
.sol-gate--collapsed .sol-gate__body,
.sol-gate--collapsed .sol-gate__addr,
.sol-gate--collapsed .sol-gate__steps,
.sol-gate--collapsed .sol-gate__verify-row,
.sol-gate--collapsed .sol-gate__disclaimer {
    display: none;
}

.sol-gate__head {
    display: flex; align-items: center; gap: 9px;
    margin-bottom: 10px;
}
.sol-gate__pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: #00d4ff;
    box-shadow: 0 0 8px #00d4ff;
    animation: sg-pulse 2.4s ease-in-out infinite;
}
@keyframes sg-pulse {
    0%, 100% { opacity: 0.55; transform: scale(0.85); }
    50%      { opacity: 1;    transform: scale(1.10); }
}
.sol-gate__label {
    font-family: var(--font-mono, monospace);
    font-size: 10px; letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #00d4ff;
}
.sol-gate__body {
    margin: 0 0 12px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}
.sol-gate__body b { color: #fff; font-weight: 600; }

.sol-gate__addr {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: rgba(5, 6, 11, 0.55);
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 4px;
    margin-bottom: 12px;
}
.sol-gate__addr-label {
    font-family: var(--font-mono, monospace);
    font-size: 9px; letter-spacing: 0.22em;
    color: #7d7d99;
    text-transform: uppercase;
    flex-shrink: 0;
}
.sol-gate__addr code {
    flex: 1; min-width: 0;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    color: #14f195;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sol-gate__copy {
    background: rgba(0, 212, 255, 0.10);
    border: 1px solid rgba(0, 212, 255, 0.30);
    color: #00d4ff;
    padding: 3px 8px;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 160ms ease;
}
.sol-gate__copy:hover { background: rgba(0, 212, 255, 0.20); }

.sol-gate__steps ol {
    margin: 0 0 12px;
    padding-left: 18px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
}
.sol-gate__steps li { margin-bottom: 4px; }
.sol-gate__steps b { color: rgba(255, 255, 255, 0.92); }

.sol-gate__verify-row {
    display: flex; gap: 6px;
    margin-bottom: 8px;
}
.sol-gate__verify-row input {
    flex: 1; min-width: 0;
    padding: 9px 11px;
    background: rgba(5, 6, 11, 0.6);
    color: #e8e8f0;
    border: 1px solid rgba(123, 47, 247, 0.30);
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    outline: none;
}
.sol-gate__verify-row input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.15);
}
.sol-gate__verify-row button {
    padding: 9px 14px;
    background: linear-gradient(135deg, #7b2ff7, #00d4ff);
    color: white;
    font-family: -apple-system, sans-serif;
    font-weight: 600;
    font-size: 11px; letter-spacing: 0.10em;
    text-transform: uppercase;
    border: 0; border-radius: 4px;
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease;
}
.sol-gate__verify-row button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.sol-gate__verify-row button:disabled { opacity: 0.55; cursor: progress; }

.sol-gate__status {
    min-height: 18px;
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    margin-bottom: 8px;
}
.sol-gate__status code {
    color: #14f195;
    font-family: var(--font-mono, monospace);
}
.sol-gate__status--ok  { color: #14f195; }
.sol-gate__status--err { color: #f472b6; }

.sol-gate__disclaimer {
    margin: 6px 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font-mono, monospace);
    font-size: 9.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.42);
    letter-spacing: 0.03em;
}

/* === Bubble-popped overlay ============================================ */

/* Critical: `display: flex` on the class would normally override the
 * HTML `hidden` attribute. The two selectors below ensure that whenever
 * the element has [hidden], it stays invisible — overriding the class. */
.bubble-popped-overlay[hidden],
.trial-counter[hidden] {
    display: none !important;
}

.bubble-popped-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 6, 11, 0.92);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    animation: bp-fade-in 320ms cubic-bezier(.22,.61,.36,1) both;
}
@keyframes bp-fade-in {
    from { opacity: 0; backdrop-filter: blur(0px) saturate(100%); }
    to   { opacity: 1; }
}
.bubble-popped-card {
    max-width: 520px;
    width: calc(100% - 48px);
    padding: 36px 32px 28px;
    border: 1px solid rgba(255, 0, 60, 0.32);
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.86), rgba(18, 18, 31, 0.86));
    border-radius: 8px;
    text-align: center;
    box-shadow:
        0 24px 60px -16px rgba(0, 0, 0, 0.6),
        0 0 32px -12px rgba(255, 0, 60, 0.45);
}
.bubble-popped-pulse {
    width: 28px;
    height: 28px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff003c, #7b2ff7);
    box-shadow: 0 0 22px rgba(255, 0, 60, 0.55), 0 0 38px rgba(123, 47, 247, 0.4);
    animation: bp-pulse 1.6s ease-in-out infinite;
}
@keyframes bp-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.85; }
    50%      { transform: scale(1.08); opacity: 1; }
}
.bubble-popped-title {
    margin: 0 0 10px;
    font-family: var(--font-display, "Orbitron", sans-serif);
    font-size: 22px;
    letter-spacing: 0.2em;
    color: #ff003c;
}
.bubble-popped-sub {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
}
.bubble-popped-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 20px;
}
.bubble-popped-link {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: #00d4ff;
    text-decoration: none;
    text-align: center;
    padding: 8px;
    opacity: 0.82;
    transition: opacity 180ms ease, color 180ms ease;
}
.bubble-popped-link:hover { opacity: 1; color: #fff; }
.bubble-popped-foot {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.34);
    line-height: 1.5;
}
