/* SCM Search Styles */

/* ========================================
   SEARCH MODAL
======================================== */

.scm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    animation: fadeIn 0.2s;
}

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

.scm-modal-content {
    background: white;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

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

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

.scm-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.scm-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.2s;
}

.scm-modal-close:hover {
    color: #333;
}

.scm-modal-body {
    padding: 25px;
}

/* ========================================
   SEARCH INPUT
======================================== */

.scm-search-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#scm-quick-search-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s;
}

#scm-quick-search-input:focus {
    outline: none;
    border-color: #667eea;
}

#scm-quick-search-type {
    padding: 12px 15px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

/* ========================================
   SEARCH RESULTS DROPDOWN
======================================== */

.scm-search-results-dropdown {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.scm-results-group {
    margin-bottom: 20px;
}

.scm-results-group h3 {
    font-size: 14px;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f1;
}

.scm-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.scm-result-item:hover,
.scm-result-item.scm-active {
    background: #f8f9fa;
    border-color: #667eea;
}

.scm-result-item .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #667eea;
    flex-shrink: 0;
}

.scm-result-info {
    flex: 1;
}

.scm-result-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
}

.scm-result-title mark {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 2px;
}

.scm-result-meta {
    font-size: 13px;
    color: #7f8c8d;
}

.scm-loading,
.scm-no-results,
.scm-error {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-style: italic;
}

.scm-error {
    color: #e74c3c;
}

.scm-search-actions {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

/* ========================================
   SEARCH RESULTS PAGE
======================================== */

.scm-search-results-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.scm-search-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.scm-search-header h1 {
    margin: 0 0 20px 0;
    font-size: 36px;
}

.scm-search-form-main {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.scm-search-input {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
}

.scm-search-type {
    padding: 15px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background: white;
    min-width: 150px;
}

.scm-search-form-main .button {
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
}

.scm-search-meta {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.scm-search-empty,
.scm-search-no-results {
    background: white;
    padding: 60px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scm-search-no-results h2 {
    color: #2c3e50;
    margin-top: 0;
}

.scm-search-no-results ul {
    text-align: left;
    display: inline-block;
    margin-top: 20px;
}

.scm-search-results-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scm-search-section {
    margin-bottom: 40px;
}

.scm-search-section:last-child {
    margin-bottom: 0;
}

.scm-search-section h2 {
    color: #2c3e50;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    margin-top: 0;
}

.scm-results-list {
    margin-top: 20px;
}

.scm-results-list .scm-result-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.scm-results-list .scm-result-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.scm-result-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scm-result-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: white;
}

.scm-result-content {
    flex: 1;
}

.scm-result-content h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.scm-result-content h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.scm-result-content h3 a:hover {
    color: #667eea;
}

.scm-meta-item {
    display: inline-block;
    margin-right: 15px;
    font-size: 14px;
    color: #7f8c8d;
}

.scm-match-note {
    background: #fff3cd;
    padding: 2px 8px;
    border-radius: 3px;
    font-style: italic;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .scm-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .scm-modal-overlay {
        padding-top: 20px;
    }
    
    .scm-search-form-main {
        flex-direction: column;
    }
    
    .scm-search-type {
        min-width: auto;
    }
    
    .scm-results-list .scm-result-item {
        flex-direction: column;
        text-align: center;
    }
    
    .scm-result-icon {
        margin: 0 auto;
    }
}


