/* ═══════════════════════════════════════════════════════════════════════
   BOLMOL — shortlink scan + redirect page stylesheet
   Light theme. Bootstrap 5 baseline. Loaded by scan_and_redirect.php.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --bm-go-bg:          #f4f6fb;
    --bm-go-surface:     #ffffff;
    --bm-go-border:      #dfe4ec;
    --bm-go-text:        #0b1220;
    --bm-go-text-soft:   #5b6675;
    --bm-go-text-faint:  #97a1b0;
    --bm-go-primary:     #1877f2;
    --bm-go-success:     #16a34a;
    --bm-go-danger:      #dc2626;
    --bm-go-warn:        #d97706;
    --bm-go-url-bg:      #eff6ff;
    --bm-go-url-border:  #dbeafe;
    --bm-go-url-text:    #1d4ed8;
}

html, body { background: var(--bm-go-bg); }

body.bm-go-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--bm-go-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[dir="rtl"] body.bm-go-body {
    font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic",
                 "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq",
                 system-ui, -apple-system, sans-serif;
}

.bm-go-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.bm-go-card {
    width: 100%;
    max-width: 480px;
    background: var(--bm-go-surface);
    border: 1px solid var(--bm-go-border);
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(11, 18, 32, 0.04),
        0 12px 40px rgba(11, 18, 32, 0.08);
    color: var(--bm-go-text);
}

.bm-go-card .card-body {
    padding: 40px 28px;
}

/* ── Spinner ────────────────────────────────────────────────── */
.bm-go-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 20px;
    border: 4px solid var(--bm-go-border);
    border-top-color: var(--bm-go-primary);
    border-radius: 50%;
    animation: bm-go-spin 0.8s linear infinite;
}

@keyframes bm-go-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bm-go-spinner {
        animation: none;
        border-top-color: var(--bm-go-border);
    }
}

/* ── Icons ──────────────────────────────────────────────────── */
.bm-go-icon {
    display: none;
    font-size: 48px;
    line-height: 1;
    margin: 0 0 16px;
}

.bm-go-icon.is-visible {
    display: block;
}

.bm-go-icon-warning { color: var(--bm-go-danger); }
.bm-go-icon-success { color: var(--bm-go-success); }

/* ── Heading / text ─────────────────────────────────────────── */
.bm-go-heading {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    color: var(--bm-go-text);
    line-height: 1.35;
}

.bm-go-text {
    margin: 0 0 16px;
    font-size: 0.95rem;
    color: var(--bm-go-text-soft);
    line-height: 1.55;
}

/* ── URL preview ────────────────────────────────────────────── */
.bm-go-url-preview {
    margin: 0 0 18px;
    padding: 10px 12px;
    font-size: 0.875rem;
    color: var(--bm-go-url-text);
    background: var(--bm-go-url-bg);
    border: 1px solid var(--bm-go-url-border);
    border-radius: 6px;
    word-break: break-all;
    text-align: start;
    max-height: 120px;
    overflow-y: auto;
}

/* ── Buttons ────────────────────────────────────────────────── */
.bm-go-action-btn {
    display: none;
    margin-top: 4px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 8px;
}

.bm-go-action-btn.is-visible {
    display: inline-block;
}

.bm-go-proceed {
    display: none;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--bm-go-danger);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    user-select: none;
}

.bm-go-proceed.is-visible {
    display: inline-block;
}

.bm-go-proceed:hover,
.bm-go-proceed:focus {
    color: #b91c1c;
}

/* ── RTL ────────────────────────────────────────────────────── */
html[dir="rtl"] .bm-go-heading,
html[dir="rtl"] .bm-go-text {
    text-align: center;
}

html[dir="rtl"] .bm-go-url-preview {
    text-align: right;
}