/* WHOIS Lookup Page Styles */

.header {
    background-color: white !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* ─── Hero ─────────────────────────────────────── */

.whois-hero-section {
    background: linear-gradient(135deg, var(--primary-50) 0%, #ffffff 100%);
    padding: 80px 0;
    min-height: 580px;
}

.whois-hero-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.whois-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.whois-hero-content {
    padding-right: 24px;
    padding-top: 16px;
}

.whois-hero-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-color);
}

.whois-hero-subtitle {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-color);
}

.whois-hero-highlight {
    color: var(--primary-500);
    position: relative;
}

.whois-hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(55, 125, 255, 0.2);
    z-index: -1;
}

.whois-hero-description {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.whois-hero-trust {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whois-hero-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.whois-hero-trust-item svg {
    color: var(--success-color, #16a34a);
    flex-shrink: 0;
}

/* ─── Form card ────────────────────────────────── */

.whois-hero-form-wrapper {
    position: relative;
}

.whois-hero-form-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.whois-hero-form-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
}

.whois-hero-form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.whois-lookup-form {
    margin-bottom: 16px;
}

.whois-form-row {
    display: flex;
    gap: 8px;
}

.whois-form-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    outline: none;
    transition: border-color 0.15s;
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-color);
}

.whois-form-input:focus {
    border-color: var(--primary-500);
    background: white;
}

.whois-form-input::placeholder {
    color: var(--text-placeholder, #9ca3af);
    font-family: inherit;
}

.whois-form-submit {
    padding: 12px 20px;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}

.whois-form-submit:hover {
    background: var(--primary-600, #2563eb);
}

.whois-form-submit:active {
    transform: scale(0.98);
}

/* ─── Alerts ────────────────────────────────────── */

.whois-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
}

.whois-alert.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.whois-alert.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ─── Results tabs ──────────────────────────────── */

.whois-results {
    margin-top: 16px;
}

.whois-result-card {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.whois-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-secondary, #f9fafb);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.whois-result-domain {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.whois-result-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.whois-chip-success {
    background: #dcfce7;
    color: #15803d;
}

.whois-chip-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Tabs */
.whois-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
    overflow-x: auto;
}

.whois-tab-btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.whois-tab-btn:hover {
    color: var(--text-color);
}

.whois-tab-btn.active {
    color: var(--primary-500);
    border-bottom-color: var(--primary-500);
    background: white;
}

/* Tab panels */
.whois-tab-panel {
    display: none;
    padding: 16px;
}

.whois-tab-panel.active {
    display: block;
}

/* Registration tab */
.whois-field-grid {
    display: grid;
    gap: 10px;
}

.whois-field-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    align-items: start;
    font-size: 13px;
}

.whois-field-label {
    color: var(--text-muted);
    font-weight: 500;
    padding-top: 1px;
}

.whois-field-value {
    color: var(--text-color);
    font-weight: 400;
    word-break: break-word;
}

.whois-field-value a {
    color: var(--primary-500);
    text-decoration: none;
}

.whois-field-value a:hover {
    text-decoration: underline;
}

