/* =========================================
   Haberling CI – Global Styles (styles.css)
   ========================================= */

/* Farb- & Layout-Variablen */
:root{
    --red: #E30613;           /* Primärrot */
    --red-dark: #C20510;      /* Hover/Active */
    --red-soft: #FFF1F2;      /* sehr helles Rot (Flächen/Hover) */
    --text: #222;             /* Haupttext */
    --muted: #6B7280;         /* Nebeninfo */
    --border: #E6E6E6;        /* Ränder/Linien */
    --bg: #FAFAFA;            /* Seitenhintergrund */
    --card: #FFFFFF;          /* Kartenfläche */
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* Grundlegendes Boxmodel */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

/* Body / Grundtypografie */
body{
    margin: 0;
    font-family: "Open Sans", Arial, Helvetica, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

/* Container */
.wrap{
    max-width: 980px;
    margin: 28px auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 28px 34px;
}

/* Header mit Logo & Claim */
.header{ text-align: center; margin-bottom: 10px; }
.logo{ max-width: 190px; height: auto; margin-bottom: 8px; }
h1{
    margin: .25rem 0 .35rem;
    color: var(--text);
    text-transform: uppercase;      /* CI: Headlines in Großbuchstaben */
    letter-spacing: .02em;
    font-weight: 800;
    font-size: 1.9rem;
}
.muted{ color: var(--muted); margin: 0 0 18px; font-size: 1rem; }

/* Klarer Linkstil wie auf der Website */
a{ color: var(--red); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* Formularelemente */
label{
    display: block;
    margin: 12px 0 6px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: .01em;
}
textarea,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"]{
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea{ resize: vertical; min-height: 84px; }
textarea:focus,
input:focus{
    outline: none;
    border-color: #d2d2d2;
    box-shadow: 0 0 0 3px rgba(227,6,19,.12);
}

.note{ font-size: .95rem; color:#444; margin: 8px 0 14px; }

/* Grid-Layout */
.grid2{ display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px){ .grid2{ grid-template-columns: 1fr; } }

/* Fieldsets (Karten) */
.card{
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 14px 14px 10px;
    margin: 14px 0;
    box-shadow: var(--shadow);
}
.card > legend{
    padding: 0 6px;
    font-weight: 800;
    color: #111;
}

/* Unterlabels (Belade-/Entladestelle) */
.sub{
    display: block;
    margin: 6px 0 4px;
    font-size: .95rem;
    font-weight: 700;
    color: #374151;
}

/* ===========================
   Likert-Skala (1–5 + N/A)
   =========================== */
.likert{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
}
.likert .option{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.likert .option:hover{ border-color: var(--red); background: #fff; }
.likert .option input{
    position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.likert .option[aria-checked="true"]{
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.likert .option:focus-visible,
.likert .option:focus{
    outline: 3px solid rgba(227,6,19,.2);
    outline-offset: 2px;
}

/* N/A – „trifft nicht zu“ */
.likert .option.na{
    font-weight: 600;
    text-transform: none;
    padding: 0 14px;
    background: #f7f7f7;
    color: #333;
}
.likert .option.na:hover{ border-color: #bbb; background: #f3f3f3; }
.likert .option.na[aria-checked="true"]{
    background: #444; border-color: #444; color: #fff;
}

/* Aktionen / Buttons */
.actions{
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
}
button{
    appearance: none;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
    transition: background .15s ease, transform .02s ease-in-out, box-shadow .15s ease;
    box-shadow: 0 2px 0 rgba(0,0,0,.05);
}
button:hover{ background: var(--red-dark); }
button:active{ transform: translateY(1px); }
button.ghost{
    background: #fff;
    color: var(--red);
    border: 2px solid var(--red);
    box-shadow: none;
}
button.ghost:hover{ background: var(--red-soft); }

/* Systemmeldungen / Score */
#msg{ margin-top: 8px; font-size: .95rem; }
#msg.success{ color: #0a7c2f; }
#msg.error{ color: #B00020; }
.score{ display: block; margin-top: 8px; font-weight: 800; color: #111; }

/* Footer */
.footer{ margin-top: 28px; text-align: center; font-size: .9rem; color: #777; }

/* Druck-Optimierung (optional) */
@media print{
    body{ background: #fff; }
    .wrap{ box-shadow: none; border: none; padding: 0; }
    .actions, .footer{ display: none; }
}
/* ===========================
   GOLDENE STERNE – FIX
   =========================== */

.stars {
    display: flex;
    align-items: center;
    gap: 16px;             /* Abstand zwischen Sternen und entfällt */
    margin-top: 8px;
}

/* Stern-Gruppe */
.star-group {
    display: inline-flex;
    flex-direction: row-reverse;  /* 5 links → 1 rechts */
    gap: 0.25rem;
}

/* Inputs verstecken */
.star-group input {
    display: none;
}

/* Ungefüllter Stern */
.star-group label {
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: url('data:image/svg+xml;utf8,\
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><polygon fill="none" stroke="%23C9A03A" stroke-width="2" points="12 2 15 9 22 9 17 14 19 22 12 17 5 22 7 14 2 9 9 9"/></svg>') center/contain no-repeat;
    transition: filter .2s, transform .1s;
}

/* Hover */
.star-group label:hover,
.star-group label:hover ~ label {
    filter: brightness(1.25);
    transform: scale(1.05);
}

/* Gefüllter Stern */
.star-group input:checked ~ label {
    background: url('data:image/svg+xml;utf8,\
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><polygon fill="%23FFD700" stroke="%23C9A03A" stroke-width="1" points="12 2 15 9 22 9 17 14 19 22 12 17 5 22 7 14 2 9 9 9"/></svg>') center/contain no-repeat;
}

/* ===========================
   ENTFLÄLLT
   =========================== */

.stars .na {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #f3f4f6;
    font-weight: 700;
    color: #111;
    cursor: pointer;
}

.stars .na input {
    display: none;
}

.stars .na input:checked + span {
    background: #4B5563;
    color: #fff;
    border-radius: 8px;
    padding: 4px 8px;
}

