/* =========================================================================
   Kälteschein-Service – gebündelte Oberflächenstile
   Ersetzt die früheren Inline-<style>-Blöcke der Kälteschein-Views.

   Grundsatz: eine Ansicht für alle Bildschirmgrößen.
   Kein separates Mobil-Template, keine Karten-Variante, keine Media-Queries
   mit abweichendem Markup. Schmale Breiten nutzen .ks-table-scroll.
   ========================================================================= */

/* ---------------------------------------------------------------- Seite */

.ks-wrap {
    font-family: sans-serif;
}

.ks-wrap h1,
.ks-wrap h2.ueberschrift {
    color: #0056b3;
    text-align: left;
}

.ks-intro {
    color: #555;
    margin-bottom: 24px;
    line-height: 1.6;
}

.ks-section {
    margin-top: 32px;
}

.ks-section-title {
    color: #0056b3;
    font-size: 1.15em;
    margin: 0 0 10px 0;
}

.ks-muted {
    color: #666;
    font-size: 0.9em;
}

/* Nur für Screenreader; ergänzt sichtbare Symbole um Text */
.ks-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------------------- Kalender/Box */

.ks-cta-box,
.ks-rfq-box {
    background: #f7f7f7;
    border-left: 4px solid #0056b3;
    padding: 14px 18px;
    margin: 28px 0 20px 0;
    border-radius: 2px;
}

.ks-rfq-box {
    border-left-color: #c00;
}

.ks-cta-box strong,
.ks-rfq-box strong {
    font-size: 15px;
}

.ks-cta-box p,
.ks-rfq-box p {
    margin: 8px 0 10px 0;
    font-size: 13px;
}

/* --------------------------------------------------------------- Suchleiste */

.ks-searchbar {
    background: #f2f6fb;
    border: 1px solid #cfe0f2;
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 22px;
}

.ks-searchbar form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

/* Nur innerhalb der Suchleiste: das Anfrageformular bringt eigene Feldstile mit. */

.ks-searchbar .ks-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
}

.ks-searchbar .ks-field--grow {
    flex: 1 1 200px;
}

.ks-searchbar .ks-field label {
    font-size: 12px;
    font-weight: 700;
    color: #333;
}

.ks-searchbar .ks-field input[type="text"],
.ks-searchbar .ks-field input[type="number"],
.ks-searchbar .ks-field select {
    padding: 8px 10px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fff;
    color: #222;
    font-size: 14px;
    height: 38px;
    box-sizing: border-box;
}

.ks-searchbar .ks-field input[type="text"]:focus,
.ks-searchbar .ks-field input[type="number"]:focus,
.ks-searchbar .ks-field select:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.12);
}

.ks-searchbar .ks-btn {
    height: 38px;
}

.ks-btn {
    display: inline-block;
    background: #0056b3;
    color: #fff;
    border: 1px solid #0056b3;
    border-radius: 3px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}

.ks-btn:hover,
.ks-btn:focus {
    background: #003d80;
    color: #fff;
}

.ks-btn--ghost {
    background: #fff;
    color: #0056b3;
}

.ks-btn--ghost:hover,
.ks-btn--ghost:focus {
    background: #e8f0fe;
    color: #0056b3;
}

.ks-btn--small {
    padding: 5px 12px;
    font-size: 13px;
}

/* ------------------------------------------------------------- Filterpanel */

.ks-filterpanel {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    padding: 0;
    margin-bottom: 18px;
}

.ks-filterpanel > summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 700;
    color: #0056b3;
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    list-style: none;
}

.ks-filterpanel > summary::-webkit-details-marker {
    display: none;
}

.ks-filterpanel > summary::after {
    content: "▾";
    float: right;
    color: #666;
}

.ks-filterpanel[open] > summary::after {
    content: "▴";
}

.ks-filterpanel-body {
    padding: 16px;
}

.ks-facetten {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.ks-facette {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 180px;
}

.ks-facette legend {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    padding: 0 0 6px 0;
}

.ks-facette label {
    display: block;
    font-size: 14px;
    color: #222;
    padding: 3px 0;
    cursor: pointer;
}

.ks-facette .ks-count {
    color: #777;
    font-size: 12px;
}

.ks-filter-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------------ Chips */

.ks-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.ks-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f0fe;
    border: 1px solid #b9d3ee;
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 13px;
    color: #123;
    text-decoration: none;
}

.ks-chip:hover,
.ks-chip:focus {
    background: #d6e6fb;
    color: #123;
}

.ks-chip-x {
    color: #c00;
    font-weight: 700;
    text-decoration: none;
}

.ks-chips-reset {
    font-size: 13px;
    color: #c00;
    text-decoration: none;
    margin-left: 4px;
}

.ks-chips-reset:hover,
.ks-chips-reset:focus {
    text-decoration: underline;
}

/* ----------------------------------------------------------- Ergebnisliste */

