/* ==========================================================================
   IP LOOKUP — uses the same OntoEase tokens as qr-generator.css:
   primary blue #2f5bea, ink #0b1b42, surface #f5f7fb,
   borders #e0e5ef / #e6e9f2, card radius 16px, shadow 0 8px 30px rgba(0,0,0,.06)
   ========================================================================== */

/* --------------------------------------------------------------------------
   SHARED PAGE FRAMEWORK
   Ported from qr-generator.css so this page has the same container/card/
   form/button scaffolding as the rest of the site (these classes live per
   page, not in base.css).
   -------------------------------------------------------------------------- */

.container {
    max-width: 1000px;
    margin: 40px auto 70px auto;
    padding: 0 20px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #e6e9f2;
}

.tool-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

/* Multiple .tool-card sections now sit back-to-back on this page (main
   lookup, dual-stack check, leak test) — give every one after the first
   the same breathing room .seo-card/.faq-card already have. */
.tool-card + .tool-card {
    margin-top: 30px;
}

.card-title {
    margin-bottom: 20px;
    color: #0b1b42;
}

.settings-box {
    background: #f5f7fb;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e5ef;
}

.form-group,
.input-group {
    margin-bottom: 18px;
}

textarea,
input,
select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    font-family: inherit;
}

.form-row {
    display: flex;
    gap: 20px;
}

.primary-btn {
    background: #2f5bea;
    color: #fff;
    border: none;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
}

.primary-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.secondary-btn {
    background: #fff;
    border: 1px solid #2f5bea;
    color: #2f5bea;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.secondary-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.center {
    text-align: center;
    margin-top: 20px;
}

.seo-card {
    max-width: 800px;
    margin: 35px auto 0 auto;
    padding: 30px;
}

.seo-title {
    font-size: 36px;
    margin-bottom: 24px;
    color: #0b1b42;
}

.seo-content {
    background: #f5f7fb;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e5ef;
}

.seo-content h3 {
    margin-top: 20px;
    margin-bottom: 12px;
    color: #0b1b42;
}

.seo-content h3:first-child {
    margin-top: 0;
}

.seo-content p,
.seo-content li {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

.seo-content ol,
.seo-content ul {
    padding-left: 20px;
}

@media (max-width: 768px) {
    .seo-title {
        font-size: 28px;
    }

    .container {
        margin-top: 25px;
    }
}

/* --------------------------------------------------------------------------
   IP LOOKUP — page-specific styles
   -------------------------------------------------------------------------- */

.tool-subtitle {
    margin: -8px 0 20px 0;
    color: #4a5578;
    font-size: 15px;
    line-height: 1.6;
}

/* ---------- Hero action box ---------- */

.ip-actions-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ip-action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ip-help-text {
    font-size: 13px;
    color: #6b7492;
}

.ip-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #9aa3c2;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ip-divider::before,
.ip-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e0e5ef;
}

.ip-manual-form {
    width: 100%;
}

.ip-manual-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0b1b42;
}

.ip-input-row {
    display: flex;
    gap: 10px;
}

.ip-input-row input {
    flex: 1;
    min-width: 0;
}

.ip-input-row .primary-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.ip-error-text {
    margin-top: 8px;
    font-size: 13px;
    color: #c0392b;
}

/* ---------- "Your IP" chip ---------- */

.your-ip-box {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #eef2ff;
    border: 1px solid #d6ddf9;
    border-radius: 12px;
}

.your-ip-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #4a5578;
}

.your-ip-value {
    display: block;
    margin-top: 2px;
    font-size: 22px;
    font-weight: 700;
    color: #0b1b42;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

/* ---------- Loading skeleton ---------- */

.loading-box {
    margin-top: 24px;
}

.skeleton-line {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef1f8 25%, #e2e6f3 37%, #eef1f8 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-title {
    width: 40%;
    height: 18px;
    margin-bottom: 16px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.loading-caption {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #6b7492;
}

/* ---------- Errors ---------- */

.lookup-error-box {
    margin-top: 24px;
    padding: 14px 16px;
    background: #fdf1f0;
    border: 1px solid #f3c9c4;
    border-radius: 10px;
    color: #9a2f24;
    font-size: 14px;
}

/* ---------- Results ---------- */

.results-section {
    margin-top: 28px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.result-card {
    background: #f5f7fb;
    border: 1px solid #e0e5ef;
    border-radius: 12px;
    padding: 18px 20px;
}

.result-card-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0b1b42;
}

.result-dl {
    margin: 0;
}

.result-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #e0e5ef;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row dt {
    font-size: 13px;
    color: #6b7492;
    flex-shrink: 0;
}

.result-row dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0b1b42;
    text-align: right;
    word-break: break-word;
}

