/**
 * HENX3D - Manufacturability Warnings CSS
 * Styles für Fertigbarkeitsprüfungs-Warnungen und -Fehler
 */

/* ===== Container ===== */
.manufacturability-container {
    margin: 24px 0;
    animation: slideInUp 0.3s ease;
}

/* ===== Fehler-Box (Blocking) ===== */
.manufacturability-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.manufacturability-error h4 {
    color: #ef4444;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manufacturability-error h4::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border-radius: 50%;
    position: relative;
}

.manufacturability-error h4::after {
    content: '!';
    position: absolute;
    margin-left: -20px;
    color: white;
    font-weight: 900;
    font-size: 16px;
}

.manufacturability-error ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.manufacturability-error li {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
    color: var(--text, #f0f0f0);
    font-size: 14px;
}

.manufacturability-error li:last-child {
    margin-bottom: 0;
}

/* ===== Warnungs-Box ===== */
.manufacturability-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.manufacturability-warning h4 {
    color: #fbbf24;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manufacturability-warning ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.manufacturability-warning li {
    padding: 8px 12px;
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid #fbbf24;
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
    color: var(--text, #f0f0f0);
    font-size: 14px;
}

.manufacturability-warning li:last-child {
    margin-bottom: 0;
}

/* ===== Info-Box ===== */
.manufacturability-info {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.15), rgba(103, 232, 249, 0.05));
    border: 2px solid rgba(103, 232, 249, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.manufacturability-info h4 {
    color: #67e8f9;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.manufacturability-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.manufacturability-info li {
    padding: 8px 12px;
    background: rgba(103, 232, 249, 0.1);
    border-left: 3px solid #67e8f9;
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
    color: var(--text, #f0f0f0);
    font-size: 14px;
}

/* ===== Vorschläge-Box ===== */
.manufacturability-suggestions {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.manufacturability-suggestions h5 {
    color: var(--text, #f0f0f0);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manufacturability-suggestions h5::before {
    content: '💡';
}

.manufacturability-suggestions ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.manufacturability-suggestions li {
    color: var(--muted, rgba(255,255,255,0.6));
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* ===== OK-Status ===== */
.manufacturability-ok {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border: 2px solid rgba(34, 197, 94, 0.5);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.manufacturability-ok::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #22c55e;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.manufacturability-ok span {
    color: #22c55e;
    font-weight: 600;
    font-size: 15px;
}

/* ===== Deaktivierter Button ===== */
.btn-disabled,
button:disabled,
.calc-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(50%);
}

.btn-disabled:hover,
button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ===== Overlay für blockierte Bestellung ===== */
.order-blocked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.order-blocked-overlay .blocked-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.order-blocked-overlay .blocked-text {
    color: #ef4444;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    max-width: 80%;
}

/* ===== Inline-Validierung bei Eingabefeldern ===== */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.input-warning {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2) !important;
}

.input-valid {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2) !important;
}

.input-feedback {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-feedback.error {
    color: #ef4444;
}

.input-feedback.warning {
    color: #fbbf24;
}

.input-feedback.valid {
    color: #22c55e;
}

/* ===== Limit-Hinweise unter Feldern ===== */
.field-limits {
    font-size: 11px;
    color: var(--muted, rgba(255,255,255,0.5));
    margin-top: 4px;
}

.field-limits span {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-right: 8px;
}

/* ===== Pulse-Animation für Fehler ===== */
@keyframes errorPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Animation wird über die Haupt-Definition in Zeile 13 angewendet */

/* ===== Slide-In Animation ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .manufacturability-error,
    .manufacturability-warning,
    .manufacturability-info,
    .manufacturability-ok {
        padding: 16px;
    }

    .manufacturability-error h4,
    .manufacturability-warning h4,
    .manufacturability-info h4 {
        font-size: 16px;
    }

    .manufacturability-error li,
    .manufacturability-warning li,
    .manufacturability-info li {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* ===== Dark/Light Theme Support ===== */
[data-theme="light"] .manufacturability-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.02));
}

[data-theme="light"] .manufacturability-error li {
    color: #1a1a1a;
}

[data-theme="light"] .manufacturability-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.02));
}

[data-theme="light"] .manufacturability-warning li {
    color: #1a1a1a;
}

[data-theme="light"] .manufacturability-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.02));
}

[data-theme="light"] .manufacturability-info li {
    color: #1a1a1a;
}

[data-theme="light"] .manufacturability-suggestions li {
    color: #666;
}

[data-theme="light"] .order-blocked-overlay {
    background: rgba(255, 255, 255, 0.95);
}
