/*
 * Theme "acp" – Audition Certificates Platform.
 *
 * Wird von den öffentlichen ACP-Seiten (acp::layouts.public, also Suche und Template
 * theme::layouts.acp) NACH dem App-Bundle geladen und bleibt ungeschichtet.
 * Farbvariablen enthalten seit Tailwind 4 vollständige Farben (rgb(…)), keine Tripel.
 */

/* Dark palette in the style of the revised ACP template (Tailwind slate / sky) */
html.dark {
    --color-text-normal: rgb(226 232 240);
    --color-text-muted: rgb(148 163 184);
    --color-text-highlighted: rgb(241 245 249);
    --color-text-placeholder: rgb(100 116 139);
    --color-text-component: rgb(51 65 85);

    --color-divider: rgb(51 65 85);
    --color-border: rgb(71 85 105);

    --color-background: rgb(15 23 42);
    --color-background-darker: rgb(2 6 23);
    --color-foreground: rgb(30 41 59);
    --color-input: rgb(30 41 59);

    --color-secondary: rgb(148 163 184);
}

html.dark main a:not(.btn),
html.dark main .h4,
html.dark footer a {
    color: rgb(56 189 248);
}

html.dark .acp-certificate .text-muted,
html.dark .acp-certificate .text-gray-500 {
    color: rgb(148 163 184);
}

/* Filled badges use --color-text-component, which is dark in dark mode */
html.dark .badge:not(.badge_outlined) {
    color: rgb(241 245 249);
}

/* Annotation colors are built dynamically (Annotation::$color), lighten them for dark backgrounds */
html.dark .acp-certificate .text-red-600 { color: rgb(248 113 113); }
html.dark .acp-certificate .border-red-600 { border-color: rgb(248 113 113); }
html.dark .acp-certificate .text-yellow-600 { color: rgb(250 204 21); }
html.dark .acp-certificate .border-yellow-600 { border-color: rgb(250 204 21); }
html.dark .acp-certificate .text-violet-600 { color: rgb(167 139 250); }
html.dark .acp-certificate .border-violet-600 { border-color: rgb(167 139 250); }
html.dark .acp-certificate .text-lime-700 { color: rgb(163 230 53); }
html.dark .acp-certificate .border-lime-700 { border-color: rgb(163 230 53); }
html.dark .acp-certificate .text-cyan-500 { color: rgb(34 211 238); }
html.dark .acp-certificate .border-cyan-500 { border-color: rgb(34 211 238); }

html.dark .acp-certificate .highlight {
    background-color: rgb(120 53 15);
}

/* Pagination (acp::pagination) uses fixed light utility classes */
html.dark .acp-detail-view-container nav[role="navigation"] .bg-white {
    background-color: rgb(30 41 59);
}

html.dark .acp-detail-view-container nav[role="navigation"] .border-gray-300 {
    border-color: rgb(71 85 105);
}

html.dark .acp-detail-view-container nav[role="navigation"] .text-gray-700 {
    color: rgb(226 232 240);
}

html.dark .acp-certificate .btn_outlined:hover {
    background-color: rgb(12 74 110);
}

/* Map legend (leaflet.legend) has a fixed white background in resources/css/leaflet.css */
html.dark .leaflet-legend {
    background-color: rgb(30 41 59) !important;
    border-color: rgb(71 85 105) !important;
    color: rgb(226 232 240) !important;
    box-shadow: 0 1px 5px rgb(0 0 0 / 0.5);
}

html.dark .leaflet-legend-item span {
    color: rgb(203 213 225);
}

html.dark .leaflet-legend-item-inactive span {
    color: rgb(100 116 139);
}

/*
 * CMS-Layoutklassen (LayoutClassMapper) aus cms-base.css. Die ACP-Seiten laden das App-Bundle
 * statt cms-base.css: dessen ungeschichteter Reset würde die geschichteten App-Styles überstimmen.
 * Deshalb nur die namespaced Layoutklassen – bei Änderungen in cms-base.css mitpflegen.
 */