.ks-result-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ks-result-count {
    font-size: 14px;
    color: #333;
}

.ks-result-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
}

.ks-result-sort select {
    padding: 6px 8px;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    color: #222;
    height: 34px;
}

.ks-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ks-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}

.ks-tabelle th,
.ks-tabelle td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.ks-tabelle th {
    background-color: #0056b3;
    color: #fff;
    font-size: 0.9em;
    white-space: nowrap;
}

.ks-tabelle tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ks-tabelle tbody tr:hover {
    background-color: #f1f1f1;
}

.ks-tabelle tr.ks-featured {
    background-color: #fffbea;
}

.ks-tabelle td.ks-col-num {
    white-space: nowrap;
}

/* Kurze, vorhersagbare Werte bleiben einzeilig */
.ks-tabelle td.ks-col-short {
    white-space: nowrap;
}

.ks-kurs-titel {
    color: #0056b3;
    text-decoration: none;
    font-weight: 700;
}

.ks-kurs-titel:hover,
.ks-kurs-titel:focus {
    text-decoration: underline;
}

.ks-kurs-meta {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.ks-anbieter {
    font-weight: 700;
    color: #222;
}

/* ---------------------------------------------------------------- Badges */

.ks-badge {
    display: inline-block;
    font-size: 11px;
    line-height: 1.5;
    padding: 1px 7px;
    border-radius: 10px;
    border: 1px solid #ccd;
    background: #f2f2f2;
    color: #444;
    margin-top: 4px;
    white-space: nowrap;
}

.ks-badge--ok {
    background: #e8f6ec;
    border-color: #a8d5b5;
    color: #1c6b36;
}

.ks-badge--info {
    background: #e8f0fe;
    border-color: #b9d3ee;
    color: #123;
}

.ks-badge--warn {
    background: #fff6e5;
    border-color: #e8c887;
    color: #8a5a00;
}

.ks-badge--neutral {
    background: #f2f2f2;
    border-color: #ddd;
    color: #555;
}

/* ------------------------------------------------------------ Leerzustand */

.ks-empty {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    padding: 24px 20px;
    text-align: left;
}

.ks-empty h3 {
    margin: 0 0 8px 0;
    color: #0056b3;
    font-size: 1.05em;
}

.ks-empty p {
    margin: 0 0 12px 0;
    color: #444;
}

.ks-empty ul {
    margin: 0 0 14px 18px;
    padding: 0;
    color: #444;
    line-height: 1.7;
}

/* ------------------------------------------------------------- Breadcrumb */

.ks-breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.ks-breadcrumb a {
    color: #0056b3;
    text-decoration: none;
}

.ks-breadcrumb a:hover,
.ks-breadcrumb a:focus {
    text-decoration: underline;
}

.ks-breadcrumb span.ks-sep {
    margin: 0 6px;
    color: #aaa;
}

/* ---------------------------------------------------------------- Legende */

.ks-legende {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    padding: 14px 16px;
    margin-top: 24px;
}

.ks-legende h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #0056b3;
}

.ks-legende dl {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
}

.ks-legende dt {
    font-weight: 700;
    color: #222;
    font-size: 13px;
}

.ks-legende dd {
    margin: 0 0 6px 0;
    color: #555;
    font-size: 13px;
}

/* --------------------------------------------------------------- Kursdetail */

.ks-detail-head {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.ks-detail-head h1 {
    margin: 0 0 8px 0;
}

.ks-detail-fakten {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.ks-detail-fakten li {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    padding: 10px 14px;
    min-width: 150px;
}

.ks-detail-fakten .ks-fakt-label {
    display: block;
    font-size: 11px;
    text-transform: none;
    color: #666;
    margin-bottom: 4px;
}

.ks-detail-fakten .ks-fakt-wert {
    font-weight: 700;
    color: #222;
}

.ks-detail-block {
    margin-bottom: 22px;
}

.ks-detail-block h2 {
    font-size: 1.05em;
    color: #0056b3;
    margin: 0 0 8px 0;
}

.ks-detail-block p,
.ks-detail-block li {
    color: #333;
    line-height: 1.6;
}

.ks-quelle {
    font-size: 12px;
    color: #666;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 20px;
}

/* -------------------------------------------------------- Anfrageformular */

.ks-anfrage-wrap {
    margin: 30px 0 0 0;
    font-family: sans-serif;
}

.ks-form-card {
    max-width: 860px;
    /* Eigene Grundgröße: die Seitenbasis sind 13 px, das Formular soll gut lesbar bleiben. */
    font-size: 15px;
    line-height: 1.55;
    color: #272727;
}

.ks-form-lead {
    margin: 0 0 20px 0;
    max-width: 68ch;
    color: #555;
}

/* Fortschritt */

.ks-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px 0;
    padding: 0;
    list-style: none;
}

.ks-progress li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 180px;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    background: #fafbfc;
    color: #6b7075;
    font-size: 0.86em;
    font-weight: 700;
}

