/* =====================================================
   EIT Querschnittsrechner – Styles
   Autor: Niklas Pauli | Version: 260414.1200
   Mobile First
   ===================================================== */

/* --- ROOT / VARIABLEN --- */
:root {
    --qs-primary:   #1a6fba;
    --qs-primary-d: #135091;
    --qs-success:   #1b8a4a;
    --qs-warning:   #c87800;
    --qs-danger:    #c0392b;
    --qs-bg:        #f4f7fb;
    --qs-card:      #ffffff;
    --qs-border:    #d0dce8;
    --qs-text:      #1a2333;
    --qs-muted:     #5a6a7e;
    --qs-radius:    12px;
    --qs-shadow:    0 2px 12px rgba(26,111,186,.10);
    --qs-shadow-md: 0 4px 24px rgba(26,111,186,.16);
    --qs-green-bg:  #eaf7ef;
    --qs-yellow-bg: #fff8e6;
    --qs-red-bg:    #fdecea;
    --qs-font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- WRAPPER --- */
.eit-qs-wrap {
    font-family: var(--qs-font);
    color: var(--qs-text);
    max-width: 820px;
    margin: 0 auto;
    padding: 12px;
    background: var(--qs-bg);
    border-radius: var(--qs-radius);
}

/* --- HEADER --- */
.eit-qs-header {
    text-align: center;
    padding: 28px 16px 20px;
}
.eit-qs-header-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 10px;
}
.eit-qs-title {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--qs-primary);
    line-height: 1.2;
}
.eit-qs-subtitle {
    font-size: 13px;
    color: var(--qs-muted);
    margin: 0;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- MODUS BANNER --- */
.eit-qs-modus-banner {
    background: linear-gradient(135deg, #1a6fba 0%, #135091 100%);
    color: #fff;
    border-radius: var(--qs-radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--qs-shadow-md);
}
.eit-qs-modus-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.eit-qs-modus-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.eit-qs-modus-banner strong { display: block; margin-bottom: 6px; font-size: 14px; }
.eit-qs-modus-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.eit-qs-modus-tag {
    background: rgba(255,255,255,.20);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* --- OPTIONAL BADGE & HINT --- */
.eit-qs-optional-badge {
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.40);
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3px;
    vertical-align: middle;
    margin-left: 6px;
    text-transform: none;
}
.eit-qs-optional-hint {
    display: inline-block;
    margin-top: 5px;
    color: var(--qs-primary);
    font-size: 12px;
    font-weight: 600;
}

/* --- BERECHNETER WERT KARTE --- */
.eit-qs-calc-result-card {
    background: linear-gradient(135deg, #1b8a4a 0%, #156b38 100%);
    color: #fff;
    border-radius: var(--qs-radius);
    padding: 20px 20px 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 20px rgba(27,138,74,.30);
    text-align: center;
    animation: popIn .3s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes popIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}
.eit-qs-calc-result-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    opacity: .85;
    margin-bottom: 6px;
}
.eit-qs-calc-result-value {
    font-size: clamp(28px, 8vw, 42px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 6px;
}
.eit-qs-calc-result-sub {
    font-size: 12px;
    opacity: .80;
    line-height: 1.5;
}

/* --- INFO BANNER --- */
.eit-qs-info-banner {
    background: #e8f0fa;
    border: 1px solid #b3cce8;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
    color: var(--qs-primary-d);
}
.eit-qs-info-icon { font-size: 18px; flex-shrink: 0; }

/* --- KARTE --- */
.eit-qs-card {
    background: var(--qs-card);
    border: 1px solid var(--qs-border);
    border-radius: var(--qs-radius);
    margin-bottom: 14px;
    box-shadow: var(--qs-shadow);
    overflow: hidden;
}
.eit-qs-card-header {
    background: var(--qs-primary);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.eit-qs-card-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
}
.eit-qs-step-badge {
    background: rgba(255,255,255,.25);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.eit-qs-card-body {
    padding: 16px;
}
.eit-qs-help {
    font-size: 13px;
    color: var(--qs-muted);
    margin: 0 0 14px;
    line-height: 1.55;
}

/* --- STROMKREISART --- */
.eit-qs-type-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 500px) {
    .eit-qs-type-grid { grid-template-columns: repeat(3, 1fr); }
}
.eit-qs-type-card {
    border: 2px solid var(--qs-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, background .18s;
    display: block;
}
.eit-qs-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.eit-qs-type-card:has(input:checked) {
    border-color: var(--qs-primary);
    background: #e8f0fa;
    box-shadow: 0 0 0 3px rgba(26,111,186,.18);
}
.eit-qs-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    gap: 4px;
}
.eit-qs-type-icon { font-size: 32px; line-height: 1; }
.eit-qs-type-content strong { font-size: 14px; color: var(--qs-text); }
.eit-qs-type-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--qs-primary);
    background: #e0ecf8;
    border-radius: 20px;
    padding: 2px 8px;
}
.eit-qs-type-desc { font-size: 11px; color: var(--qs-muted); line-height: 1.4; }

/* --- LEITERMATERIAL --- */
.eit-qs-material-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.eit-qs-material-card {
    border: 2px solid var(--qs-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, background .18s;
    display: block;
}
.eit-qs-material-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.eit-qs-material-card:has(input:checked) {
    border-color: var(--qs-primary);
    background: #e8f0fa;
    box-shadow: 0 0 0 3px rgba(26,111,186,.18);
}
.eit-qs-material-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    gap: 5px;
}
.eit-qs-material-icon { font-size: 28px; }
.eit-qs-material-content strong { font-size: 14px; }
.eit-qs-material-desc { font-size: 11px; color: var(--qs-muted); line-height: 1.4; }

/* --- LEISTUNG --- */
.eit-qs-label-note {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    color: var(--qs-muted);
    margin-left: 6px;
}
.eit-qs-leistung-hint {
    background: #eaf7ef;
    border: 1px solid #a3d9b5;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #1b5e35;
    margin-bottom: 10px;
    line-height: 1.5;
}
.eit-qs-field-divider {
    text-align: center;
    font-size: 11px;
    color: var(--qs-muted);
    margin: 4px 0 10px;
    letter-spacing: .03em;
}

/* --- FELDER --- */
.eit-qs-field-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.eit-qs-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--qs-text);
}
.eit-qs-select,
.eit-qs-input {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--qs-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--qs-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
}
.eit-qs-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%235a6a7e' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}
.eit-qs-select:focus,
.eit-qs-input:focus {
    border-color: var(--qs-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,111,186,.15);
}
.eit-qs-input-group {
    display: flex;
    align-items: stretch;
}
.eit-qs-input-group .eit-qs-input {
    border-right: none;
    border-radius: 8px 0 0 8px;
    flex: 1;
}
.eit-qs-input-suffix {
    background: #e8f0fa;
    border: 1.5px solid var(--qs-border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--qs-primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

/* --- TIPP-BOX --- */
.eit-qs-tip {
    background: #fffbea;
    border: 1px solid #f0d060;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 12px;
    color: #5a4a00;
    margin-top: 8px;
    line-height: 1.5;
}

/* --- KABEL-VISUALISIERUNG --- */
.eit-qs-querschnitt-visual {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px;
    background: #f0f4fa;
    border-radius: 10px;
}
.eit-qs-cable-circles {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid var(--qs-border);
    flex-shrink: 0;
    overflow: hidden;
}
.eit-qs-cable-circle {
    background: #b87333;
    border-radius: 50%;
    transition: width .3s, height .3s;
    max-width: 54px;
    max-height: 54px;
}
.eit-qs-qs-label-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--qs-primary);
}

