/* "Security analysis" overlay (fcc-analysis.js).
   Light theme: white, The Beach Geek teal #4ECDC4 (darker #3B838B for small text), navy text #1A1A2E,
   the logo top left and the palm trees in the bottom corners. */

/* Button "loading" spinner (Starting Assessment...), on both Step 1 and Step 2. */
.fcc-btn-spinner {
    display: inline-block; width: 1em; height: 1em; margin-right: 0.55em; vertical-align: -0.15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: fcc-an-spin 0.7s linear infinite;
}
button:disabled .fcc-btn-spinner { opacity: 0.9; }
button:has(.fcc-btn-spinner):disabled { opacity: 1 !important; cursor: progress !important; }

html.fcc-an-open, html.fcc-an-open body { overflow: hidden !important; }

.fcc-an {
    --fcc-blue: #4ECDC4;   /* brand teal (was a blue) */
    --fcc-deep: #3B838B;   /* darker brand teal, for small text on white */
    --fcc-teal: #4ECDC4;
    --fcc-navy: #1A1A2E;
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: radial-gradient(1100px 650px at 50% 40%, #ffffff 0%, #f3fbfa 60%, #e6f7f5 100%);
    color: var(--fcc-navy); font-family: inherit;
    opacity: 0; transition: opacity 0.35s ease;
}
.fcc-an.is-on { opacity: 1; }

/* Soft moving grid */
.fcc-an-grid {
    position: absolute; inset: -50%;
    background-image:
        linear-gradient(rgba(78, 205, 196, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 205, 196, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    transform: perspective(600px) rotateX(55deg);
    animation: fcc-an-grid 6s linear infinite;
    pointer-events: none;
}
@keyframes fcc-an-grid { to { background-position: 0 44px; } }

/* Logo (pinned: theme image styles must not move or resize it) */
.fcc-an .fcc-an-logo {
    position: absolute !important; top: 22px !important; left: 28px !important; z-index: 2;
    height: 44px !important; width: auto !important; max-width: none !important; max-height: none !important;
    margin: 0 !important; padding: 0 !important; display: block !important;
}

/* Palm trees on their sand (Trees.svg + Beach.svg, as on the check pages), both corners */
.fcc-an-scene {
    --fcc-scene-w: min(40vw, 470px);
    /* Lowered so the thin end of the dune runs off the bottom of the screen */
    position: absolute; bottom: calc(var(--fcc-scene-w) * -0.045); z-index: 0; width: var(--fcc-scene-w);
    opacity: 0.22; pointer-events: none; line-height: 0;
}
.fcc-an-scene.left { left: 0; }
.fcc-an-scene.right { right: 0; transform: scaleX(-1); }
.fcc-an .fcc-an-scene img { display: block !important; max-width: none !important; margin: 0 !important; padding: 0 !important; height: auto !important; }
/* The dune (Beach.svg) is low on one side and high on the other: flipped so its high
   side is under the trees, which sink a little into it instead of floating above. */
.fcc-an .fcc-an-scene .fcc-an-trees { position: relative; z-index: 0; top: 10px; width: 76% !important; margin-bottom: -9% !important; }
.fcc-an .fcc-an-scene .fcc-an-sand { position: relative; z-index: 1; width: 100% !important; transform: scaleX(-1); }

.fcc-an-panel {
    position: relative; z-index: 1; width: 100%; max-width: 860px;
    display: flex; align-items: center; gap: 40px;
    padding: 36px 40px; border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(78, 205, 196, 0.22);
    box-shadow: 0 24px 70px rgba(26, 26, 46, 0.12), 0 2px 8px rgba(78, 205, 196, 0.08);
    transform: translateY(14px) scale(0.98); transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.fcc-an.is-on .fcc-an-panel { transform: none; }

/* Radar */
.fcc-an-radar {
    position: relative; flex: 0 0 auto; width: 230px; height: 230px; border-radius: 50%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.10) 0%, rgba(78, 205, 196, 0.05) 60%, transparent 71%);
    box-shadow: 0 0 0 6px rgba(78, 205, 196, 0.05), 0 10px 40px rgba(78, 205, 196, 0.18);
}
.fcc-an-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(78, 205, 196, 0.40); }
.fcc-an-ring.r1 { inset: 0; }
.fcc-an-ring.r2 { inset: 22%; border-color: rgba(78, 205, 196, 0.28); }
.fcc-an-ring.r3 { inset: 44%; border-color: rgba(78, 205, 196, 0.20); }
.fcc-an-radar::before, .fcc-an-radar::after { content: ""; position: absolute; background: rgba(78, 205, 196, 0.18); }
.fcc-an-radar::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.fcc-an-radar::after { top: 50%; left: 0; right: 0; height: 1px; }
.fcc-an-sweep {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(78, 205, 196, 0.45), rgba(78, 205, 196, 0.12) 40deg, transparent 90deg);
    animation: fcc-an-spin 2.4s linear infinite;
    -webkit-mask: radial-gradient(circle, #000 69%, transparent 70%);
            mask: radial-gradient(circle, #000 69%, transparent 70%);
}
@keyframes fcc-an-spin { to { transform: rotate(360deg); } }
.fcc-an-blip {
    position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--fcc-blue);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.8); opacity: 0; animation: fcc-an-blip 2.4s ease-out infinite;
}
.fcc-an-blip.b1 { top: 22%; left: 64%; animation-delay: 0.3s; }
.fcc-an-blip.b2 { top: 62%; left: 76%; animation-delay: 0.9s; background: var(--fcc-teal); }
.fcc-an-blip.b3 { top: 70%; left: 30%; animation-delay: 1.5s; background: #f0a04b; box-shadow: 0 0 10px rgba(240, 160, 75, 0.8); }
.fcc-an-blip.b4 { top: 30%; left: 24%; animation-delay: 2.0s; }
@keyframes fcc-an-blip { 0% { opacity: 0; transform: scale(0.4); } 15% { opacity: 1; transform: scale(1.4); } 60% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; } }
.fcc-an-shield {
    position: absolute; inset: 34%; display: flex; align-items: center; justify-content: center;
    color: var(--fcc-blue); filter: drop-shadow(0 4px 10px rgba(78, 205, 196, 0.35));
    animation: fcc-an-pulse 1.8s ease-in-out infinite;
}
.fcc-an-shield svg { width: 100%; height: 100%; }
.fcc-an-tick { stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset 0.6s ease 0.1s; }
.fcc-an.is-done .fcc-an-tick { stroke-dashoffset: 0; }
.fcc-an.is-done .fcc-an-shield { animation: none; transform: scale(1.08); color: var(--fcc-deep); }
@keyframes fcc-an-pulse { 50% { transform: scale(1.07); filter: drop-shadow(0 6px 16px rgba(78, 205, 196, 0.55)); } }

