/* Bulk IP Lookup Page Styles */

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

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

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

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

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

.bi-hero-content {
    padding-right: 24px;
}

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

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

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

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

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

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

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

.bi-hero-trust-item svg {
    color: #4CAF50;
    flex-shrink: 0;
}

/* Hero Form Card */

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

.bi-hero-form-card {
    background: white;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (min-width: 600px) {
    .bi-hero-form-card {
        padding: 40px;
    }
}

.bi-hero-form-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.bi-hero-form-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.bi-lookup-form {
    margin-bottom: 0;
}

.bi-form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    color: var(--text-color);
    margin-bottom: 10px;
}

.bi-form-textarea:hover {
    border-color: rgba(0, 0, 0, 0.87);
}

.bi-form-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    border-width: 2px;
    padding: 11px 13px;
}

.bi-form-api-row {
    margin-bottom: 12px;
}

.bi-form-api-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-color);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.bi-form-api-input:hover {
    border-color: rgba(0, 0, 0, 0.87);
}

.bi-form-api-input:focus {
    outline: none;
    border-color: var(--primary-500);
    border-width: 2px;
    padding: 0 13px;
}

.bi-form-submit {
    width: 100%;
    height: 48px;
    padding: 6px 20px;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12);
}

.bi-form-submit:hover {
    background: var(--primary-700);
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12);
}

.bi-form-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Alerts */

.bi-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin-top: 12px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.bi-alert-info {
    background-color: rgb(229, 246, 253);
    color: rgb(1, 67, 97);
}

.bi-alert-error {
    background-color: rgb(253, 237, 237);
    color: rgb(95, 33, 32);
}

.bi-alert-error svg { color: rgb(239, 83, 80); }

/* Loading spinner */
.bi-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(1, 67, 97, 0.3);
    border-top-color: rgb(1, 67, 97);
    border-radius: 50%;
    animation: bi-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes bi-spin {
    to { transform: rotate(360deg); }
}

/* Stats Bar */
.bi-stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 0;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.bi-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.bi-stat-item.threat { color: #D32F2F; }
.bi-stat-item.suspicious { color: #E65100; }
.bi-stat-item.clean { color: #2E7D32; }

/* Results Table */
.bi-results-table-wrapper {
    overflow-x: auto;
    margin-top: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.bi-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.bi-results-table thead tr {
    background: var(--primary-50);
}

.bi-results-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.bi-results-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.bi-results-table tbody tr:last-child td {
    border-bottom: none;
}

.bi-results-table tbody tr:hover {
    background: var(--gray-50);
    cursor: pointer;
}

.bi-results-table tbody tr.bi-row-expanded {
    background: var(--primary-50);
}

/* IP column */
.bi-ip-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-600);
}

/* Country cell with flag emoji */
.bi-country-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Risk pills */
.bi-risk-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.bi-risk-safe {
    background: #E8F5E9;
    color: #2E7D32;
}

.bi-risk-suspicious {
    background: #FFF3E0;
    color: #E65100;
}

.bi-risk-threat {
    background: #FFEBEE;
    color: #C62828;
}

/* Expanded JSON row */
.bi-json-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.bi-json-content {
    background: #1e1e1e;
    padding: 14px 20px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #d4d4d4;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    border-radius: 0;
    max-height: 300px;
    overflow-y: auto;
}

/* Results actions bar */
.bi-results-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
}

.bi-csv-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bi-csv-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bi-results-api-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bi-results-api-hint code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--primary-500);
}

/* ─── Features ───────────────────────────────────────── */

.bi-features-section {
    padding: 80px 0;
    background: white;
}

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

.bi-features-header {
    text-align: center;
    margin-bottom: 56px;
}

.bi-features-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-color);
    line-height: 1.2;
}

.bi-features-highlight {
    color: var(--primary-500);
}

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

.bi-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.bi-feature-card {
    background: white;
    border-radius: 8px;
    padding: 28px 24px;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bi-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12);
}

.bi-feature-icon {
    color: var(--primary-500);
    margin-bottom: 16px;
}

.bi-feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.bi-feature-desc {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

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

.bi-api-section {
    padding: 80px 0;
    background: var(--primary-50);
}

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

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

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

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

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

.bi-api-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bi-api-endpoint-info {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

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

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

.bi-api-path {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-color);
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 4px;
    word-break: break-all;
}

.bi-api-optional {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-muted);
}

.bi-api-param {
    color: var(--primary-500);
    font-style: italic;
}

.bi-api-endpoint-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.bi-api-response {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.bi-api-response-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.bi-api-code-block {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.bi-api-code-block pre {
    margin: 0;
    font-size: 13px;
}

.bi-api-fields {
    padding: 20px;
    background: var(--primary-50);
    border-radius: 8px;
}

.bi-api-fields h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.bi-api-field {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.875rem;
    align-items: baseline;
}

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

.bi-api-field code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--primary-500);
    background: rgba(55,125,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

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

/* Code Examples */
.bi-code-examples-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.bi-code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-color);
}

.bi-code-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.bi-code-tab:hover {
    color: var(--primary-500);
}

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

.bi-code-panel {
    display: none;
    padding-top: 16px;
}

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

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

.bi-faq-section {
    padding: 80px 0;
    background: white;
}

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

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

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

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

.bi-faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.bi-faq-item {
    border-bottom: 1px solid var(--border-color);
}

.bi-faq-item:first-child {
    border-top: 1px solid var(--border-color);
}

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

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

.bi-faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

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

.bi-faq-answer {
    display: none;
    padding-bottom: 20px;
}

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

.bi-faq-answer p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0;
}

.bi-faq-answer code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--primary-500);
    word-break: break-all;
}

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

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

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

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

    .bi-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bi-hero-title {
        font-size: 26px;
    }

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

    .bi-features-grid {
        grid-template-columns: 1fr;
    }

    .bi-api-content {
        padding: 24px 20px;
    }

    .bi-code-tabs {
        overflow-x: auto;
    }

    .bi-code-tab {
        white-space: nowrap;
    }

    .bi-results-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .bi-stats-bar {
        gap: 12px;
    }
}

/* Container widths */
@media (min-width: 600px) {
    .bi-hero-container,
    .bi-features-container,
    .bi-api-container,
    .bi-faq-container {
        max-width: 720px;
    }
}

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