/* =========================================================
   ANDINOHOST — WHOIS / RDAP DETAIL ADAPTER 1.4.4
   Normalizes the native [wpdomainwhois] output visually.
   WP Domain Checker handles domains; IPs use authoritative RDAP through WordPress.
   ========================================================= */

.andino-whois-detail {
    --whois-brand: #44b5ed;
    --whois-brand-strong: #168fc8;
    --whois-ink: #111315;
    --whois-text: #262b30;
    --whois-muted: #66717b;
    --whois-line: #e2e7eb;
    --whois-line-strong: #cfd7de;
    --whois-surface: #ffffff;
    --whois-soft: #f5faff;
    --whois-soft-line: #b9dcf7;

    width: 100%;
    color: var(--whois-text);
    font-family: "Inter", sans-serif;
}

.andino-whois-detail *,
.andino-whois-detail *::before,
.andino-whois-detail *::after {
    box-sizing: border-box;
}

/* IP native/plugin output must never flash before the asynchronous RDAP result. */
.andino-whois-detail[data-resource-type="ip"] > .andino-whois-detail__native {
    display: none !important;
}

.andino-whois-detail__layout {
    display: grid;
    gap: 24px;
    width: 100%;
}

.andino-whois-detail__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
    padding: 34px 38px;
    border: 1px solid var(--whois-soft-line);
    border-radius: 12px;
    background: var(--whois-soft);
    box-shadow: 0 14px 40px rgba(17, 24, 39, 0.045);
}

.andino-whois-detail__eyebrow {
    display: block;
    margin-bottom: 16px;
    color: var(--whois-brand-strong);
    font-size: 11px;
    font-weight: 820;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.andino-whois-detail__domain {
    margin: 0;
    color: var(--whois-ink);
    font-family: inherit;
    font-size: clamp(36px, 4.4vw, 54px);
    font-weight: 790;
    line-height: 1;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.andino-whois-detail__lead {
    max-width: 780px;
    margin: 16px 0 0;
    color: var(--whois-muted);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.65;
}

.andino-whois-detail__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--whois-line-strong);
    border-radius: 999px;
    background: #fff;
    color: #5f6973;
    font-size: 12px;
    font-weight: 720;
    white-space: nowrap;
}

.andino-whois-detail__badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.andino-whois-detail__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.andino-whois-detail__card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--whois-line);
    border-radius: 10px;
    background: var(--whois-surface);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.035);
}

.andino-whois-detail__card-title {
    margin: 0;
    padding: 17px 20px;
    border-bottom: 1px solid var(--whois-line);
    background: #fafbfc;
    color: var(--whois-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 780;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.andino-whois-detail__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 8px 20px;
}

.andino-whois-detail__field {
    min-width: 0;
    padding: 15px 14px 15px 0;
    border-bottom: 1px solid #edf0f2;
}

.andino-whois-detail__field:nth-last-child(-n + 2) {
    border-bottom-color: transparent;
}

.andino-whois-detail__label,
.andino-whois-detail__value {
    margin: 0;
}

.andino-whois-detail__label {
    margin-bottom: 7px;
    color: var(--whois-muted);
    font-size: 11px;
    font-weight: 620;
    line-height: 1.35;
}

.andino-whois-detail__value {
    color: var(--whois-ink);
    font-size: 13px;
    font-weight: 560;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.andino-whois-detail__value-text {
    white-space: pre-line;
}

.andino-whois-detail__link {
    color: var(--whois-brand-strong);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.andino-whois-detail__link:hover,
.andino-whois-detail__link:focus-visible {
    text-decoration: underline;
}

.andino-whois-detail__technical {
    overflow: hidden;
    border: 1px solid var(--whois-line);
    border-radius: 10px;
    background: #fff;
}

.andino-whois-detail__technical-summary {
    position: relative;
    padding: 17px 48px 17px 20px;
    color: var(--whois-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.andino-whois-detail__technical-summary::-webkit-details-marker {
    display: none;
}

.andino-whois-detail__technical-summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: var(--whois-brand-strong);
    font-size: 20px;
    font-weight: 500;
}

.andino-whois-detail__technical[open] .andino-whois-detail__technical-summary::after {
    content: "−";
}

.andino-whois-detail__technical-body {
    padding: 22px 20px;
    border-top: 1px solid var(--whois-line);
    overflow-x: auto;
}

/* Native output is intentionally preserved inside the expandable technical view. */
.andino-whois-detail__technical-body .andino-whois-detail__native,
.andino-whois-detail__native--fallback {
    max-width: 100%;
    margin: 0;
    color: #39424a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.andino-whois-detail__technical-body .andino-whois-detail__native pre,
.andino-whois-detail__native--fallback pre {
    max-width: 100%;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.andino-whois-detail__technical-body .andino-whois-detail__native h1,
.andino-whois-detail__technical-body .andino-whois-detail__native h2,
.andino-whois-detail__technical-body .andino-whois-detail__native h3,
.andino-whois-detail__technical-body .andino-whois-detail__native h4 {
    font-family: "Inter", sans-serif;
}

.andino-whois-detail__native--fallback {
    padding: 26px 28px;
    border: 1px solid var(--whois-line);
    border-radius: 10px;
    background: #fff;
}

.andino-whois-detail__empty {
    padding: 28px 30px;
    border: 1px solid var(--whois-line);
    border-radius: 10px;
    background: #fff;
    color: var(--whois-muted);
    font-size: 14px;
    line-height: 1.6;
}

.andino-whois-detail a:focus-visible,
.andino-whois-detail summary:focus-visible {
    outline: 2px solid var(--whois-brand);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .andino-whois-detail__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .andino-whois-detail__layout {
        gap: 16px;
    }

    .andino-whois-detail__hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px 24px;
    }

    .andino-whois-detail__badge {
        justify-self: start;
    }

    .andino-whois-detail__fields {
        grid-template-columns: 1fr;
        padding-inline: 18px;
    }

    .andino-whois-detail__field,
    .andino-whois-detail__field:nth-last-child(-n + 2) {
        padding-right: 0;
        border-bottom: 1px solid #edf0f2;
    }

    .andino-whois-detail__field:last-child {
        border-bottom-color: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .andino-whois-detail * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
