/* CSS styles for IP GeoLocation Tool */

/* Search Form */
.search-box {
    margin: 30px 0;
}

.search-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.search-button {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.search-button:hover {
    background-color: var(--primary-hover);
}

.search-button:active {
    transform: translateY(1px);
}

.clear-button {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: #e2e8f0;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.clear-button:hover {
    background-color: #cbd5e1;
}

.clear-button:active {
    transform: translateY(1px);
}

/* Error/Notice Styles */
.alert-box {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 15px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
}

.notice {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.notice strong {
    color: var(--text-main);
    user-select: all;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Results Data Table */
.result-header {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.result-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.result-card {
    text-align: left;
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.result-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    flex: 0 0 160px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.result-value {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 500;
    word-break: break-all;
}

/* Badges for Threat Intel */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 6px;
    background: #e2e8f0;
    color: #475569;
}

.badge-safe {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef08a;
    color: #854d0e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Features Section (when empty state) */
.features {
    margin-top: 50px;
    text-align: left;
    background: #f8fafc;
    padding: 30px;
    border-radius: var(--radius-md);
}

.features h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.feature-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .search-form {
        flex-direction: column;
    }

    .search-button,
    .clear-button {
        width: 100%;
    }

    .result-row {
        flex-direction: column;
    }

    .result-label {
        margin-bottom: 4px;
    }
}