/* Text side */
.fcc-an-body { flex: 1 1 auto; min-width: 0; text-align: left; }
.fcc-an-kicker { margin: 0 0 6px !important; font-size: 0.72rem !important; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fcc-deep) !important; font-weight: 700; }
.fcc-an-title { margin: 0 0 6px !important; padding: 0 !important; font-size: 1.6rem !important; line-height: 1.2 !important; color: var(--fcc-navy) !important; font-weight: 800; }
.fcc-an-sub { margin: 0 0 16px !important; color: #5b6b78 !important; font-size: 0.92rem !important; line-height: 1.5; }

.fcc-an-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.fcc-an-bar { position: relative; flex: 1; height: 8px; border-radius: 99px; background: #e3f5f4; overflow: hidden; }
.fcc-an-bar span {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px;
    background: linear-gradient(90deg, #36b9b0, var(--fcc-teal), #8fe6df);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.45);
}
.fcc-an-bar span::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: fcc-an-shine 1.4s linear infinite;
}
@keyframes fcc-an-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.fcc-an-pct { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; color: var(--fcc-navy); font-size: 0.95rem; }

.fcc-an-steps { list-style: none !important; margin: 0 0 14px !important; padding: 0 !important; }
.fcc-an-steps li {
    display: flex; align-items: center; gap: 10px; padding: 4px 0 !important; margin: 0 !important;
    font-size: 0.9rem; color: #a3b1bb; transition: color 0.3s ease; list-style: none !important;
}
.fcc-an-steps li::before { content: none !important; }
.fcc-an-steps li i { position: relative; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #cfe7e5; }
.fcc-an-steps li.active { color: var(--fcc-navy); font-weight: 600; }
.fcc-an-steps li.active i { border-color: rgba(78, 205, 196, 0.25); border-top-color: var(--fcc-blue); animation: fcc-an-spin 0.7s linear infinite; }
.fcc-an-steps li.done { color: #2c6f7a; }
.fcc-an-steps li.done i { border-color: var(--fcc-blue); background: var(--fcc-blue); }
.fcc-an-steps li.done i::after {
    content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
    border: solid #ffffff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Console: room for 5 whole lines (newest at the bottom, older ones fade out at the top) */
.fcc-an-console {
    --fcc-an-lh: 1.7em;
    height: calc(var(--fcc-an-lh) * 5 + 24px); overflow: hidden; padding: 12px 14px; border-radius: 10px; box-sizing: border-box;
    background: #f2faf9; border: 1px solid #d4eeec;
    font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 0.78rem;
    color: #2c6f7a; display: flex; flex-direction: column; justify-content: flex-end;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 30%);
}
.fcc-an-line {
    flex: 0 0 auto; height: var(--fcc-an-lh); line-height: var(--fcc-an-lh) !important; margin: 0 !important; padding: 0 !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em;
    animation: fcc-an-in 0.25s ease-out;
}
.fcc-an-line.ok { color: var(--fcc-deep); font-weight: 700; }
@keyframes fcc-an-in { from { opacity: 0; transform: translateY(4px); } }

/* Phones: logo smaller, radar on top, 4 console lines */
@media (max-width: 700px) {
    .fcc-an { align-items: flex-start; padding-top: 64px; overflow-y: auto; }
    .fcc-an .fcc-an-logo { top: 14px !important; left: 16px !important; height: 32px !important; }
    .fcc-an-scene { --fcc-scene-w: 48vw; opacity: 0.15; }
    .fcc-an-panel { flex-direction: column; gap: 18px; padding: 24px 20px; }
    .fcc-an-radar { width: 150px; height: 150px; }
    .fcc-an-title { font-size: 1.25rem !important; }
    .fcc-an-body { width: 100%; }
    .fcc-an-console { height: calc(var(--fcc-an-lh) * 4 + 20px); padding: 10px 12px; font-size: 0.72rem; }
    .fcc-an-steps li { font-size: 0.84rem; }
}

/* Reduce motion: keep the information, drop the movement */
.fcc-an-reduce .fcc-an-grid, .fcc-an-reduce .fcc-an-sweep, .fcc-an-reduce .fcc-an-blip,
.fcc-an-reduce .fcc-an-shield, .fcc-an-reduce .fcc-an-bar span::after { animation: none !important; }
.fcc-an-reduce .fcc-an-blip { display: none; }
@media (prefers-reduced-motion: reduce) {
    .fcc-an, .fcc-an-panel { transition: none; }
}

/* Finished with one step still running in the background (finish({ pending: n })):
   that step, the last console line and the end of the bar turn amber. */
.fcc-an-steps li.pending { color: #8a5a00; font-weight: 600; }
.fcc-an-steps li.pending i { border-color: rgba(245, 166, 35, 0.3); border-top-color: #F5A623; animation: fcc-an-spin 1.1s linear infinite; }
.fcc-an-steps li.pending small { display: block; margin-top: 2px; font-size: 0.8em; font-weight: 400; color: #9a6a12; }
.fcc-an-line.wait { color: #b7791f; font-weight: 700; }
.fcc-an.is-partial .fcc-an-bar span { background: linear-gradient(90deg, #36b9b0, var(--fcc-teal) 55%, #F5A623); box-shadow: 0 0 10px rgba(245, 166, 35, 0.4); }
.fcc-an.is-partial .fcc-an-pct { min-width: 0; white-space: nowrap; font-size: 0.82rem; font-weight: 700; color: #9a6a12; }
.fcc-an-reduce .fcc-an-steps li.pending i { animation: none !important; }
