/**
 * HENX3D - Calculator Features CSS
 * Styles für Material-Vergleich und Multi-Calculator Vergleich
 */

/* ========================================
   Material-Vergleich
   ======================================== */

/* Vergleichs-Checkbox in Material-Karten */
.material-compare-checkbox {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 229, 255, 0.2);
}

.material-compare-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.material-compare-checkbox label:hover {
    color: #00e5ff;
}

.material-compare-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00e5ff;
}

/* Vergleichs-Bar (schwebt am unteren Rand) */
.material-comparison-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(10, 15, 26, 0.98), rgba(15, 23, 42, 0.98));
    border-top: 2px solid #00e5ff;
    padding: 16px 24px;
    z-index: 100;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.material-comparison-bar.hidden {
    transform: translateY(100%);
}

.comparison-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}

.comparison-bar-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comparison-count {
    font-size: 18px;
    font-weight: 700;
    color: #00e5ff;
}

.comparison-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Vergleichs-Modal */
.material-comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.material-comparison-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #0a0f1a, #0f172a);
    border: 2px solid #00e5ff;
    border-radius: 16px;
    max-width: 1000px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #00e5ff;
}

.modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-body {
    padding: 24px 32px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

/* Vergleichstabelle */
.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-row {
    display: grid;
    grid-template-columns: 200px repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: rgba(0, 229, 255, 0.1);
}

.comparison-row.comparison-header {
    background: rgba(0, 229, 255, 0.2);
}

.comparison-row.comparison-header .comparison-cell {
    font-weight: 700;
    font-size: 16px;
    color: #00e5ff;
    background: rgba(10, 15, 26, 0.95);
}

.comparison-row.highlighted {
    background: rgba(0, 229, 255, 0.15);
}

.comparison-cell {
    padding: 16px;
    background: rgba(10, 15, 26, 0.8);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
}

.comparison-cell.label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.comparison-cell.price {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #00e5ff;
    font-size: 16px;
}

.comparison-cell.best {
    color: #4ade80;
    font-weight: 700;
}

.comparison-cell.properties {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Multi-Calculator Vergleich
   ======================================== */

.multi-calc-suggestion {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    position: relative;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.multi-calc-suggestion.hidden {
    display: none;
}

.multi-calc-suggestion.visible {
    opacity: 1;
    transform: translateY(0);
}

.multi-calc-suggestion .suggestion-icon {
    position: absolute;
    top: -20px;
    left: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.multi-calc-suggestion .suggestion-content {
    margin-left: 12px;
}

.multi-calc-suggestion .suggestion-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #a78bfa;
}

.multi-calc-suggestion .suggestion-message {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.multi-calc-suggestion .suggestion-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.multi-calc-suggestion .suggestion-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.suggestion-alternatives {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.suggestion-alternative {
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all 0.2s ease;
}

.suggestion-alternative:hover {
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.suggestion-alternative .alternative-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.suggestion-alternative .alternative-content {
    flex: 1;
}

.suggestion-alternative h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #a78bfa;
}

.suggestion-alternative .alternative-reason {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.suggestion-alternative .alternative-savings {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: #4ade80;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .comparison-bar-content {
        flex-direction: column;
        gap: 12px;
    }

    .comparison-row {
        grid-template-columns: 1fr;
    }

    .comparison-cell.label {
        background: rgba(0, 229, 255, 0.15);
        font-weight: 700;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header,
    .modal-body {
        padding: 16px 20px;
    }

    .suggestion-alternatives {
        grid-template-columns: 1fr;
    }

    .multi-calc-suggestion {
        padding: 20px;
    }
}

/* ========================================
   Dark Theme Compatibility
   ======================================== */

body.dark-theme .material-comparison-bar {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(20, 30, 50, 0.98));
}

body.dark-theme .modal-content {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

body.dark-theme .comparison-cell {
    background: rgba(15, 23, 42, 0.9);
}

body.dark-theme .suggestion-alternative {
    background: rgba(15, 23, 42, 0.8);
}