/* --- VERLEGEART-INFO --- */
.eit-qs-verlegeart-info {
    background: #f0f7ff;
    border: 1.5px solid #b3cce8;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 12px;
    animation: fadeIn .25s ease;
}
.eit-qs-verlegeart-icon { font-size: 36px; flex-shrink: 0; }
.eit-qs-verlegeart-text strong { font-size: 14px; font-weight: 700; }
.eit-qs-verlegeart-text p, .eit-qs-verlegeart-text ul {
    font-size: 12px;
    color: var(--qs-muted);
    margin: 5px 0;
    line-height: 1.5;
}
.eit-qs-verlegeart-text ul { padding-left: 18px; }
.eit-qs-va-note {
    font-size: 11px;
    font-style: italic;
    color: var(--qs-muted);
}

/* --- BUTTON --- */
.eit-qs-calc-btn-wrap {
    text-align: center;
    margin: 20px 0 10px;
}
.eit-qs-calc-btn {
    background: var(--qs-primary);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(26,111,186,.30);
    transition: background .18s, transform .12s, box-shadow .18s;
    width: 100%;
    max-width: 340px;
    letter-spacing: .5px;
}
.eit-qs-calc-btn:hover {
    background: var(--qs-primary-d);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,111,186,.35);
}
.eit-qs-calc-btn:active { transform: translateY(0); }

