/*
 * My Cyber Check, Step 1. Loaded after cyber-resilience-check.css (the My
 * Cyber Check styles, used unchanged). These are the Website & Email Snapshot
 * styles the scan results need, copied from osc-updated/online-security-checks.css.
 */

/* Snapshot website fields on the form */
.fcc-scan-fields { margin: 0.5rem 0 1rem; }
.fcc-scan-fields .fcc-check-row {
    display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
    font-size: 0.9rem; color: #1A1A2E; margin: 0 0 1rem; padding: 12px 14px;
    background: #f8f8f8; border-radius: 6px; border: 1.5px solid #E0E0E0;
}
.fcc-scan-fields .fcc-check-row input { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.fcc-scan-fields .fcc-domain-box {
    background: #f0fafa; border: 1.5px solid #4ECDC4; border-radius: 8px; padding: 16px; margin-bottom: 1rem;
}
.fcc-scan-fields .fcc-domain-box label.fcc-radio {
    display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 8px; font-size: 0.88rem;
}
.fcc-scan-fields .fcc-domain-box input[type="radio"] { width: 16px; height: 16px; }
.fcc-privacy-note { font-size: 0.78rem; color: #aaa; font-style: italic; margin: 0.25rem 0 1rem; line-height: 1.5; }

/* Results: at a glance */
.fcc-glance { display: flex; gap: 1rem; margin: 1.5rem 0 2.5rem; flex-wrap: wrap; }
.fcc-glance-card {
    flex: 1 1 220px; display: block; text-align: center; padding: 1.25rem 1rem; border-radius: 0.75rem;
    text-decoration: none !important; border: 1px solid rgba(0, 0, 0, 0.06); transition: transform 0.2s, box-shadow 0.2s;
}
.fcc-glance-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.fcc-glance-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #888; margin-bottom: 0.4rem; }
.fcc-glance-score { font-size: 2.6rem; font-weight: 900; line-height: 1.1; font-family: Georgia, serif; }
.fcc-glance-score small { font-size: 1rem; font-weight: 700; margin-left: 2px; }
.fcc-glance-word { font-size: 0.95rem; font-weight: 700; margin-top: 0.2rem; }
.fcc-glance-card .online-spinner { margin: 0.6rem auto 0.3rem; }
.fcc-status-on-track   { color: #27ae60; }
.fcc-status-vulnerable { color: #e67e22; }
.fcc-status-at-risk    { color: #c0392b; }

/* Results: the two parts */
.fcc-part { text-align: left; margin: 0 0 2.5rem; padding-top: 0.5rem; scroll-margin-top: 120px; }
.fcc-part-head {
    display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; padding-bottom: 0.6rem; border-bottom: 3px solid #4ECDC4;
}
.fcc-part-head h2 { margin: 0 !important; padding: 0 !important; color: var(--primary) !important; font-size: 1.5rem; }
.fcc-part-num {
    flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%; background: #1A1A2E; color: #4ECDC4;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem;
}
.fcc-part .section-interpreting { padding-bottom: 0; }
/* Score badge centred under the gauge, as on My Cyber Check V1 (the part itself is left-aligned) */
#fcc-part-1 .score-badge { display: block; width: fit-content; margin-left: auto; margin-right: auto; text-align: center; }

/* Results: the one offer */
.fcc-offer {
    margin-top: 1rem; padding: 1.75rem; background: var(--light-bg); border-radius: 0.75rem;
    border: 2px solid #4ECDC4; text-align: left;
}
.fcc-offer-groups { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 1.25rem 0 0.5rem; }
.fcc-offer-group { flex: 1 1 260px; background: #fff; border-radius: 0.6rem; padding: 1rem 1.25rem; border: 1px solid #e6e6e6; }
.fcc-offer-group h4 {
    margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #888;
}
.fcc-offer-group ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.fcc-offer-group li { position: relative; list-style: none; padding: 0 0 0.55rem 1.5rem; font-size: 0.92rem; line-height: 1.5; color: #333; }
.fcc-offer-group li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: #4ECDC4; font-weight: 800; }
.fcc-offer-group li strong { display: block; color: #1A1A2E; }
.fcc-offer-group li span { display: block; color: #777; font-size: 0.84rem; }
.fcc-offer-note { font-size: 0.85rem; color: #777; font-style: italic; margin: 0.75rem 0 0; }

/* Results: bottom actions (Send it again / Email me my results + Retake Assessment) */
.fcc-bottom-actions { text-align: center; margin: 2.25rem 0 0; padding-top: 1.5rem; border-top: 1px solid #e6e6e6; }
.fcc-bottom-note { margin: 0 0 0.75rem !important; font-size: 0.9rem; color: #666; }
.fcc-bottom-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.fcc-bottom-buttons .button { width: auto !important; margin: 0 !important; min-width: 190px; }
.fcc-email-results-msg { font-size: 0.88rem; margin: 0.75rem 0 0; min-height: 1em; }
@media (max-width: 600px) {
    .fcc-bottom-buttons .button { flex: 1 1 100%; }
}
.fcc-email-results-msg.ok { color: #27ae60; }
.fcc-email-results-msg.error { color: #c0392b; }

/* Free scan: spacing between the two check groups */
.fcc-scan h3 { line-height: 1.35; }

/* Form: "Welcome back, load your details?" */
.fcc-remember {
    background: #f0fafa; border: 1px solid #b2e8e4; border-left: 4px solid #4ECDC4; border-radius: 0.6rem;
    padding: 0.9rem 1.1rem 0.7rem; margin: 0 0 1.5rem; text-align: left;
}
.fcc-remember-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.fcc-remember-text { flex: 1 1 260px; line-height: 1.45; color: #1A1A2E; }
.fcc-remember-text strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.fcc-remember-text span { font-size: 0.9rem; color: #555; }
.fcc-remember-actions { display: flex; gap: 0.5rem; flex: 0 0 auto; align-items: center; }
/* Own compact buttons (the check's .button is full-width) */
.fcc-remember-btn {
    width: auto !important; margin: 0 !important; padding: 0.55rem 1.1rem !important; border-radius: 0.5rem !important;
    font-size: 0.9rem !important; font-weight: 600 !important; line-height: 1.2 !important; cursor: pointer;
    border: 1.5px solid #4ECDC4 !important; transition: background 0.2s, color 0.2s; font-family: inherit;
}
.fcc-remember-load { background: #4ECDC4 !important; color: #1A1A2E !important; }
.fcc-remember-load:hover { background: #39b3aa !important; border-color: #39b3aa !important; }
.fcc-remember-skip { background: transparent !important; color: #1A1A2E !important; }
.fcc-remember-skip:hover { background: #fff !important; }
.fcc-remember-forget { display: inline-block; margin-top: 0.6rem; font-size: 0.78rem; color: #888 !important; text-decoration: underline !important; }
@media (max-width: 600px) {
    .fcc-remember-actions { width: 100%; }
    .fcc-remember-btn { flex: 1; }
}

/* Scan results */
.fcc-scan {
    background: #fff; border: 1px solid #e6e6e6; border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.5rem; text-align: left;
}
.fcc-scan-loading { text-align: center; padding: 2rem 1rem; color: #666; }

.online-spinner {
    display: inline-block; width: 36px; height: 36px;
    border: 3px solid rgba(78, 205, 196, 0.2); border-top-color: #3b838b;
    border-radius: 50%; animation: fcc-spin 0.7s linear infinite; margin: 0 auto 8px;
}
@keyframes fcc-spin { to { transform: rotate(360deg); } }

.online-status {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem;
    padding: 5px 14px; border-radius: 0.5rem; margin-bottom: 14px; box-sizing: border-box;
}
.online-status.pass { background: rgba(76, 175, 80, 0.1);  color: #2e7d32; border: 1.5px solid #4CAF50; }
.online-status.fail { background: rgba(255, 68, 68, 0.08); color: #c62828; border: 1.5px solid #FF4444; }
.online-status.warn { background: rgba(255, 165, 0, 0.1);  color: #e65100; border: 1.5px solid #FFA500; }
.online-status.info { background: rgba(78, 205, 196, 0.1); color: #00796b; border: 1.5px solid #4ECDC4; }

.online-btn-check {
    padding: 0.75rem 2rem !important; background-color: #4ECDC4 !important; color: #1A1A2E !important;
    font-weight: 600 !important; font-size: 1rem !important; border: none !important; border-radius: 0.5rem !important;
    cursor: pointer !important; transition: all 0.3s !important; font-family: inherit; white-space: nowrap;
    text-decoration: none !important; display: inline-block;
}
.online-btn-check:hover {
    background-color: #39b3aa !important; transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3) !important;
}

.online-explainer {
    background: #F0F7FF; border-left: 4px solid #4ECDC4; border-radius: 1rem;
    padding: 1.5rem 1.75rem; margin-bottom: 1.5rem; text-align: left;
}
.online-explainer h3 { color: #1A1A2E; font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.online-explainer p  { color: #666; font-size: 0.9rem; line-height: 1.7; }

.form-error.fcc-scan-error.show { display: block; }

@media (max-width: 600px) {
    .fcc-scan { padding: 1rem; }
    .online-btn-check { white-space: normal; }
}

/* Keyboard focus: visible where Tab lands. The shared Cyber Check styles turn
   the outline off and use a 10%-opacity glow, so tabbing looked like nothing happened. */
.cyber-resilience-check-container .form-group input:focus,
.cyber-resilience-check-container .fcc-domain-box input[type="text"]:focus,
#fcc-website:focus, #fcc-domain-input:focus {
    outline: none;
    border-color: var(--primary, #4ECDC4);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.45);
}
.cyber-resilience-check-container input[type="checkbox"]:focus-visible,
.cyber-resilience-check-container input[type="radio"]:focus-visible,
.cyber-resilience-check-container button:focus-visible,
.cyber-resilience-check-container a:focus-visible,
.cyber-resilience-check-container .category-header:focus-visible {
    outline: 3px solid var(--primary, #4ECDC4);
    outline-offset: 2px;
}
/* An answer whose radio has keyboard focus: highlight the whole answer box. */
.cyber-resilience-check-container .option:focus-within {
    border-color: var(--primary, #4ECDC4);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.45);
}
