/* ASN Lookup Page Styles */

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

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

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

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

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

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

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

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

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

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

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

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

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

.asn-hero-trust-item svg {
    color: var(--success-500, #22c55e);
    flex-shrink: 0;
}

/* Hero Form Card */
.asn-hero-form-wrapper {
    position: sticky;
    top: 24px;
}

.asn-hero-form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e5e7eb);
}

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

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

.asn-lookup-form {
    margin-bottom: 12px;
}

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

.asn-form-input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.asn-form-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(55, 125, 255, 0.15);
    background: #ffffff;
}

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

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

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

/* Quick example buttons */
.asn-form-examples {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.asn-form-examples-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.asn-example-btn {
    padding: 4px 10px;
    background: var(--primary-50);
    color: var(--primary-600, #2563eb);
    border: 1px solid var(--primary-200, #bfdbfe);
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: background 0.15s;
}

.asn-example-btn:hover {
    background: var(--primary-100, #dbeafe);
}

/* Alert states */
.asn-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
}

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

.asn-alert.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Results */
.asn-results {
    margin-top: 16px;
}

.asn-result-card {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.asn-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--primary-50);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    flex-wrap: wrap;
    gap: 8px;
}

.asn-result-ip {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.asn-type-label {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.asn-badge-datacenter {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.asn-badge-residential {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.asn-result-main {
    padding: 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.asn-result-asn {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.asn-result-asn-label {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-500);
}

.asn-result-org {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.asn-result-fields {
    padding: 0 16px;
}

.asn-result-field-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.asn-result-field-row:last-child {
    border-bottom: none;
}

.asn-result-field-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 140px;
    flex-shrink: 0;
}

.asn-result-field-value {
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    word-break: break-all;
}

.asn-result-api {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
}

.asn-result-api-label {
    color: var(--text-muted);
    font-weight: 500;
}

.asn-result-api-url {
    font-family: 'Courier New', monospace;
    color: var(--primary-600, #2563eb);
    font-size: 12px;
}

/* ─── What Is ASN ─────────────────────────────── */

.asn-what-section {
    padding: 80px 0;
    background: #ffffff;
}

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

.asn-what-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.asn-what-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 24px;
    line-height: 1.2;
}

.asn-what-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.asn-what-text strong {
    color: var(--text-color);
    font-weight: 600;
}

.asn-what-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.asn-info-card {
    padding: 20px;
    background: var(--primary-50);
    border-radius: 10px;
    border: 1px solid var(--primary-100, #dbeafe);
}

.asn-info-card-icon {
    color: var(--primary-500);
    margin-bottom: 12px;
}

.asn-info-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
}

.asn-info-card-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ─── Major ASNs ─────────────────────────────── */

.asn-major-section {
    padding: 80px 0;
    background: #f8fafc;
}

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

.asn-major-header {
    text-align: center;
    margin-bottom: 40px;
}

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

.asn-major-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.asn-major-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: #ffffff;
}

.asn-major-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.asn-major-table thead {
    background: var(--primary-50);
}

.asn-major-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color, #e5e7eb);
    white-space: nowrap;
}

.asn-major-table td {
    padding: 12px 16px;
    color: var(--text-muted);
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.asn-major-table tr:last-child td {
    border-bottom: none;
}

.asn-major-table tr:hover td {
    background: #fafafa;
}

.asn-badge {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    background: var(--primary-50);
    color: var(--primary-600, #2563eb);
    border: 1px solid var(--primary-200, #bfdbfe);
    border-radius: 4px;
    white-space: nowrap;
}

.asn-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.asn-type-cloud {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.asn-type-hosting {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.asn-type-isp {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.asn-type-transit {
    background: #faf5ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

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

.asn-api-section {
    padding: 80px 0;
    background: #ffffff;
}

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

.asn-api-header {
    text-align: center;
    margin-bottom: 40px;
}

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

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

.asn-api-endpoint-card {
    background: var(--primary-50);
    border: 1px solid var(--primary-200, #bfdbfe);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.asn-api-method-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.asn-api-method {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary-500);
    padding: 3px 8px;
    border-radius: 4px;
}

.asn-api-url {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: var(--text-color);
    word-break: break-all;
}

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

.asn-api-endpoint-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Code tabs */
.asn-code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

.asn-code-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.asn-code-tab.active,
.asn-code-tab:hover {
    color: var(--primary-500);
    border-bottom-color: var(--primary-500);
}

.asn-code-panel {
    display: none;
    border-radius: 0 8px 8px 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

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

.asn-code-panel pre {
    margin: 0;
    border-radius: 0 8px 8px 8px;
}

/* Response card */
.asn-api-response-card {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 32px;
}

.asn-api-response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.asn-api-response-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.asn-api-status-badge {
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 2px 8px;
    border-radius: 20px;
}

.asn-api-response-card pre {
    margin: 0;
    border-radius: 0;
}

/* Field and error tables */
.asn-api-fields,
.asn-api-errors {
    margin-bottom: 32px;
}

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

.asn-api-field-table {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
}

.asn-api-field-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 11px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.asn-api-field-row:last-child {
    border-bottom: none;
}

.asn-api-field-name {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--primary-600, #2563eb);
    min-width: 130px;
    flex-shrink: 0;
}

.asn-api-field-type {
    font-size: 12px;
    color: #6b21a8;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.asn-api-field-desc {
    color: var(--text-muted);
    line-height: 1.5;
}

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

.asn-faq-section {
    padding: 80px 0;
    background: #f8fafc;
}

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

.asn-faq-header {
    text-align: center;
    margin-bottom: 40px;
}

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

.asn-faq-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

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

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

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

.asn-faq-question:hover {
    color: var(--primary-500);
}

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

.asn-faq-item.open .asn-faq-icon {
    transform: rotate(180deg);
    color: var(--primary-500);
}

.asn-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.asn-faq-item.open .asn-faq-answer {
    max-height: 400px;
    padding: 0 20px 18px;
}

.asn-faq-answer p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0;
}

.asn-faq-answer code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--primary-600, #2563eb);
}

.asn-faq-answer a {
    color: var(--primary-500);
    text-decoration: underline;
}

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

@media (max-width: 900px) {
    .asn-hero-grid,
    .asn-what-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .asn-hero-form-wrapper {
        position: static;
    }

    .asn-hero-title {
        font-size: 30px;
    }

    .asn-hero-subtitle {
        font-size: 20px;
    }

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

@media (max-width: 600px) {
    .asn-hero-section,
    .asn-what-section,
    .asn-major-section,
    .asn-api-section,
    .asn-faq-section {
        padding: 48px 0;
    }

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

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

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

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

    .asn-major-title,
    .asn-api-title,
    .asn-faq-title,
    .asn-what-title {
        font-size: 24px;
    }

    .asn-api-field-row {
        flex-direction: column;
        gap: 4px;
    }

    .asn-api-field-name {
        min-width: auto;
    }
}

/* Responsive container widths */
@media (min-width: 600px) {
    .asn-hero-container,
    .asn-what-container,
    .asn-major-container,
    .asn-api-container,
    .asn-faq-container {
        max-width: 720px;
    }
}

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