/* Ausschliesslich Marktkalender: bestehende IDs und JS-Bedienung bleiben erhalten. */
.sv-calendar #time { margin:0; }
.sv-calendar #inhalt_markt { box-sizing:border-box; margin-left:0 !important; padding:26px !important; background:#fcfffb !important; border:1px solid #c6c8d0 !important; color:#535660; line-height:1.5; }
.sv-calendar-eyebrow { color:#65677c; font-size:13px; font-weight:bold; letter-spacing:.035em; }
.sv-calendar-search h1 { color:#292d76; font-size:28px; line-height:1.3; margin:8px 0 20px; }
.sv-calendar-period { display:flex; align-items:center; flex-wrap:nowrap; gap:8px; }
.sv-calendar-period > a { flex-shrink:0; }
/* Historischer Abstandshalter benötigt im Flex-Layout keinen Platz. */
.sv-calendar-period > img { display:none; }
.sv-calendar-period > a { display:inline-flex; align-items:center; justify-content:center; min-width:42px; min-height:44px; border:1px solid #dcdeea; border-radius:8px; background:#f0f1f7; }
.sv-calendar-period .blaetter { width:auto; font-size:24px; margin:0; padding:0; background:transparent; border:0; box-shadow:none; color:#292d76; }
.sv-calendar-period select { box-sizing:border-box; height:44px; margin:0; padding:8px 10px; font:inherit; border:1px solid #a8aabd; border-radius:8px; background:white; color:#292d76; }
.sv-calendar-search-label { display:block; color:#292d76; font-weight:bold; margin:22px 0 8px; }
.sv-calendar-search-controls { display:flex; align-items:center; gap:8px; max-width:640px; }
.sv-calendar #suchen.suchfeld_termin { box-sizing:border-box; flex:1; min-width:0; width:100% !important; height:46px; padding:10px 12px; margin:0; font:inherit; border:1px solid #a8aabd; border-radius:8px; background:white; }
.sv-calendar #inhalt .duche { box-sizing:border-box; min-height:46px; height:auto; width:auto; padding:10px 18px; font:inherit; background:#292d76; color:white; border:1px solid #292d76; border-radius:8px; cursor:pointer; }
.sv-calendar #inhalt .duche:hover { background:#1e225c; }
.sv-calendar .sv-calendar-options { padding:16px !important; border-radius:12px !important; box-shadow:none !important; background:#f4f5f9 !important; border-color:#dcdeea !important; max-width:640px; }
.sv-calendar-options input[type="checkbox"] { width:17px; height:17px; vertical-align:middle; accent-color:#292d76; }
.sv-calendar #hide_options { margin-top:14px !important; }
.sv-calendar-columns { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(300px,1fr); align-items:start; gap:22px; margin-top:24px; }
.sv-calendar-admin .sv-calendar-columns { grid-template-columns:minmax(0,1fr); }
.sv-calendar #liste,.sv-calendar #noContent,.sv-calendar #beitrag { box-sizing:border-box; float:none !important; position:relative; left:0 !important; top:0 !important; width:100% !important; max-width:none !important; min-width:0; margin:0 !important; background:#fcfffb !important; border:1px solid #c6c8d0 !important; border-radius:18px; padding:20px !important; }
.sv-calendar #liste { padding:18px 16px !important; }
.sv-calendar-events { width:100%; margin-top:8px !important; border-collapse:separate; border-spacing:0 1px; }
.sv-calendar .sv-calendar-block-title { display:flow-root; padding:16px !important; margin:8px 0; border:1px solid #dcdeea !important; border-left:4px solid #292d76 !important; border-radius:12px !important; box-shadow:none !important; background:#f0f1f7 !important; color:#535660; line-height:1.5; }
.sv-calendar-block-title strong { color:#292d76; font-size:18px; }
.sv-calendar-event { box-sizing:border-box; box-shadow:none !important; }
.sv-calendar-event > td { padding-top:3px !important; padding-bottom:3px !important; border-bottom:1px solid #e4e6eb; line-height:1.35; vertical-align:top; }
.sv-calendar-event > td:first-child { border-radius:8px 0 0 8px; }
.sv-calendar-event > td:last-child { border-radius:0 8px 8px 0; border-right:0 !important; }
.sv-calendar-event > td:nth-child(2),.sv-calendar-event > td:nth-child(4) { white-space:nowrap; font-size:inherit; font-variant-numeric:tabular-nums; padding-left:3px; padding-right:3px; }
.sv-calendar-event > td:nth-child(6) { width:100%; }
/* Jede verschachtelte Ortstabelle braucht dieselbe feste Symbolspalte.
   Sonst verteilt der Browser den freien Platz je nach Laenge des Ortsnamens. */
.sv-calendar-event > td:nth-child(6) table { width:100%; table-layout:fixed; border-collapse:collapse; border-spacing:0; }
.sv-calendar-event > td:nth-child(6) td { padding:0 !important; vertical-align:top; line-height:1.35; }
.sv-calendar-event > td:nth-child(6) td:first-child { width:24px; }
.sv-calendar-event > td:nth-child(6) td:last-child { width:auto; }
.sv-calendar-event > td:nth-child(6) td:last-child { overflow-wrap:anywhere; }
.sv-calendar-event img { vertical-align:-3px; }
.sv-calendar:not(.sv-calendar-admin) .sv-calendar-event > td:nth-child(n+7) { display:none; }
/* Admin: Platz für Bearbeitung, Löschen, Typ und URL reservieren.
   Die öffentliche Ortsspalte mit width:100% darf diese Zellen nicht verdrängen. */
.sv-calendar-admin .sv-calendar-event > td:nth-child(6) { width:auto; }
.sv-calendar-admin .sv-calendar-event > td:last-child { width:240px; min-width:200px; font-size:12px; overflow-wrap:anywhere; }
.sv-calendar-admin .sv-calendar-events { min-width:720px; }
.sv-calendar-admin #liste { overflow-x:auto; }
.sv-calendar-admin .sv-calendar-event > td:last-child nobr { white-space:normal; }
.sv-calendar-events > tbody > tr > td[colspan="9"] > img { max-width:100%; height:auto; }
.sv-calendar #beitrag { padding:24px !important; line-height:1.55; overflow-wrap:anywhere; }
.sv-calendar #beitrag h3 { color:#292d76; font-size:22px; line-height:1.35; margin:0 0 16px !important; }
.sv-calendar #beitrag h4 { font-size:17px; line-height:1.45; margin:0 0 10px !important; }
.sv-calendar #beitrag h4 a { color:#292d76 !important; }
.sv-calendar #beitrag p { text-align:left !important; margin:10px 0 0 !important; font-size:15px; }
.sv-calendar #beitrag hr { clear:both; height:1px; border:0; width:100%; box-shadow:none; background:#e0e2e9 !important; margin:22px 0 !important; }
.sv-calendar-news-item { display:flow-root; padding:20px 0; border-bottom:1px solid #e0e2e9; }
.sv-calendar-news-item:last-of-type { border-bottom:0; }
.sv-calendar #beitrag img { width:180px !important; max-width:45%; height:auto; border-radius:10px !important; margin-right:14px !important; margin-bottom:10px; }
.sv-calendar-dsb { display:flow-root; }
.sv-calendar-dsb:not(:first-child) { margin-top:26px; padding-top:22px; border-top:1px solid #e0e2e9; }
.sv-calendar-dsb:first-child { margin-bottom:26px; }
.sv-calendar #noContent { line-height:1.55; }
.sv-calendar #noContent > div { box-shadow:none !important; border:0 !important; padding:12px 0 !important; }
.sv-calendar #noContent td { text-align:left; overflow-wrap:anywhere; }
.sv-calendar #noContent .inputstyle_email { white-space:normal; overflow-wrap:anywhere; }
.sv-calendar #edit { box-sizing:border-box; top:0 !important; margin:20px 0 0 !important; padding:20px; border:1px solid #c6c8d0; border-radius:18px; background:#fcfffb; }
.sv-calendar #inhalt :focus-visible { outline:3px solid #967322; outline-offset:3px; }
@media(max-width:1000px) { .sv-calendar-columns { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) {
    .sv-calendar #inhalt_markt { padding:20px !important; }
    .sv-calendar-search h1 { font-size:23px; }
    .sv-calendar-period { gap:5px; }
    .sv-calendar-period > a { min-width:32px; }
    .sv-calendar-period select { padding:8px 5px; min-width:0; max-width:none; }
    .sv-calendar-period select[name="monat"] { flex:0 1 150px; width:150px; }
    .sv-calendar-period select[name="jahr"] { flex:0 0 66px; width:66px; }
    .sv-calendar #liste { padding:12px 10px !important; }
    .sv-calendar #beitrag { padding:20px !important; }
    /* Auch mobil bleiben Datum, Symbol und Ortsname nebeneinander.
       Lange Ortsnamen umbrechen innerhalb ihrer Spalte. */
    .sv-calendar-admin #liste { overflow-x:auto; }
}

/* KI-Ansicht und Hinweis vor externen Links teilen sich den vorhandenen Container.
   Position und Sichtbarkeit steuert weiterhin die bestehende Fensterlogik. */
.sv-calendar #bund-ki-copy h1,
.sv-calendar #bund-ki-copy h2,
.sv-calendar #bund-ki-copy h3,
.sv-calendar #bund-ki-copy h4 { color:#292d76; line-height:1.35; margin:24px 0 12px; }
.sv-calendar #bund-ki-copy h1 { font-size:26px; }
.sv-calendar #bund-ki-copy h2 { font-size:23px; }
.sv-calendar #bund-ki-copy h3 { font-size:20px; }
.sv-calendar #bund-ki-copy > :first-child { margin-top:0; }
.sv-calendar #bund-ki-copy p { margin:0 0 16px; text-align:left; }
.sv-calendar #bund-ki-copy li { margin-bottom:7px; }
.sv-calendar #bund-ki-copy table { display:block; max-width:100%; overflow-x:auto; }
.sv-calendar #WWWwarn #bund-ki-text .ki-disclaimer { padding:12px 14px; margin:22px 0 16px; border-left:3px solid #b28f48; border-radius:0 8px 8px 0; background:#f8f4e9; color:#535660; font-size:14px; }

/* Feste mobile Spalten: Pfeile bleiben auch bei Android-Auswahlfeldern in der Zeile. */
@media (max-width: 600px) {
    .sv-calendar .sv-calendar-period:has(> a) {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 66px 32px;
        gap: 4px;
        width: 100%;
        max-width: 282px;
    }
    .sv-calendar .sv-calendar-period > a {
        box-sizing: border-box;
        width: 32px;
        min-width: 0;
        margin: 0;
    }
    .sv-calendar .sv-calendar-period select[name="monat"],
    .sv-calendar .sv-calendar-period select[name="jahr"] {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding-left: 3px;
        padding-right: 1px;
        font-size: 14px;
    }
    .sv-calendar .sv-calendar-period:not(:has(> a)) select[name="jahr"] { width: 66px; }
}