.whois-redacted {
    color: var(--text-placeholder, #9ca3af);
    font-style: italic;
    font-size: 12px;
}

/* Name servers tab */
.whois-ns-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.whois-ns-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    color: var(--text-color);
    padding: 6px 10px;
    background: var(--bg-secondary, #f9fafb);
    border-radius: 6px;
}

.whois-ns-dot {
    width: 7px;
    height: 7px;
    background: var(--primary-500);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Status tab */
.whois-status-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whois-status-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: var(--bg-secondary, #f9fafb);
    border-radius: 8px;
    border-left: 3px solid var(--primary-300, #93c5fd);
}

.whois-status-code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.whois-status-humanized {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

/* Raw tab */
.whois-raw-block {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 8px;
    padding: 14px;
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow-y: auto;
}

/* API endpoint reference in results */
.whois-result-api {
    padding: 10px 16px;
    background: var(--bg-secondary, #f9fafb);
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.whois-result-api-label {
    color: var(--text-muted);
}

.whois-result-api-url {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    color: var(--primary-500);
    background: var(--primary-50);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ─── What is WHOIS section ─────────────────────── */

.whois-what-section {
    padding: 80px 0;
    background: white;
}

.whois-what-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.whois-what-header {
    text-align: center;
    margin-bottom: 48px;
}

.whois-what-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.whois-what-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 620px;
    margin: 0 auto;
}

.whois-what-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.whois-what-card {
    background: var(--bg-secondary, #f9fafb);
    border-radius: 12px;
    padding: 28px 24px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.whois-what-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100, #dbeafe);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary-500);
}

.whois-what-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.whois-what-card-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.whois-explainer {
    background: var(--primary-50);
    border: 1px solid var(--primary-100, #dbeafe);
    border-radius: 12px;
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.whois-explainer-block h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.whois-explainer-block p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── How to read section ───────────────────────── */

.whois-read-section {
    padding: 80px 0;
    background: var(--bg-secondary, #f9fafb);
}

.whois-read-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.whois-read-header {
    text-align: center;
    margin-bottom: 48px;
}

.whois-read-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.whois-read-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 620px;
    margin: 0 auto;
}

.whois-read-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.whois-read-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

.whois-read-table thead {
    background: var(--primary-500);
    color: white;
}

.whois-read-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.03em;
}

.whois-read-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    vertical-align: top;
    line-height: 1.5;
}

.whois-read-table tr:last-child td {
    border-bottom: none;
}

.whois-read-table tr:nth-child(even) td {
    background: var(--bg-secondary, #f9fafb);
}

.whois-read-table td code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    background: var(--primary-50);
    color: var(--primary-700, #1d4ed8);
    padding: 2px 6px;
    border-radius: 4px;
}

.whois-status-ref-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.whois-status-ref-item {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 3px solid var(--primary-300, #93c5fd);
}

.whois-status-ref-code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    color: var(--primary-700, #1d4ed8);
    margin-bottom: 4px;
    font-weight: 600;
}

.whois-status-ref-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.whois-read-subtitle-sm {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* ─── API Documentation ─────────────────────────── */

.whois-api-section {
    padding: 80px 0;
    background: white;
}

.whois-api-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.whois-api-header {
    text-align: center;
    margin-bottom: 48px;
}

.whois-api-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.whois-api-highlight {
    color: var(--primary-500);
}

.whois-api-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

.whois-api-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.whois-api-endpoint-info {
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
}

.whois-api-endpoint-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.whois-api-method {
    background: var(--primary-500);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.whois-api-path {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 14px;
    color: var(--text-color);
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.whois-api-param {
    color: var(--primary-500);
}

.whois-api-endpoint-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.whois-api-response {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.whois-api-response-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.whois-api-code-block {
    background: #1e1e2e;
    border-radius: 10px;
    overflow: hidden;
}

.whois-api-code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.whois-api-code-block code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.whois-api-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whois-api-fields h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.whois-api-field {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 13px;
    padding: 8px 12px;
    background: var(--bg-secondary, #f9fafb);
    border-radius: 6px;
}

.whois-api-field code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    color: var(--primary-700, #1d4ed8);
    background: var(--primary-50);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.whois-api-field span {
    color: var(--text-muted);
    line-height: 1.4;
}

.whois-code-examples {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.whois-code-examples-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.whois-code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.whois-code-tab {
    padding: 7px 16px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: var(--text-muted);
    transition: all 0.15s;
}

.whois-code-tab.active {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

.whois-code-panel {
    display: none;
}

.whois-code-panel.active {
    display: block;
}

/* ─── FAQ ───────────────────────────────────────── */

.whois-faq-section {
    padding: 80px 0;
    background: var(--bg-secondary, #f9fafb);
}

.whois-faq-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.whois-faq-header {
    text-align: center;
    margin-bottom: 48px;
}

.whois-faq-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.whois-faq-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
}

.whois-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whois-faq-item {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.whois-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.15s;
}

.whois-faq-question:hover {
    background: var(--bg-secondary, #f9fafb);
}

.whois-faq-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.whois-faq-item.open .whois-faq-icon {
    transform: rotate(180deg);
}

.whois-faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.whois-faq-item.open .whois-faq-answer {
    display: block;
}

.whois-faq-answer code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary-700, #1d4ed8);
}

/* ─── Responsive ────────────────────────────────── */

@media (max-width: 968px) {
    .whois-hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .whois-hero-content {
        padding-right: 0;
    }

    .whois-hero-title {
        font-size: 32px;
    }

    .whois-what-grid {
        grid-template-columns: 1fr;
    }

    .whois-explainer {
        grid-template-columns: 1fr;
    }

    .whois-status-ref-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .whois-hero-section {
        padding: 48px 0;
    }

    .whois-hero-title {
        font-size: 26px;
    }

    .whois-hero-subtitle {
        font-size: 18px;
    }

    .whois-form-row {
        flex-direction: column;
    }

    .whois-form-submit {
        width: 100%;
    }

    .whois-field-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .whois-field-label {
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .whois-what-title,
    .whois-read-title,
    .whois-api-title,
    .whois-faq-title {
        font-size: 24px;
    }

    .whois-what-section,
    .whois-read-section,
    .whois-api-section,
    .whois-faq-section {
        padding: 48px 0;
    }
}

/* Responsive container widths — mirrors mx_record_lookup.css */
@media (min-width: 600px) {
    .whois-hero-container,
    .whois-what-container,
    .whois-read-container,
    .whois-api-container,
    .whois-faq-container {
        max-width: 720px;
    }
}

@media (min-width: 900px) {
    .whois-hero-container,
    .whois-what-container,
    .whois-read-container,
    .whois-api-container,
    .whois-faq-container {
        max-width: 1236px;
    }
}
