/**
 * DNS Lookup block styles
 */
.dns-lookup {
    padding: var(--wp--preset--spacing--60, 4rem) 0;
}

.dns-lookup .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.dns-lookup-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.dns-lookup-header h1 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.dns-lookup-header p {
    color: var(--wp--preset--color--text-muted, #6b7280);
    margin: 0 auto;
}

/* Form */
.dns-lookup-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
    gap: 1rem;
    align-items: end;
    background: var(--wp--preset--color--surface, #ffffff);
    border: 1px solid var(--wp--preset--color--border, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dns-lookup-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.dns-lookup-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wp--preset--color--text, #111827);
}

.dns-lookup-field input,
.dns-lookup-field select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--wp--preset--color--border, #d1d5db);
    border-radius: 8px;
    font: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1rem;
    background: #fff;
    color: var(--wp--preset--color--text, #111827);
    line-height: 1.4;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 0;
}

.dns-lookup-field select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 12px;
    cursor: pointer;
}

.dns-lookup-field input:focus,
.dns-lookup-field select:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.dns-lookup-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: var(--wp--preset--color--primary, #4f46e5);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
}

.dns-lookup-submit:hover {
    background: var(--wp--preset--color--primary-hover, #4338ca);
}

.dns-lookup-submit:active {
    transform: translateY(1px);
}

/* Loading / error */
.dns-lookup-loading {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    background: var(--wp--preset--color--background-muted, #f9fafb);
    border: 1px solid var(--wp--preset--color--border, #e5e7eb);
    color: var(--wp--preset--color--text-muted, #6b7280);
    font-size: 0.9375rem;
    text-align: center;
}

.dns-lookup-error {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 0.9375rem;
}

/* Results */
.dns-lookup-results {
    margin-top: 1.5rem;
    background: var(--wp--preset--color--surface, #ffffff);
    border: 1px solid var(--wp--preset--color--border, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dns-lookup-results-title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
}

.dns-lookup-summary {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: var(--wp--preset--color--primary-50, #eef2ff);
    border: 1px solid var(--wp--preset--color--primary, #4f46e5);
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875rem;
    color: var(--wp--preset--color--text, #111827);
    word-break: break-word;
}

.dns-lookup-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--wp--preset--color--border, #e5e7eb);
    border-radius: 8px;
}

.dns-lookup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.dns-lookup-table th,
.dns-lookup-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--wp--preset--color--border, #e5e7eb);
    vertical-align: top;
}

.dns-lookup-table th {
    background: var(--wp--preset--color--background-muted, #f9fafb);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--wp--preset--color--text-muted, #6b7280);
}

.dns-lookup-table tbody tr:last-child td {
    border-bottom: none;
}

.dns-lookup-table tbody tr:hover {
    background: var(--wp--preset--color--background-muted, #f9fafb);
}

.dns-lookup-table td {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-word;
}

.dns-lookup-value {
    white-space: pre-wrap;
}

.dns-lookup-empty {
    text-align: center;
    color: var(--wp--preset--color--text-muted, #6b7280);
    font-family: inherit;
}

.dns-lookup-table td code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    padding: 0.0625rem 0.375rem;
    background: var(--wp--preset--color--primary-50, #eef2ff);
    color: var(--wp--preset--color--primary, #4f46e5);
    border-radius: 4px;
}

/* Upsell callout */
.dns-lookup-upsell {
    position: relative;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, var(--wp--preset--color--primary, #4f46e5) 0%, var(--wp--preset--color--primary-hover, #4338ca) 100%);
    border-radius: 14px;
    box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.45), 0 4px 12px -4px rgba(79, 70, 229, 0.25);
    color: #fff;
    overflow: hidden;
}

.dns-lookup-upsell::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.15), transparent 50%);
    pointer-events: none;
}

.dns-lookup-upsell > * {
    position: relative;
}

.dns-lookup-upsell__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    flex-shrink: 0;
}

.dns-lookup-upsell__eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.35rem;
}

.dns-lookup-upsell__body h3 {
    margin: 0 0 0.4rem;
    font-size: 1.375rem;
    line-height: 1.25;
    color: #fff;
    font-weight: 700;
}

.dns-lookup-upsell__body h3 em {
    font-style: italic;
    color: #fef08a;
    text-decoration: underline;
    text-decoration-color: rgba(254, 240, 138, 0.5);
    text-underline-offset: 3px;
}

.dns-lookup-upsell__body p {
    margin: 0;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
    max-width: 62ch;
}

.dns-lookup-upsell__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.375rem;
    border-radius: 10px;
    background: #fff;
    color: var(--wp--preset--color--primary, #4f46e5);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.dns-lookup-upsell__cta:hover {
    color: var(--wp--preset--color--primary, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.2);
}

.dns-lookup-upsell__cta:active {
    transform: translateY(0);
}

/* Reference */
.dns-lookup-reference {
    margin-top: 2.5rem;
    padding: 1.75rem;
    background: var(--wp--preset--color--surface, #ffffff);
    border: 1px solid var(--wp--preset--color--border, #e5e7eb);
    border-radius: 12px;
}

.dns-lookup-reference h2,
.dns-lookup-reference h3 {
    margin: 0 0 0.75rem;
}

.dns-lookup-reference h3.dns-lookup-reference-subtitle {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
}

.dns-lookup-reference-intro {
    margin: 0 0 1rem;
    color: var(--wp--preset--color--text, #111827);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.dns-lookup-reference code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    padding: 0.0625rem 0.375rem;
    background: var(--wp--preset--color--primary-50, #eef2ff);
    color: var(--wp--preset--color--primary, #4f46e5);
    border-radius: 4px;
}

.dns-lookup-note {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: var(--wp--preset--color--text-muted, #6b7280);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 900px) {
    .dns-lookup-form {
        grid-template-columns: 1fr 1fr;
    }
    .dns-lookup-field--domain {
        grid-column: 1 / -1;
    }
    .dns-lookup-actions {
        grid-column: 1 / -1;
    }
    .dns-lookup-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .dns-lookup-form {
        grid-template-columns: 1fr;
    }
    .dns-lookup-field--type,
    .dns-lookup-field--resolver {
        grid-column: 1 / -1;
    }
    .dns-lookup-upsell {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }
    .dns-lookup-upsell__icon {
        margin: 0 auto;
    }
    .dns-lookup-upsell__cta {
        justify-content: center;
    }
    .dns-lookup-reference {
        padding: 1.25rem;
    }
}