.ip-address-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ip-address-value {
    font-size: 22px;
    font-weight: 700;
    color: #0b1b42;
    word-break: break-all;
    font-variant-numeric: tabular-nums;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid #d6ddf9;
    background: #fff;
    color: #2f5bea;
    border-radius: 8px;
    cursor: pointer;
}

.icon-btn:hover {
    background: #eef2ff;
}

.approx-note {
    margin: 12px 0 0 0;
    font-size: 12.5px;
    color: #6b7492;
    line-height: 1.5;
}

/* ---------- Badges ---------- */

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
}

.badge-neutral { background: #eef1f8; color: #4a5578; }
.badge-blue { background: #e4eafe; color: #2f5bea; }
.badge-green { background: #e5f6ec; color: #1e8a4c; }
.badge-amber { background: #fdf3e0; color: #a9701a; }
.badge-red { background: #fdeceb; color: #c0392b; }

/* ---------- Map ---------- */

.map-card {
    margin-top: 16px;
}

.map-container {
    width: 100%;
    height: 280px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef1f8;
    border: 1px solid #e0e5ef;
}

/* ---------- Actions ---------- */

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.action-feedback {
    min-height: 18px;
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #1e8a4c;
}

.privacy-note {
    margin: 24px 0 0 0;
    font-size: 12.5px;
    color: #8891ac;
    text-align: center;
    line-height: 1.6;
}

/* ---------- Dual-stack check ---------- */

.dual-stack-results {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dual-stack-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.dual-stack-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dual-stack-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7492;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.dual-stack-address {
    font-size: 17px;
    font-weight: 700;
    color: #0b1b42;
    word-break: break-all;
    font-variant-numeric: tabular-nums;
}

.dual-stack-action {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.dual-stack-view-btn {
    padding: 6px 14px;
    font-size: 13px;
}

/* ---------- Browser leak test ---------- */

.leak-test-results {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.leak-verdict-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #f5f7fb;
    border: 1px solid #e0e5ef;
    border-radius: 10px;
}

.leak-verdict-box .badge {
    flex-shrink: 0;
    margin-top: 1px;
}

.leak-verdict-box .approx-note {
    margin: 0;
}

/* ---------- FAQ accordion ---------- */

.faq-card {
    max-width: 800px;
    margin: 20px auto 0 auto;
    padding: 30px;
}

.faq-list {
    background: #f5f7fb;
    border: 1px solid #e0e5ef;
    border-radius: 12px;
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid #e0e5ef;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #0b1b42;
    cursor: pointer;
}

.faq-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    position: relative;
}

.faq-icon::before,
.faq-icon::after {
    content: "";
    position: absolute;
    background: #2f5bea;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.faq-icon::before {
    width: 12px;
    height: 2px;
}

.faq-icon::after {
    width: 2px;
    height: 12px;
    transition: transform .15s ease;
}

.faq-item.open .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg) scale(0);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
    padding: 0 20px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 20px 18px 20px;
}

.faq-answer p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.7;
    color: #333;
}

/* ---------- Utility ---------- */

.hidden {
    display: none !important;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {

    .results-grid {
        grid-template-columns: 1fr;
    }

    .skeleton-grid {
        grid-template-columns: 1fr;
    }

    .ip-input-row {
        flex-direction: column;
    }

    .ip-input-row .primary-btn {
        width: 100%;
    }

    .your-ip-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .your-ip-box .secondary-btn {
        width: 100%;
    }

    .actions-row {
        flex-direction: column;
    }

    .actions-row .secondary-btn {
        width: 100%;
    }

    .dual-stack-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dual-stack-action {
        width: 100%;
        justify-content: space-between;
    }

    .dual-stack-view-btn {
        flex-shrink: 0;
    }

    .map-container {
        height: 220px;
    }

    .faq-card {
        padding: 20px;
    }
}