/* Teppich Akustikrechner – Frontend Styles */
.tar-rechner {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
    color: #333;
}

/* Steps */
.tar-step-title {
    font-size: 1.4rem;
    color: #2c5f2e;
    margin-bottom: 8px;
}
.tar-step-desc {
    color: #666;
    margin-bottom: 24px;
}

/* Form rows */
.tar-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.tar-field {
    display: flex;
    flex-direction: column;
}
.tar-field label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}
.tar-field input,
.tar-field textarea {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.tar-field input:focus,
.tar-field textarea:focus {
    outline: none;
    border-color: #2c5f2e;
    box-shadow: 0 0 0 3px rgba(44,95,46,0.1);
}

/* Toggle buttons */
.tar-toggle-group {
    display: flex;
    gap: 8px;
}
.tar-toggle-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.tar-toggle-btn input { display: none; }
.tar-toggle-btn.active,
.tar-toggle-btn:has(input:checked) {
    border-color: #2c5f2e;
    background: #2c5f2e;
    color: #fff;
}

/* Ziel-Karten */
.tar-ziel-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.tar-ziel-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.tar-ziel-card input { display: none; }
.tar-ziel-card.active,
.tar-ziel-card:has(input:checked) {
    border-color: #2c5f2e;
    background: #f0f7f0;
}
.tar-ziel-title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2c5f2e;
}
.tar-ziel-desc {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

/* Buttons */
.tar-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    margin-top: 16px;
    margin-right: 8px;
}
.tar-btn-primary {
    background: #2c5f2e;
    color: #fff;
    border-color: #2c5f2e;
}
.tar-btn-primary:hover {
    background: #1e4220;
    border-color: #1e4220;
}
.tar-btn-secondary {
    background: transparent;
    color: #2c5f2e;
    border-color: #2c5f2e;
}
.tar-btn-secondary:hover {
    background: #f0f7f0;
}
.tar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Ergebnis */
.tar-ergebnis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.tar-ergebnis-card {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 2px solid #eee;
}
.tar-ergebnis-card.highlight {
    border-color: #2c5f2e;
    background: #f0f7f0;
}
.tar-ergebnis-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.tar-ergebnis-label { font-size: 0.8rem; color: #666; margin-bottom: 6px; }
.tar-ergebnis-value { font-size: 1.5rem; font-weight: 700; color: #2c5f2e; }

/* Preisbox */
.tar-preis-box {
    background: #fffbea;
    border: 2px solid #f5c842;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 20px 0;
    text-align: center;
}
.tar-preis-label { font-size: 0.85rem; color: #7a6700; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.tar-preis-value { font-size: 2.5rem; font-weight: 700; color: #3a3000; margin: 8px 0; }
.tar-preis-hinweis { font-size: 0.78rem; color: #856404; margin: 0; }

/* Danke */
.tar-danke {
    text-align: center;
    padding: 40px 20px;
}
.tar-danke-icon { font-size: 4rem; display: block; margin-bottom: 16px; }
.tar-danke h2 { color: #2c5f2e; }

/* Error */
.tar-error {
    background: #fff0f0;
    border-left: 4px solid #c00;
    padding: 12px 16px;
    border-radius: 4px;
    color: #c00;
    margin-top: 12px;
}

/* Loading spinner */
.tar-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tar-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes tar-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    .tar-ziel-group { grid-template-columns: 1fr; }
    .tar-ergebnis-grid { grid-template-columns: 1fr 1fr; }
    .tar-preis-value { font-size: 1.8rem; }
}
