/* assets/css/captcha-lockdown.css */
/* Anvus Lockdown Widget — FV-UI Adaptation */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

.anvus-root {
    font-family: 'Space Mono', monospace;
    margin: 15px 0;
    display: block !important;
    line-height: normal;
    text-align: left;
    isolation: isolate;
}

.anvus-widget {
    --av-card: #111111;
    --av-border: #333333;
    --av-txt-main: #eeeeee;
    --av-txt-sub: #777777;
    --av-accent: #00ff41;
    --av-accent-fg: #ffffff;
    --av-err: #ff3333;
    --av-shadow: 0 5px 20px rgba(0,0,0,0.5);

    position: relative;
    background: var(--av-card);
    border: 1px solid var(--av-border);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    max-width: 340px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-sizing: border-box;
    user-select: none;
    transition: all 0.3s;
    box-shadow: var(--av-shadow);
}

/* Status Styles */
.anvus-widget.locked { border-color: var(--av-err); opacity: 0.95; pointer-events: none; }
.anvus-widget.verified { border-color: var(--av-accent); box-shadow: 0 0 20px rgba(0, 255, 65, 0.15); }

/* Scan Button */
.av-scan-area { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.av-scan-btn {
    width: 100%; height: 100%; border-radius: 50%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--av-border);
    cursor: pointer; position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s, border-color 0.3s, background-color 0.3s;
}
.av-scan-btn:active { transform: scale(0.95); }

/* Icons */
.av-icon-box { position: relative; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.av-icon { position: absolute; width: 24px; height: 24px; fill: var(--av-txt-sub); transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1); }

.av-icon-finger { opacity: 1; transform: scale(1); }
.av-icon-check { opacity: 0; transform: scale(0.5) rotate(-45deg); fill: var(--av-accent); }

.scanning .av-icon-finger { fill: var(--av-accent-fg); opacity: 1; animation: avPulse 1s infinite; }
.scanning .av-ring-circle { transition: stroke-dashoffset var(--av-duration, 2s) linear; stroke-dashoffset: 0; }

.verified .av-scan-btn { border-color: var(--av-accent); background: rgba(0, 255, 65, 0.05); cursor: default; }
.verified .av-icon-finger { opacity: 0; transform: scale(0.5); }
.verified .av-icon-check { opacity: 1; transform: scale(1) rotate(0deg); }

.locked .av-scan-btn { border-color: var(--av-err); background: rgba(255, 50, 50, 0.1); }
.locked .av-icon-finger { fill: var(--av-err); }

.av-ring { position: absolute; top: -3px; left: -3px; width: 54px; height: 54px; z-index: 1; pointer-events: none; transform: rotate(-90deg); }
.av-ring-circle { fill: none; stroke: var(--av-accent); stroke-width: 2; stroke-dasharray: 155; stroke-dashoffset: 155; stroke-linecap: round; }

.av-info { flex-grow: 1; line-height: 1.3; }
.av-title { font-size: 13px; font-weight: bold; color: var(--av-txt-main); margin-bottom: 2px; }
.av-desc { font-size: 11px; color: var(--av-txt-sub); }

.av-reload { display: none; color: var(--av-txt-main); font-size: 10px; text-decoration: none; cursor: pointer; pointer-events: auto; margin-top: 4px; }
.locked .av-reload { display: block; }

/* Watermark */
.av-wm {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin-top: 8px; font-size: 9px;
    color: #666666 !important;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    opacity: 0.8; transition: 0.2s; width: 100%; max-width: 340px;
}
.av-wm:hover { opacity: 1; color: #ffffff !important; }
.av-wm svg { width: 10px; height: 10px; fill: currentColor; }
.av-wm strong { font-weight: 600; color: inherit; }

.jan-stroke-fill {
    fill: white;
    stroke: white;
    stroke-width: 6;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: jan-stroke-fill-anim 4s ease-in-out infinite alternate;
}

@keyframes jan-stroke-fill-anim {
    0% { fill-opacity: 0; stroke-dashoffset: 2000; stroke-opacity: 1; }
    50% { fill-opacity: 0; stroke-dashoffset: 0; stroke-opacity: 1; }
    100% { fill-opacity: 1; stroke-dashoffset: 0; stroke-opacity: 0; }
}

@keyframes avPulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

/* Light Theme */
[data-fv-theme="light"] .anvus-widget {
    --av-card: #f5f5f7;
    --av-border: #d2d2d7;
    --av-txt-main: #1d1d1f;
    --av-txt-sub: #86868b;
    --av-accent: #0071e3;
    --av-accent-fg: #ffffff;
    --av-err: #ff3b30;
    --av-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

[data-fv-theme="light"] .av-scan-btn {
    background: rgba(0,0,0,0.04);
}

[data-fv-theme="light"] .verified .av-scan-btn {
    background: rgba(0, 113, 227, 0.05);
}

[data-fv-theme="light"] .verified {
    box-shadow: 0 0 20px rgba(0, 113, 227, 0.1);
}

[data-fv-theme="light"] .locked .av-scan-btn {
    background: rgba(255, 59, 48, 0.05);
}

[data-fv-theme="light"] .av-wm {
    color: #aaa !important;
}
[data-fv-theme="light"] .av-wm:hover {
    color: #1d1d1f !important;
}

[data-fv-theme="light"] .jan-stroke-fill {
    fill: #1d1d1f;
    stroke: #1d1d1f;
}
