/* CSF Unblock Portal — public styles. Mobile-first, no external assets. */

:root {
    --bg: #0f172a;
    --bg-grad: radial-gradient(1200px 600px at 50% -10%, #1e293b 0%, #0f172a 60%);
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-contrast: #ffffff;
    --ok: #15803d;
    --ok-bg: #dcfce7;
    --bad: #b91c1c;
    --bad-bg: #fee2e2;
    --info-bg: #dbeafe;
    --info-text: #1e40af;
    --focus: #93c5fd;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
        "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    background-image: var(--bg-grad);
    line-height: 1.5;
}

.wrap {
    flex: 1 0 auto;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 32px 18px 48px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.card {
    width: 100%;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px 30px;
}

h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1.ok { color: var(--ok); }
h1.bad { color: var(--bad); }

.lead {
    margin: 0 0 18px;
    color: var(--muted);
}

.meta {
    margin: -6px 0 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

code {
    font-family: var(--mono);
    font-size: 0.92em;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 6px;
}

/* ---- Alerts ---- */
.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.alert-error {
    background: var(--bad-bg);
    color: var(--bad);
    border: 1px solid #fecaca;
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-text);
    border: 1px solid #bfdbfe;
}

/* ---- Form ---- */
.field {
    margin: 0 0 18px;
}

label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus);
}

.code-input {
    letter-spacing: 0.5em;
    text-align: center;
    font-family: var(--mono);
    font-size: 1.4rem;
    font-weight: 600;
}

.hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus);
}

.btn-primary {
    width: 100%;
    padding: 13px 16px;
    color: var(--primary-contrast);
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-link {
    margin-top: 14px;
    padding: 8px 4px;
    color: var(--primary);
    background: transparent;
}

.btn-link:hover {
    text-decoration: underline;
}

.resend-form {
    margin-top: 8px;
}

/* ---- Turnstile ---- */
.cf-turnstile {
    min-height: 65px;
}

/* ---- Results table ---- */
.results {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 10px;
    font-size: 0.92rem;
}

.results th,
.results td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.results th {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.results .empty {
    text-align: center;
    color: var(--muted);
    padding: 18px 8px;
}

.detail {
    display: inline-block;
    max-width: 220px;
    overflow-wrap: anywhere;
    background: #f1f5f9;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.tag-ok, .tag-yes { background: var(--ok-bg); color: var(--ok); }
.tag-fail { background: var(--bad-bg); color: var(--bad); }
.tag-no { background: #e2e8f0; color: #475569; }
.tag-unknown { background: #fef9c3; color: #854d0e; }

/* ---- Footer ---- */
.site-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 16px;
    color: #94a3b8;
    font-size: 0.8rem;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 380px) {
    .card { padding: 22px 16px 24px; }
    .detail { max-width: 130px; }
}

/* additions for the request/verify/result flow */
.alert-info{background:#e6f0ff;border:1px solid #b3d1ff;color:#1e40af;padding:.7rem .9rem;border-radius:8px;margin:.6rem 0}
.btn-link{background:none;border:0;color:#2563eb;text-decoration:underline;cursor:pointer;font:inherit;padding:.2rem 0}
.btn-link[disabled]{color:#9aa4b2;cursor:not-allowed;text-decoration:none}
.resend-form{margin-top:.4rem}
h1.ok{color:#15803d}
.muted{color:#6b7280}

/* phone input with fixed +30 prefix */
.phone-input{display:flex;align-items:stretch}
.phone-prefix{display:flex;align-items:center;padding:0 .8rem;background:#eef2f7;border:1px solid #cbd5e1;border-right:0;border-radius:8px 0 0 8px;color:#334155;font-weight:600}
.phone-input input{border-radius:0 8px 8px 0;flex:1;min-width:0}
