/* OpenSanctions Screening Plugin Styles */
.opensanctions-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.opensanctions-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.opensanctions-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.opensanctions-subtitle {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.opensanctions-form {
    padding: 30px;
    background: #f8f9fa;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #667eea;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-container {
    padding: 20px 30px 30px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #28a745;
    background: #d4edda;
    border-radius: 8px;
    margin-top: 20px;
}

.no-results .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.results-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e5e9;
}

.results-count {
    color: #dc3545;
    font-weight: 600;
    font-size: 18px;
}

.result-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-item.match-true {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.result-item.match-false {
    border-left-color: #ffc107;
    background: #fffdf5;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.result-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.match-true {
    background: #dc3545;
    color: white;
}

.badge.match-false {
    background: #ffc107;
    color: #333;
}

.badge.score {
    background: #6c757d;
    color: white;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    background: rgba(255,255,255,0.7);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.1);
}

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-value {
    color: #333;
    font-size: 14px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.features-list li:last-child {
    border-bottom: none;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        min-width: auto;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .search-button {
        max-width: none;
    }
}