.cms-d-flex { display: flex; } .cms-d-grid { display: grid; } .cms-d-block { display: block; }
.cms-dir-row { flex-direction: row; } .cms-dir-col { flex-direction: column; } .cms-dir-row-rev { flex-direction: row-reverse; } .cms-dir-col-rev { flex-direction: column-reverse; }
.cms-wrap { flex-wrap: wrap; } .cms-nowrap { flex-wrap: nowrap; } .cms-wrap-rev { flex-wrap: wrap-reverse; }
.cms-justify-start { justify-content: flex-start; } .cms-justify-center { justify-content: center; } .cms-justify-end { justify-content: flex-end; } .cms-justify-between { justify-content: space-between; } .cms-justify-around { justify-content: space-around; } .cms-justify-evenly { justify-content: space-evenly; }
.cms-items-start { align-items: flex-start; } .cms-items-center { align-items: center; } .cms-items-end { align-items: flex-end; } .cms-items-stretch { align-items: stretch; } .cms-items-baseline { align-items: baseline; }
.cms-gcols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .cms-gcols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cms-gcols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cms-gcols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cms-gcols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .cms-gcols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .cms-gcols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .cms-gcols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .cms-gcols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } .cms-gcols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); } .cms-gcols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } .cms-gcols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.cms-grows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .cms-grows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .cms-grows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .cms-grows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); } .cms-grows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .cms-grows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); }
.cms-flow-row { grid-auto-flow: row; } .cms-flow-col { grid-auto-flow: column; } .cms-flow-dense { grid-auto-flow: dense; }
.cms-gap-0 { gap: 0; } .cms-gap-1 { gap: 0.25rem; } .cms-gap-2 { gap: 0.5rem; } .cms-gap-3 { gap: 0.75rem; } .cms-gap-4 { gap: 1rem; } .cms-gap-5 { gap: 1.25rem; } .cms-gap-6 { gap: 1.5rem; } .cms-gap-8 { gap: 2rem; } .cms-gap-10 { gap: 2.5rem; } .cms-gap-12 { gap: 3rem; }
.cms-p-0 { padding: 0; } .cms-p-1 { padding: 0.25rem; } .cms-p-2 { padding: 0.5rem; } .cms-p-3 { padding: 0.75rem; } .cms-p-4 { padding: 1rem; } .cms-p-5 { padding: 1.25rem; } .cms-p-6 { padding: 1.5rem; } .cms-p-8 { padding: 2rem; } .cms-p-10 { padding: 2.5rem; } .cms-p-12 { padding: 3rem; }
.cms-text-left { text-align: left; } .cms-text-center { text-align: center; } .cms-text-right { text-align: right; } .cms-text-justify { text-align: justify; }
.cms-maxw-xs { max-width: 20rem; } .cms-maxw-sm { max-width: 24rem; } .cms-maxw-md { max-width: 28rem; } .cms-maxw-lg { max-width: 32rem; } .cms-maxw-xl { max-width: 36rem; } .cms-maxw-2xl { max-width: 42rem; } .cms-maxw-none { max-width: none; } .cms-maxw-full { max-width: 100%; }
.cms-fit-cover { object-fit: cover; } .cms-fit-contain { object-fit: contain; } .cms-fit-fill { object-fit: fill; } .cms-fit-none { object-fit: none; } .cms-fit-scale-down { object-fit: scale-down; }
.cms-radius-1 { border-radius: .125rem; } .cms-radius-2 { border-radius: .375rem; } .cms-radius-3 { border-radius: .5rem; } .cms-radius-4 { border-radius: .75rem; } .cms-radius-5 { border-radius: 1rem; } .cms-radius-6 { border-radius: 1.5rem; } .cms-radius-7 { border-radius: 9999px; }
.cms-aspect-auto { aspect-ratio: auto; } .cms-aspect-square { aspect-ratio: 1 / 1; } .cms-aspect-video { aspect-ratio: 16 / 9; } .cms-aspect-photo { aspect-ratio: 3 / 2; } .cms-aspect-portrait { aspect-ratio: 3 / 4; }

.cms-root { min-width: 0; }
.cms-block { min-width: 0; position: relative; }

/*
 * Wie bis zur Cms-Umstellung (Beta): Absätze eines Text-Bausteins stehen wie direkte Kinder der
 * Wurzel untereinander, mit deren Abstand und Ausrichtung (cms-gap-*, cms-items-*).
 */
.content-wrapper .cms-root > .cms-text {
    display: flex;
    flex-direction: column;
    align-items: inherit;
    gap: inherit;
}