.ks-progress-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dfe3e8;
    color: #fff;
    font-size: 0.85em;
}

.ks-progress li.is-active {
    border-color: #0056b3;
    background: #eef4fc;
    color: #0056b3;
}

.ks-progress li.is-active .ks-progress-no {
    background: #0056b3;
}

.ks-progress li.is-done {
    border-color: #cfe0f2;
    background: #f6fafd;
    color: #3d5a75;
}

.ks-progress li.is-done .ks-progress-no {
    background: #1e7a45;
}

/* Schritte */

.ks-step {
    margin: 0;
    padding: 0;
}

.ks-step + .ks-step {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eef0f2;
}

.ks-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px 0;
    font-size: 1.06em;
    color: #0056b3;
}

.ks-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0056b3;
    color: #fff;
    font-size: 0.78em;
}

.ks-step-title-text {
    min-width: 0;
}

.ks-step-hint {
    margin: 0 0 16px 0;
    max-width: 68ch;
    color: #666;
    font-size: 0.86em;
}

/* Beschriftungen */

.ks-label {
    display: block;
    margin: 0 0 6px 0;
    font-size: 0.93em;
    font-weight: 700;
    color: #222;
}

.ks-required {
    color: #c00;
}

.ks-optional {
    font-weight: 400;
    color: #777;
}

/* Zertifikate */

.ks-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.ks-checkboxes label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    background: #fbfcfd;
    font-size: 0.95em;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.ks-checkboxes label:hover {
    border-color: #9dc0e6;
    background: #f2f7fd;
}

.ks-checkboxes label:has(input:checked) {
    border-color: #0056b3;
    background: #eaf2fc;
}

.ks-checkboxes label:focus-within {
    outline: 2px solid #0056b3;
    outline-offset: 1px;
}

.ks-checkboxes input[type="checkbox"] {
    display: inline-block;
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 2px 0 0 0;
    accent-color: #0056b3;
    cursor: pointer;
}

.ks-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    /* Setzt die Schriftgröße der Theme-Regel "label span" zurück. */
    font-size: 1em;
    color: #1a1a1a;
}

.ks-checkbox-text strong {
    color: #1a1a1a;
    font-size: 1em;
    line-height: 1.35;
}

.ks-checkbox-text small {
    color: #666;
    font-size: 0.86em;
    line-height: 1.45;
}

/* Felder */

.ks-field-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 20px;
}

.ks-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 220px;
    max-width: 360px;
}

.ks-field--sm {
    flex: 1 1 150px;
    max-width: 190px;
}

.ks-field--md {
    flex: 1 1 240px;
    max-width: 300px;
}

.ks-field--wide {
    max-width: 420px;
    margin-top: 18px;
}

/* Eingaben: höhere Spezifität als die Basisformulare in base.css */

.ks-anfrage-wrap input.ks-input {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 44px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #ccd2d9;
    border-radius: 6px;
    box-shadow: none;
    background: #fff;
    color: #272727;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.3;
    box-sizing: border-box;
}

.ks-anfrage-wrap input.ks-input::placeholder {
    color: #9aa0a6;
}

.ks-anfrage-wrap input.ks-input:focus {
    border-color: #0056b3;
    color: #272727;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.14);
}

.ks-anfrage-wrap input.ks-input.is-invalid {
    border-color: #c00;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.ks-hint {
    margin: 6px 0 0 0;
    color: #777;
    font-size: 0.82em;
}

/* Meldungen */

.ks-errors {
    margin: 0 0 22px 0;
    padding: 12px 16px;
    border: 1px solid #e9b3b3;
    border-left: 4px solid #c00;
    border-radius: 6px;
    background: #fff5f5;
    color: #a00;
    font-size: 0.9em;
}

.ks-errors strong {
    display: block;
    margin-bottom: 4px;
}

.ks-errors ul {
    margin: 0;
    padding-left: 18px;
}

.ks-field-error {
    margin: 6px 0 0 0;
    color: #c00;
    font-size: 0.82em;
}

.ks-field-error[hidden] {
    display: none;
}

/* Absenden */

.ks-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
}

.ks-submit-btn {
    display: inline-block;
    padding: 13px 30px;
    border: 1px solid #0056b3;
    border-radius: 6px;
    background: #0056b3;
    color: #fff;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.15s;
}

.ks-submit-btn:hover,
.ks-submit-btn:focus {
    background: #003d80;
    border-color: #003d80;
    color: #fff;
}

.ks-form-dauer {
    color: #777;
    font-size: 0.86em;
}

.ks-form-note {
    margin: 14px 0 0 0;
    max-width: 68ch;
    color: #777;
    font-size: 0.82em;
}

.ks-form-note a {
    color: #0056b3;
}

/* --------------------------------------------------------------- Druckbild */

@media print {
    .ks-searchbar,
    .ks-filterpanel,
    .ks-chips,
    .ks-result-sort {
        display: none;
    }
}
