/* CSV Search Popup Styles */

.csp-search-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
}

.csp-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.csp-search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.csp-search-input:focus {
    outline: none;
    border-color: #0073aa;
}

.csp-search-button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.csp-search-button:hover {
    background-color: #005a87;
}

.csp-search-button:active {
    transform: scale(0.98);
}

/* Popup Overlay */
.csp-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.csp-popup-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.csp-popup-container {
    background: #fff;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    display: flex;
    flex-direction: column;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.csp-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.csp-popup-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.csp-popup-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.csp-popup-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.csp-popup-content {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Result Styles */
.csp-result-item {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.csp-result-item:last-child {
    margin-bottom: 0;
}

.csp-result-row {
    display: flex;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.csp-result-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.csp-result-label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
    flex-shrink: 0;
}

.csp-result-value {
    color: #333;
    flex: 1;
}

.csp-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

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

.csp-no-results-text {
    font-size: 18px;
    margin: 0;
}

/* Loading Spinner */
.csp-loading {
    text-align: center;
    padding: 40px 20px;
}

.csp-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.csp-loading-text {
    color: #666;
    font-size: 16px;
}

/* Error Message */
.csp-error {
    text-align: center;
    padding: 40px 20px;
    color: #d63638;
}

.csp-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.csp-error-text {
    font-size: 18px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .csp-popup-container {
        width: 95%;
        max-height: 95%;
    }
    
    .csp-result-row {
        flex-direction: column;
    }
    
    .csp-result-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .csp-search-form {
        flex-direction: column;
    }
    
    .csp-search-input,
    .csp-search-button {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .csp-popup-overlay {
        position: relative;
        background: none;
    }
    
    .csp-popup-close {
        display: none;
    }
}
