/**
 * IP Address Lookup Page Styles
 * Only loads on /ip-address-lookup page
 */

.abuseipdb-form {
    max-width: 100%;
    margin: 0 auto;
}

.abuseipdb-form .input-group {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    height: 60px;
    justify-content: center;
}

.abuseipdb-form .invalid-feedback {
    text-align: center;
    margin: 1rem 0
}

.abuseipdb-form .form-control {
    border-radius: 10px;
    font-size: 1.25rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    text-align: center;
    min-width: 300px;
}

.abuseipdb-form .form-control:focus {
    border-color: var(--wp--preset--color--accent);
    box-shadow: 0 0 0 3px rgba(var(--wp--preset--color--accent-rgb), 0.1);
}

.abuseipdb-form .btn {
    background-color: #000;
    color: #fff;
    font-family: inherit;
    font-size: 1.25rem;
    line-height: inherit;
    padding-top: 1rem;
    padding-right: 2.25rem;
    padding-bottom: 1rem;
    padding-left: 2.25rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    border-radius: 30px;
    cursor: pointer;
    border-style: solid;
    border-width: 1px;
    margin: 0;
}

.abuseipdb-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: #000;
    border-color: #000;
}

.abuseipdb-result {
    margin-top: 2rem;
}

/* Main result container */
.ip-results-container {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* IP Header Card */
.ip-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    text-align: center;
}

.ip-header-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.ip-header-card .ip-address {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

/* Section Cards */
.ip-section-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ip-section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.ip-section-header {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ip-section-header .icon {
    font-size: 1.5rem;
}

/* Threat Intelligence Section - Red theme */
.threat-section .ip-section-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f5576c;
}

/* Location Section - Blue theme */
.location-section .ip-section-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: #00f2fe;
}

/* Network Section - Purple theme */
.network-section .ip-section-header {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    border-color: #fed6e3;
}

/* Connection Type Section - Orange theme */
.connection-section .ip-section-header {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
    border-color: #fcb69f;
}

.ip-section-body {
    padding: 0;
}

/* Data rows */
.ip-data-row {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.ip-data-row:last-child {
    border-bottom: none;
}

.ip-data-row:hover {
    background-color: #f8f9fa;
}

.ip-data-label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
}

.ip-data-value {
    flex: 1;
    text-align: right;
    color: #333;
}

.ip-data-value code {
    background: #f4f4f4;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #e83e8c;
}

/* Badges */
.ip-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.ip-badge.success {
    background: #d4edda;
    color: #155724;
}

.ip-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.ip-badge.danger {
    background: #f8d7da;
    color: #721c24;
}

.ip-badge.info {
    background: #d1ecf1;
    color: #0c5460;
}

.ip-badge.secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* DNSBL Details */
.dnsbl-details {
    margin: 0;
}

.dnsbl-item {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dnsbl-item.clean {
    color: #6c757d;
}

.dnsbl-item.listed {
    color: #dc3545;
    font-weight: 600;
}

/* Threat Score Display */
.threat-score-display {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    margin: 1rem 1.5rem;
}

.threat-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.threat-score-circle.low {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.threat-score-circle.medium {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.threat-score-circle.high {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

/* Map Button */
.map-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #4285f4;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.map-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
    color: white;
    text-decoration: none;
}

/* Connection Type Flags */
.connection-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.connection-flags .ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Alerts */
.abuseipdb-result .alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

/* Loading state */
.alert-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .ip-data-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ip-data-label {
        min-width: auto;
    }
    
    .ip-data-value {
        text-align: left;
        width: 100%;
    }
    
    .ip-header-card .ip-address {
        font-size: 1.5rem;
    }
}
