/* ================================
   Umfrage-Tool – Public Styles
   umfrage.cdu-hennigsdorf.de
   Design angelehnt an cdu-hennigsdorf.de
   ================================ */

:root {
    --primary:    #1a1a2e;
    --secondary:  #429fa9;
    --accent:     #f39c12;
    --light:      #f8f9fa;
    --white:      #ffffff;
    --text:       #333;
    --muted:      #666;
    --border:     #e9ecef;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* ── Navbar ── */
.survey-navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.survey-navbar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.survey-navbar-logo {
    height: 42px;
    width: auto;
    flex-shrink: 0;
}

.survey-navbar-brand {
    flex: 1;
}

.survey-navbar-brand-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1.2;
}

.survey-navbar-brand-sub {
    font-size: 12px;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.survey-navbar-back {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.survey-navbar-back:hover {
    color: var(--primary);
    border-color: var(--secondary);
    background: #f0fbfc;
}

/* ── Hero-Banner ── */
.survey-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #2c3e50 100%);
    padding: 36px 20px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.survey-hero::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: rgba(66,159,169,0.15);
    border-radius: 50%;
}

.survey-hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -30px;
    width: 160px; height: 160px;
    background: rgba(243,156,18,0.1);
    border-radius: 50%;
}

.survey-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(66,159,169,0.2);
    color: #7dd4db;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.survey-hero h1 {
    color: var(--white);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.survey-hero p {
    color: rgba(255,255,255,0.75);
    font-size: 15px;
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto;
}

/* ── Layout ── */
main { max-width: 700px; width: 100%; margin: 36px auto; padding: 0 20px 60px; flex: 1; }

/* ── Listenansicht ── */
.list-header { margin-bottom: 22px; }
.list-header h1 { font-size: 22px; color: var(--primary); }
.list-header p  { color: var(--muted); font-size: 14px; margin-top: 4px; }

.survey-list { display: flex; flex-direction: column; gap: 16px; }

.survey-list-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid var(--border);
}

.survey-list-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.survey-list-card-inner { padding: 22px 26px; }

.survey-list-card h2 {
    font-size: 17px;
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 700;
}

.survey-list-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.survey-list-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0;
    font-size: 13px;
    color: #888;
}

.survey-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding: 12px 26px;
    background: #fafbfc;
}

/* ── Einzelne Umfrage ── */
.card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid var(--border);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, #2c3e50 100%);
    padding: 28px 32px;
    color: white;
    position: relative;
    overflow: hidden;
}

.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 20px;
    transition: background 0.2s, border-color 0.2s;
}

.back-to-list:hover {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.6);
}

.card-header::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 120px; height: 120px;
    background: rgba(66,159,169,0.15);
    border-radius: 50%;
}

.card-header h1 {
    font-size: 22px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.card-header p {
    opacity: .8;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.card-header-badges {
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

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

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

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

.question-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 14px;
    line-height: 1.4;
}

.question-label .req { color: #e53935; margin-left: 4px; }

.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 6px;
    border: 1px solid transparent;
}

.option-label:hover {
    background: #f0fbfc;
    border-color: #c5e8eb;
}

.option-label input { accent-color: var(--secondary); width: 18px; height: 18px; flex-shrink: 0; }

.text-answer {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color .2s;
}

.text-answer:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(66,159,169,0.15);
}

/* ── Personendaten-Sektion ── */
.personal-data-section {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 22px;
}

.personal-data-section h4 {
    color: #e65100;
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.personal-data-section .form-field { margin-bottom: 10px; }

.personal-data-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.personal-data-section input[type="text"],
.personal-data-section input[type="email"] {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
}

.personal-data-section input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(66,159,169,0.15);
}

/* ── DSGVO-Einwilligung ── */
.consent-box {
    background: #f3e5f5;
    border: 1px solid #ce93d8;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.consent-box label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

.consent-box a { color: #7b1fa2; }

.consent-box input[type="checkbox"] {
    accent-color: #7b1fa2;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Ergebnisse ── */
.result-bar-wrap { margin-bottom: 12px; }

.result-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 14px;
}

.result-bar-label .pct {
    font-weight: 700;
    color: var(--secondary);
    min-width: 42px;
    text-align: right;
}

.result-bar-bg { background: var(--border); border-radius: 6px; height: 10px; overflow: hidden; }
.result-bar-fill {
    background: linear-gradient(90deg, var(--secondary), #5bbfc9);
    height: 100%;
    border-radius: 6px;
    transition: width .6s ease;
}

.result-count { font-size: 12px; color: #999; margin-top: 3px; }
.result-text-answer {
    background: var(--light);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    margin-bottom: 6px;
    border-left: 3px solid var(--secondary);
    line-height: 1.4;
}

.result-total { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* ── Submit-Button ── */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background .2s, transform .1s, box-shadow .2s;
    font-family: inherit;
}

.btn-submit:hover {
    background: #357a8a;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(66,159,169,0.3);
}

.btn-submit:active { transform: none; }

/* ── Participate-Button (Listenansicht) ── */
.btn-participate {
    display: inline-block;
    padding: 10px 22px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s, transform .1s;
}

.btn-participate:hover {
    background: #357a8a;
    transform: translateY(-1px);
}

.btn-participated {
    display: inline-block;
    padding: 10px 22px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Alerts ── */
.alert {
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }

/* ── Keine Umfrage ── */
.no-survey { text-align: center; padding: 60px 32px; }
.no-survey .icon { font-size: 52px; margin-bottom: 16px; }
.no-survey h2 { color: var(--primary); margin-bottom: 8px; font-size: 20px; }
.no-survey p  { color: var(--muted); }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
}

.badge-anon    { background: rgba(66,159,169,0.15); color: #357a8a; }
.badge-nonanon { background: rgba(243,156,18,0.15); color: #c87100; }
.badge-expires { background: rgba(243,156,18,0.12); color: #c87100; }
.badge-expired { background: #ffebee; color: #c62828; }

/* ── Footer ── */
.survey-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 24px 20px;
    font-size: 13px;
    margin-top: 40px;
}

.survey-footer a { color: var(--secondary); text-decoration: none; }
.survey-footer a:hover { text-decoration: underline; }
.survey-footer-logo {
    height: 32px;
    width: auto;
    opacity: 0.7;
    display: block;
    margin: 0 auto 12px;
    transition: opacity 0.2s;
}
.survey-footer-logo:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .survey-hero h1 { font-size: 20px; }
    .card-header, .card-body { padding: 20px; }
    .survey-list-card-inner { padding: 18px; }
    .survey-list-footer { flex-direction: column; gap: 10px; align-items: flex-start; }
    .survey-navbar-back span { display: none; }
    main { margin: 20px auto; }
}