.eit-qs-reset-btn {
    background: #fff;
    color: var(--qs-primary);
    border: 2px solid var(--qs-primary);
    border-radius: 40px;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s;
    width: 100%;
    max-width: 280px;
    margin-top: 12px;
}
.eit-qs-reset-btn:hover { background: #e8f0fa; }

/* --- ERGEBNIS --- */
.eit-qs-result {
    margin-top: 16px;
    animation: slideUp .3s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.eit-qs-result-header {
    border-radius: var(--qs-radius);
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    box-shadow: var(--qs-shadow-md);
}
.eit-qs-result-header.status-ok     { background: var(--qs-green-bg); border: 2px solid #4caf50; }
.eit-qs-result-header.status-warn   { background: var(--qs-yellow-bg); border: 2px solid #f5a623; }
.eit-qs-result-header.status-error  { background: var(--qs-red-bg); border: 2px solid var(--qs-danger); }

.eit-qs-ampel { font-size: 48px; flex-shrink: 0; }
.eit-qs-result-title-wrap h2 { margin: 0 0 4px; font-size: 18px; }
.eit-qs-result-title-wrap p  { margin: 0; font-size: 13px; color: var(--qs-muted); }

/* --- ERGEBNIS-KARTEN --- */
.eit-qs-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
@media (max-width: 480px) {
    .eit-qs-result-grid { grid-template-columns: 1fr; }
}
.eit-qs-result-card {
    background: var(--qs-card);
    border: 1px solid var(--qs-border);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    box-shadow: var(--qs-shadow);
    position: relative;
}
.eit-qs-result-card-icon { font-size: 28px; flex-shrink: 0; }
.eit-qs-result-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.eit-qs-result-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--qs-muted); }
.eit-qs-result-value { font-size: 20px; font-weight: 800; color: var(--qs-text); }
.eit-qs-result-sub   { font-size: 11px; color: var(--qs-muted); }
.eit-qs-result-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 20px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
}
.eit-qs-result-badge.ok     { background: #d4edda; color: #155724; }
.eit-qs-result-badge.warn   { background: #fff3cd; color: #856404; }
.eit-qs-result-badge.error  { background: #f8d7da; color: #721c24; }

/* --- NORM-TABELLE --- */
.eit-qs-result-detail {
    background: var(--qs-card);
    border: 1px solid var(--qs-border);
    border-radius: var(--qs-radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--qs-shadow);
}
.eit-qs-result-detail h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--qs-primary); }

.eit-qs-norm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.eit-qs-norm-table th {
    background: #f0f4fa;
    border: 1px solid var(--qs-border);
    padding: 8px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
}
.eit-qs-norm-table td {
    border: 1px solid var(--qs-border);
    padding: 9px 10px;
    vertical-align: middle;
}
.eit-qs-norm-table tr:nth-child(even) td { background: #f8fbff; }
.status-cell-ok    { color: var(--qs-success); font-weight: 700; }
.status-cell-warn  { color: var(--qs-warning); font-weight: 700; }
.status-cell-error { color: var(--qs-danger);  font-weight: 700; }

/* Scrollbare Tabelle auf Mobil */
@media (max-width: 500px) {
    .eit-qs-result-detail { overflow-x: auto; padding: 12px 8px; }
    .eit-qs-norm-table { min-width: 360px; }
}

/* --- EMPFEHLUNG --- */
.eit-qs-empfehlung {
    background: #fffbea;
    border: 1.5px solid #f5c842;
    border-radius: var(--qs-radius);
    padding: 16px;
    margin-bottom: 14px;
}
.eit-qs-empfehlung h3 { margin: 0 0 10px; font-size: 14px; color: #7a5800; font-weight: 700; }
.eit-qs-empfehlung p  { font-size: 13px; margin: 0 0 10px; line-height: 1.55; }
.eit-qs-empfehlung-table-wrap { overflow-x: auto; }
.eit-qs-emp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 320px;
}
.eit-qs-emp-table th {
    background: #ffedb3;
    border: 1px solid #f0c040;
    padding: 7px 9px;
    text-align: left;
    font-weight: 700;
}
.eit-qs-emp-table td {
    border: 1px solid #f0d070;
    padding: 8px 9px;
}
.eit-qs-emp-table .emp-highlight { background: #d4edda; font-weight: 700; }

/* --- DISCLAIMER --- */
.eit-qs-disclaimer {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 11px;
    color: var(--qs-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}
.eit-qs-disclaimer strong { color: var(--qs-text); }

/* --- RESPONSIVE TWEAKS --- */
@media (max-width: 380px) {
    .eit-qs-wrap { padding: 8px; }
    .eit-qs-card-body { padding: 12px; }
    .eit-qs-title { font-size: 20px; }
    .eit-qs-calc-btn { font-size: 15px; padding: 14px 24px; }
}
