/* Fehlercode-Datenbank Frontend CSS v2.1 */

/* Container */
.ecdb-search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Suchformular */
.ecdb-search-form {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

.ecdb-search-title {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ecdb-search-title .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

/* Such-Wrapper */
.ecdb-search-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Input Wrapper - FIX für Lupe */
.ecdb-search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

/* Such-Icon/Lupe - FIXED */
.ecdb-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
    z-index: 2;
    pointer-events: none;
}

/* Such-Input */
.ecdb-search-input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    outline: none;
}

.ecdb-search-input:focus {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #fff;
}

/* Such-Button */
.ecdb-search-button {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    background: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecdb-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ecdb-search-button.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Kategorie Filter */
.ecdb-category-filter {
    margin-top: 15px;
}

.ecdb-category-select {
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    min-width: 200px;
}

/* Hinweis */
.ecdb-search-hint {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-top: 15px;
    text-align: center;
}

/* Ergebnis-Anzahl */
.ecdb-results-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f0f4ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

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

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

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

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

/* Keine Ergebnisse */
.ecdb-no-results {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.ecdb-no-results-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

.ecdb-no-results-text {
    color: #666;
    font-size: 18px;
    margin-bottom: 15px;
}

.ecdb-report-button {
    padding: 12px 24px;
    font-size: 14px;
    color: #fff;
    background: #667eea;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.ecdb-report-button:hover {
    background: #5a6fd6;
}

/* Ergebnis-Karte */
.ecdb-result-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.ecdb-result-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Ergebnis Header */
.ecdb-result-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-bottom: 1px solid #eef2ff;
}

.ecdb-result-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ecdb-result-code {
    font-family: Consolas, Monaco, monospace;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    background: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.ecdb-result-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Schweregrad Badges */
.ecdb-severity {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecdb-severity-low {
    background: #d4edda;
    color: #155724;
}

.ecdb-severity-medium {
    background: #fff3cd;
    color: #856404;
}

.ecdb-severity-high {
    background: #f8d7da;
    color: #721c24;
}

.ecdb-severity-critical {
    background: #721c24;
    color: #fff;
}

/* Kategorie Badge */
.ecdb-category-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    background: #e3f2fd;
    color: #1565c0;
}

/* Ergebnis Body */
.ecdb-result-body {
    padding: 25px;
}

.ecdb-description {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* Schnelllösung */
.ecdb-quick-fix {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 4px solid #4caf50;
    padding: 15px 20px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 20px;
}

.ecdb-quick-fix-label {
    font-weight: 700;
    color: #2e7d32;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecdb-quick-fix-label .dashicons {
    color: #ffc107;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.ecdb-quick-fix-text {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}

/* Lösung Toggle */
.ecdb-solution {
    margin-top: 20px;
}

.ecdb-solution-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecdb-solution-toggle:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.ecdb-solution-toggle .dashicons {
    transition: transform 0.3s;
}

.ecdb-solution-toggle.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    border-radius: 10px 10px 0 0;
}

.ecdb-solution-toggle.active .dashicons:last-child {
    transform: rotate(180deg);
}

/* Lösung Content */
.ecdb-solution-content {
    display: none;
    padding: 25px;
    background: #fafafa;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.ecdb-solution-content.active {
    display: block;
}

.ecdb-solution-content h3 {
    font-size: 18px;
    color: #333;
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.ecdb-solution-content h3:first-child {
    margin-top: 0;
}

.ecdb-solution-content ol,
.ecdb-solution-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.ecdb-solution-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.ecdb-solution-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 15px 0;
}

.ecdb-solution-content code {
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    color: #e53e3e;
}

.ecdb-solution-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Footer mit Bewertung - ÜBERARBEITET */
.ecdb-result-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.ecdb-helpful {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ecdb-helpful-text {
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.ecdb-helpful-buttons {
    display: flex;
    gap: 10px;
}

/* Bewertungs-Buttons - NEU GESTALTET */
.ecdb-helpful-btn {
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.ecdb-helpful-btn.yes {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.ecdb-helpful-btn.yes:hover {
    background: #28a745;
    color: #fff;
}

.ecdb-helpful-btn.no {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.ecdb-helpful-btn.no:hover {
    background: #dc3545;
    color: #fff;
}

.ecdb-helpful-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ecdb-helpful-btn.clicked {
    pointer-events: none;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 600px) {
    .ecdb-search-form {
        padding: 20px;
    }
    
    .ecdb-search-wrapper {
        flex-direction: column;
    }
    
    .ecdb-search-button {
        width: 100%;
    }
    
    .ecdb-result-header {
        padding: 15px;
    }
    
    .ecdb-result-body {
        padding: 15px;
    }
    
    .ecdb-result-footer {
        padding: 15px;
    }
    
    .ecdb-helpful {
        flex-direction: column;
        align-items: flex-start;
    }
}
