/* ==========================================================================
   THE SHORE CAPITAL FINANCIAL GROUP - BOT GUARD & SECURITY VERIFICATION GATE
   Institutional threat intelligence & automated scraper mitigation
   ========================================================================== */

:root {
    --sbg-navy: #002e5d;
    --sbg-blue: #005eb8;
    --sbg-accent-blue: #117aca;
    --sbg-gold: #c5a059;
    --sbg-green: #28a745;
    --sbg-bg: #f4f7f9;
    --sbg-card-bg: #ffffff;
    --sbg-border: #e2e8f0;
    --sbg-text-dark: #1e293b;
    --sbg-text-muted: #64748b;
}

/* Protected content is hidden by default before human verification */
.bot-shield-protected {
    display: none !important;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* When verified, content is displayed */
html.shore-verified .bot-shield-protected,
body.shore-verified .bot-shield-protected {
    display: block !important;
    opacity: 1 !important;
}

/* When verified, gate is completely hidden */
html.shore-verified #shore-bot-guard,
body.shore-verified #shore-bot-guard {
    display: none !important;
}

/* Main Gate Container */
.shore-bot-guard-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* High-Security Modal Card */
.shore-bot-guard-card {
    background: var(--sbg-card-bg);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 46, 93, 0.12), 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-top: 5px solid var(--sbg-navy);
    max-width: 580px;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    animation: sbgCardFadeIn 0.4s ease-out;
}

@keyframes sbgCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.sbg-header {
    padding: 24px 30px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.sbg-logo-badge {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sbg-crest {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sbg-titles {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sbg-institution-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--sbg-navy);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.sbg-system-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--sbg-gold);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Body Section */
.sbg-body {
    padding: 32px 30px;
    text-align: left;
}

.sbg-icon-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.sbg-shield-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 12px;
    background: rgba(0, 94, 184, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sbg-blue);
}

.sbg-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--sbg-navy);
    letter-spacing: -0.3px;
}

.sbg-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--sbg-accent-blue);
}

.sbg-description {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--sbg-text-dark);
    margin: 0 0 25px 0;
    background: #f8fafc;
    padding: 16px 18px;
    border-radius: 8px;
    border-left: 3px solid var(--sbg-blue);
}

/* Challenge Box (Turnstile / Cloudflare style) */
.sbg-challenge-box {
    background: #ffffff;
    border: 1.5px solid #d0d7de;
    border-radius: 10px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    user-select: none;
}

.sbg-challenge-box:hover {
    border-color: #005eb8;
    box-shadow: 0 4px 14px rgba(0, 94, 184, 0.1);
}

.sbg-challenge-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sbg-checkbox {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
    border: 2px solid #94a3b8;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
}

.sbg-checkbox:hover {
    border-color: var(--sbg-blue);
}

.sbg-checkbox:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.25);
}

.sbg-checkbox-inner {
    width: 14px;
    height: 14px;
    background: transparent;
    border-radius: 3px;
    transition: all 0.2s ease;
}

/* Spinner while verifying */
.sbg-spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 2.5px solid #e2e8f0;
    border-top: 2.5px solid var(--sbg-blue);
    border-radius: 50%;
    animation: sbgSpin 0.7s linear infinite;
    position: absolute;
}

@keyframes sbgSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sbg-checkbox.sbg-checking {
    border-color: var(--sbg-blue);
    cursor: wait;
}

.sbg-checkbox.sbg-checking .sbg-checkbox-inner {
    display: none;
}

.sbg-checkbox.sbg-checking .sbg-spinner {
    display: block;
}

/* Checkmark when verified */
.sbg-checkmark {
    display: none;
    position: absolute;
    animation: sbgCheckBounce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes sbgCheckBounce {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.sbg-checkbox.sbg-verified {
    border-color: var(--sbg-green);
    background: rgba(40, 167, 69, 0.1);
    cursor: default;
}

.sbg-checkbox.sbg-verified .sbg-checkbox-inner,
.sbg-checkbox.sbg-verified .sbg-spinner {
    display: none;
}

.sbg-checkbox.sbg-verified .sbg-checkmark {
    display: block;
}

.sbg-challenge-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sbg-main-prompt {
    font-size: 15px;
    font-weight: 600;
    color: var(--sbg-navy);
}

.sbg-sub-prompt {
    font-size: 12px;
    color: var(--sbg-text-muted);
    margin-top: 2px;
}

.sbg-challenge-right {
    display: flex;
    align-items: center;
}

.sbg-cf-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 14px;
    border-left: 1px solid #e2e8f0;
}

.sbg-cf-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}

.sbg-cf-text strong {
    font-size: 10px;
    letter-spacing: 0.8px;
    color: var(--sbg-navy);
    font-weight: 800;
}

.sbg-cf-text span {
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

/* Security Error / Warning Status */
.sbg-status {
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    line-height: 1.4;
    text-align: left;
}

.sbg-status.sbg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.sbg-status.sbg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Footer Section */
.sbg-footer {
    padding: 18px 30px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.sbg-footer-meta {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', Courier, monospace;
}

.sbg-footer-copy {
    font-size: 11px;
    color: #64748b;
}

/* Mobile Responsiveness */
@media screen and (max-width: 600px) {
    .shore-bot-guard-wrapper {
        padding: 20px 12px;
    }

    .sbg-header {
        padding: 18px 20px;
    }

    .sbg-body {
        padding: 22px 20px;
    }

    .sbg-challenge-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .sbg-cf-brand {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #e2e8f0;
        padding-top: 10px;
        width: 100%;
    }

    .sbg-footer {
        padding: 14px 20px;
    }
}
