/* ================================================
   WHOIS Lookup Tool Styles
   ================================================ */

/* ── Intro ────────────────────────────────────── */
.wi-intro {
    color: var(--text-light);
    margin-bottom: 0;
    border-bottom: none;
}

/* ── Form card ────────────────────────────────── */
.wi-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin: 24px 0 20px;
    box-shadow: var(--shadow-sm);
}

.wi-field {
    margin-bottom: 0;
}

.wi-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}

.wi-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.wi-domain-input {
    flex: 1;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-sans);
    color: var(--text);
    background: #fff;
    transition: border-color var(--ease), box-shadow var(--ease);
    outline: none;
    -webkit-appearance: none;
}

.wi-domain-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.wi-lookup-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

.wi-form-error {
    color: #ef4444;
    font-size: .875rem;
    font-weight: 500;
    margin: 10px 0 0;
}

/* ── Result card ──────────────────────────────── */
.wi-result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.wi-result-header {
    background: var(--hdr-bg);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.wi-result-domain {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.wi-result-time {
    font-size: .75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.wi-result-footer {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

/* ── Sections ─────────────────────────────────── */
.wi-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.wi-section:last-child {
    border-bottom: none;
}

.wi-section-title {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* ── Field table ──────────────────────────────── */
.wi-fields-table {
    width: 100%;
    border-collapse: collapse;
}

.wi-field-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 16px 4px 0;
    vertical-align: middle;
    white-space: nowrap;
    width: 130px;
}

.wi-field-value {
    font-size: .875rem;
    color: var(--text);
    padding: 4px 0;
    vertical-align: middle;
    word-break: break-word;
}

/* ── Redacted — black marker bars ────────────── */
.wi-redacted-bar {
    display: inline-block;
    background: #111827;
    border-radius: 1px;
    height: 0.82em;
    vertical-align: middle;
    /* width set inline per field */
}

/* ── Redacted stamp ───────────────────────────── */
.wi-section-redacted {
    /* No overflow:hidden so stamp can breathe */
    padding-bottom: 20px;
}

.wi-stamp {
    position: absolute;
    top: 50%;
    left: 56%;
    transform: translate(-50%, -50%) rotate(-18deg);
    pointer-events: none;
    z-index: 10;
}

.wi-stamp-inner {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    font-family: 'Courier New', Courier, monospace;
    color: rgba(220, 38, 38, 0.88);
    letter-spacing: 0.28em;
    padding: 5px 18px 5px 22px; /* extra-left for letter-spacing visual balance */
    border: 3.5px solid rgba(220, 38, 38, 0.75);
    border-radius: 5px;
    white-space: nowrap;
    box-shadow:
        0 0 0 1.5px rgba(220, 38, 38, 0.18),
        inset 0 0 14px rgba(220, 38, 38, 0.06);
    text-shadow: 1px 1px 0 rgba(180, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.04);
    /* Slight opacity dips to simulate uneven ink */
    opacity: 0.93;
}

/* ── No structured data ───────────────────────── */
.wi-no-data {
    color: var(--text-muted);
    font-size: .875rem;
    padding: 8px 0;
}

.wi-raw-output {
    background: #0f172a;
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: .75rem;
    line-height: 1.6;
    padding: 14px 18px;
    margin: 12px 20px 16px;
    border-radius: var(--radius);
    max-height: 360px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ── Small button ─────────────────────────────── */
.wi-btn-sm {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--ease), background var(--ease), border-color var(--ease);
    line-height: 1.5;
    white-space: nowrap;
}

.wi-btn-sm:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.wi-btn-sm:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── History card ─────────────────────────────── */
.wi-history-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.wi-history-header {
    background: var(--hdr-bg);
    padding: 12px 20px;
}

.wi-history-title {
    font-size: .85rem;
    font-weight: 700;
    color: #e2e8f0;
}

.wi-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.wi-history-table thead {
    background: #f1f5f9;
}

.wi-history-table th {
    padding: 8px 16px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.wi-history-table td {
    padding: 9px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text);
}

.wi-history-table tbody tr:last-child td {
    border-bottom: none;
}

.wi-history-table tbody tr:hover {
    background: #fafbff;
}

.wi-hist-date {
    font-size: .8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.wi-hist-mono {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-muted);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 700px) {
    .wi-form-card { padding: 18px 16px; }

    .wi-input-row { flex-direction: column; }

    .wi-section { padding: 14px 16px; }

    .wi-stamp-inner { font-size: 1.3rem; letter-spacing: 0.2em; }

    .wi-field-label { width: 100px; font-size: .75rem; }

    .wi-history-table th:nth-child(3),
    .wi-history-table td:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
    .wi-result-header { padding: 12px 14px; }
    .wi-result-footer { padding: 8px 14px; }
    .wi-stamp-inner { font-size: 1.1rem; padding: 4px 12px 4px 15px; }
}
