/* ==========================================================================
   YourIP.us — shared light-theme styles for the redesigned pages.
   Used by the *.redesign.php demos (home, speedtest, portscan, blacklist,
   whois, dnsreport). Page-specific styles stay inline on each page.
   ========================================================================== */

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f8fa;
    --row-alt: #f8f9f9;
    --border: #e4e7eb;
    --text: #11181c;
    --muted: #5b6670;
    --primary: #2f6fed;
    --primary-soft: #eaf1fe;
    --accent: #f59e0b;
    --accent-soft: #fef3da;
    --success: #18794e;
    --success-soft: #e6f4ec;
    --danger: #c0392b;
    --danger-soft: #fdecea;
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    padding-top: 72px;
}

.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

.container { max-width: 1140px; }

/* ---------- Navbar (pill / segmented) ---------- */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    min-height: 64px;
}
.navbar-brand {
    color: var(--text) !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-brand img { width: 26px; height: 26px; }
.navbar .navbar-nav {
    gap: 2px;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
}
.navbar .nav-link {
    color: var(--muted) !important;
    font-weight: 500;
    font-size: .92rem;
    padding: .4rem .95rem !important;
    border-radius: 999px;
    line-height: 1.2;
    transition: color .15s ease, background-color .15s ease;
}
.navbar .nav-link:hover { color: var(--text) !important; background: rgba(15, 23, 42, .05); }
.navbar .nav-link.active {
    color: #fff !important;
    font-weight: 600;
    background: var(--primary);
    box-shadow: 0 1px 2px rgba(47, 111, 237, .35);
}
.navbar-toggler { border-color: var(--border); }
@media (max-width: 991px) {
    .navbar .navbar-nav {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 8px 0 0;
        gap: 4px;
    }
    .navbar .nav-link { padding: .5rem .75rem !important; }
    .navbar .nav-link.active { box-shadow: none; }
}

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { margin: 0 8px; color: #c2c9d2; }
.crumbs .current { color: var(--text); font-weight: 600; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.page-head .ic {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary);
    flex: 0 0 auto;
}
.page-head .ic svg { width: 24px; height: 24px; }
.page-title {
    font-size: clamp(1.5rem, 3.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0;
}
.page-sub { color: var(--muted); margin: 0 0 26px; font-size: 1rem; max-width: 820px; }

/* ---------- Cards ---------- */
.ip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 26px;
}
.ip-card-pad { padding: 26px; }
.ip-card-head {
    font-size: 1.2rem;
    font-weight: 500;
    color: #3a444d;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

/* ---------- Form controls ---------- */
.field-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: 6px;
}
.field-label span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.text-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.btn-primary-solid {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s ease, transform .05s ease;
}
.btn-primary-solid:hover { background: #2560d4; color: #fff; }
.btn-primary-solid:active { transform: translateY(1px); }
.btn-primary-solid:disabled { opacity: .6; cursor: default; }
.btn-primary-solid svg { width: 18px; height: 18px; }

/* ---------- Alerts ---------- */
.note {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: .95rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.note.ok { background: var(--success-soft); border-color: #bfe3cd; color: #14613d; }
.note.warn { background: var(--accent-soft); border-color: #f7e3b8; color: #92600b; }
.note.err { background: var(--danger-soft); border-color: #f3c9c4; color: #93271c; }

/* ---------- Key/value & badges ---------- */
.kv-block { display: flex; flex-direction: column; }
.kv-line { display: flex; gap: 16px; padding: 8px 0; align-items: baseline; }
.kv-line .k { flex: 0 0 150px; color: var(--muted); font-size: .92rem; }
.kv-line .v { flex: 1 1 auto; min-width: 0; color: var(--text); font-weight: 600; word-break: break-word; }

.chip {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
}
.chip.gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* ---------- Explainer cards ---------- */
.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    height: 100%;
}
.info-card .ic {
    width: 42px; height: 42px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent);
    margin-bottom: 14px;
}
.info-card .ic svg { width: 21px; height: 21px; }
.info-card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.info-card p { color: var(--muted); font-size: .95rem; line-height: 1.65; margin: 0; }

/* ---------- Footer ---------- */
footer.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .9rem;
}
footer.site-footer a { color: var(--muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--primary); }
