/* ============================================================
   Kfz-Innung Abstimmung – Public Styles
   Angelehnt an das Design von kfzinnungleipzig.de
   ============================================================ */

:root {
    --red:        #c0131f;
    --red-dark:   #96111a;
    --red-light:  #e8424c;
    --nav-bg:     #1c1c1c;
    --nav-hover:  #c0131f;
    --bg-light:   #f4f4f4;
    --bg-white:   #ffffff;
    --text:       #2c2c2c;
    --text-mid:   #555555;
    --text-light: #888888;
    --border:     #dcdcdc;
    --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
    --shadow-md:  0 4px 20px rgba(0,0,0,.12);
    --radius:     6px;
    --green:      #27ae60;
    --grey:       #9e9e9e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
    background: var(--nav-bg);
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo img {
    height: 56px;
    width: auto;
    display: block;
}

.site-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}
.site-title small {
    display: block;
    font-size: .75rem;
    font-weight: 400;
    color: #aaa;
    margin-top: 2px;
}

/* ─── Red Stripe ──────────────────────────────────────────── */
.header-stripe {
    height: 4px;
    background: var(--red);
}

/* ─── Main Content ────────────────────────────────────────── */
.main-content {
    flex: 1;
    max-width: 860px;
    margin: 36px auto;
    padding: 0 20px;
    width: 100%;
}

/* ─── Survey Card ─────────────────────────────────────────── */
.survey-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.survey-card-header {
    background: var(--red);
    color: #fff;
    padding: 28px 32px 24px;
}

.survey-card-header h1 {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.survey-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: .85rem;
    opacity: .9;
    margin-top: 10px;
}

.survey-meta span::before {
    content: '📅 ';
}

.survey-description {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    color: var(--text-mid);
    font-size: .95rem;
    line-height: 1.7;
}

.survey-body {
    padding: 28px 32px;
}

/* ─── Frage ───────────────────────────────────────────────── */
.question-block {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.question-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.question-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.5;
}

.question-text .required-mark {
    color: var(--red);
    margin-left: 4px;
    font-size: .85em;
}

.question-hint {
    font-size: .8rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-style: italic;
}

/* ─── Radio / Checkbox ────────────────────────────────────── */
.choice-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, background .2s;
    font-size: .95rem;
}

.choice-item label:hover {
    border-color: var(--red);
    background: #fff5f5;
}

.choice-item input[type="radio"],
.choice-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--red);
    flex-shrink: 0;
}

.choice-item input:checked + span,
.choice-item input:checked ~ span {
    color: var(--red);
    font-weight: 600;
}

.choice-text-field {
    margin-top: 12px;
}

.choice-text-field textarea,
.text-answer textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .92rem;
    resize: vertical;
    min-height: 90px;
    transition: border-color .2s;
    color: var(--text);
}

.choice-text-field textarea:focus,
.text-answer textarea:focus {
    outline: none;
    border-color: var(--red);
}

/* ─── Sternebewertung ─────────────────────────────────────── */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 2.2rem;
    color: #ccc;
    cursor: pointer;
    transition: color .15s;
    line-height: 1;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f5a623;
}

/* ─── Pflichtfeldmeldung ──────────────────────────────────── */
.field-error {
    color: var(--red);
    font-size: .82rem;
    margin-top: 6px;
    display: none;
}

.has-error .choice-item label,
.has-error textarea {
    border-color: var(--red) !important;
}

.has-error .field-error {
    display: block;
}

/* ─── Submit-Button ───────────────────────────────────────── */
.form-footer {
    padding: 24px 32px;
    background: #fafafa;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: .97rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-decoration: none;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--red);   color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; }
.btn-success   { background: var(--green); color: #fff; }
.btn-lg        { padding: 14px 36px; font-size: 1.05rem; }

/* ─── Passwort-Gate ───────────────────────────────────────── */
.password-gate {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-width: 460px;
    margin: 60px auto;
    padding: 36px;
    text-align: center;
}

.password-gate h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text);
}

.password-gate p {
    color: var(--text-mid);
    font-size: .9rem;
    margin-bottom: 22px;
}

.password-gate .input-group {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.input-field {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--red);
}

/* ─── Info-Boxen ──────────────────────────────────────────── */
.info-box {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 60px auto;
}

.info-box h2 { font-size: 1.4rem; margin-bottom: 12px; }
.info-box p  { color: var(--text-mid); }

.info-box-icon { font-size: 3rem; margin-bottom: 16px; }

/* ─── Thanks Page ─────────────────────────────────────────── */
.thanks-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    max-width: 600px;
    margin: 60px auto;
}

.thanks-card-top {
    background: var(--green);
    color: #fff;
    padding: 32px;
    text-align: center;
}

.thanks-card-top .check-icon { font-size: 3rem; margin-bottom: 10px; }
.thanks-card-top h1 { font-size: 1.6rem; }

.thanks-card-body { padding: 32px; text-align: center; color: var(--text-mid); line-height: 1.8; }

/* ─── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--nav-bg);
    color: #aaa;
    text-align: center;
    padding: 20px;
    font-size: .82rem;
    margin-top: auto;
}

.site-footer a { color: #ccc; }

/* ─── Alert ───────────────────────────────────────────────── */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: .9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
}

.alert-success  { background: #d4edda; color: #155724; border-left: 4px solid var(--green); }
.alert-danger   { background: #f8d7da; color: #721c24; border-left: 4px solid var(--red); }
.alert-warning  { background: #fff3cd; color: #856404; border-left: 4px solid #f5a623; }
.alert-info     { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }

.alert-close {
    position: absolute;
    right: 12px;
    top: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: .6;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .site-logo img { height: 44px; }
    .main-content { margin: 20px auto; }
    .survey-card-header { padding: 20px; }
    .survey-card-header h1 { font-size: 1.25rem; }
    .survey-description, .survey-body { padding: 18px 20px; }
    .form-footer { padding: 18px 20px; }
    .survey-meta { flex-direction: column; gap: 6px; }
    .star-rating label { font-size: 2rem; }
}
