:root {
    /* werden per Inline-Style aus den Plugin-Einstellungen überschrieben */
    --lg-primary: #2563eb;
    --lg-accent:  #f97316;
}

/* Hinweisbox */
.lg-alert {
    padding: .75rem 1rem;
    border-radius: .5rem;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.lg-alert-success {
    background: #dcfce7;
    border: 1px solid #22c55e;
}

/* Gesamte Liste – Basis-Schriftgröße */
.lg-lehrgangsliste {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-size: .9rem;
}

/* ================= Accordion-Rahmen / Card-Style ================= */

.lg-accordion {
    margin: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d4d4d4; /* grauer Rahmen, kein Schatten */
    box-shadow: none;
}

/* Summary ohne Standard-Dreieck, Platz fürs Icon */
.lg-accordion-summary {
    list-style: none;
    position: relative;
    padding-right: 2.5rem; /* Platz für Pfeil */
}
.lg-accordion-summary::-webkit-details-marker {
    display: none;
}

/* Pfeil-Icon rechts im Header – dunkelgrau */
.lg-accordion > summary::after {
    content: "▸";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #333333;
    pointer-events: none;
    transition: transform .2s ease-in-out;
}

/* Wenn geöffnet, Pfeil nach unten */
.lg-accordion[open] > summary::after {
    content: "▾";
}

/* Kopfzeile: Datum – Art – Ort */
.lg-accordion-header {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: .5rem;
    padding: .75rem 1.25rem;
    background: var(--lg-primary);
    color: #fff !important;
    font-size: .9rem;
    cursor: pointer;
}

/* alles linksbündig */
.lg-acc-art  {
    font-weight: 700;
}
.lg-acc-art,
.lg-acc-ort {
    text-align: left;
}
.lg-acc-date {max-width:10rem;}

/* Body: heller Hintergrund wie Content-Flächen */
.lg-accordion-body {
    padding: .75rem 1.25rem 1.25rem;
    background: #f5f5f5;
}

/* ================= Tabelle ================= */

.lg-table {
    width: 100%;
    border-collapse: collapse;
}

.lg-table th,
.lg-table td {
    padding: .6rem .4rem;
    vertical-align: top;
    border-bottom: 1px solid #e5e7eb;
    text-align: left !important;
}

.lg-table th {
    width: 25%;
    font-weight: 600;
    background: #f9fafb;
    color: #333 !important;
}

.lg-table tr:last-child th,
.lg-table tr:last-child td {
    border-bottom: none;
}

/* Thema fett (Inhalt in der zweiten Zelle) */
.lg-table th + td strong {
    font-weight: 700 !important;
}

/* Link für Google Maps */
.lg-gmaps-link {
    display: inline-block;
}

/* ================= Referenten ================= */

.lg-ref-item {
    display: flex;
    gap: .75rem;
    margin-bottom: .75rem;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
}

/* Text links, Bild rechts */
.lg-ref-text {
    font-size: .9rem;
    line-height: 1.4;
    flex: 1 1 auto;
}
.lg-ref-text *,
.lg-accordion-body small {
    font-size: .9rem;
    line-height: 1.4;
    text-align: left;
}

/* Name darf fett sein, aber nicht größer wirken */
.lg-ref-text strong {
    font-weight: 700;
    font-size: .9rem;
}

/* Referenten – quadratische Bilder mit runden Ecken */
.lg-ref-img-wrap {
    flex: 0 0 72px;
    text-align: right;
}
.lg-ref-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: .75rem;       /* statt Kreis: leicht abgerundet */
    border: 1px solid #ddd;
    background: #fff;
}

/* ================= Buttons ================= */

.lg-btn,
.lg-btn-sm {
    border: none;
    border-radius: 999px;
    padding: .45rem 1.1rem;
    font-size: .9rem;
    cursor: pointer;
    background: #ffcc00;          /* gelb wie im Theme */
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.lg-btn:hover,
.lg-btn-sm:hover {
    background: #e6b800;
}

/* kleinere Varianten (z.B. Teilnehmer -, +) */
.lg-btn-sm {
    font-size: .8rem;
    padding: .25rem .7rem;
}

/* PDF-Button: nicht fett, nicht unterstrichen */
.lg-table a.lg-btn {
    font-weight: 400;
    text-decoration: none;
	color:#333;
}

/* ================= Formular ================= */

.lg-form {
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.lg-form-row {
    margin-bottom: .75rem;
}

.lg-form input[type="text"],
.lg-form input[type="email"],
.lg-form select,
.lg-form textarea {
    width: 100%;
    max-width: 100%;
    padding: .45rem .7rem;           /* mehr Padding, v.a. für Verein-Auswahl */
    border-radius: .375rem;
    border: 1px solid #d1d5db;
    font-size: .9rem;
    background: #ffffff;
}

/* Verein-Select und Teilnehmeralter  explizit etwas „größer“ */
.lg-verein-select, .lg-teilnehmer-alter {
    padding: .5rem .8rem !important;
    min-height: 40px;
    font-size: .9rem !important;
}

/* Fieldset optisch wie eine eigene Box */
.lg-fieldset {
    border: 1px solid #e2e2e2;
    border-radius: .75rem;
    padding: .75rem .9rem .9rem;
    margin-bottom: 1.25rem;
    background: #f9f9f9;
}
.lg-fieldset legend {
    font-size: .9rem;
    font-weight: 600;
    padding: 0 .75rem;
}

/* Teilnehmer-Zeilen */
.lg-teilnehmer-wrapper {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.lg-teilnehmer-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: stretch;
}

.lg-teilnehmer-row input,
.lg-teilnehmer-row select {
    flex: 1 1 140px;
    min-height: 40px;
}

/* Minus-Button kompakt wie ein Icon rechts */
.lg-remove-teilnehmer {
    flex: 0 0 30px;
    min-height: 20px;
    padding: 0;
    justify-content: center;
}

/* „Teilnehmer hinzufügen“ mit mehr Abstand nach oben, aber gleiche Optik */
.lg-add-teilnehmer {
    margin-top: 1rem !important;          /* mehr Luft zur Zeile */
}

/* letzte Formularzeile (Anmeldung absenden) zentrieren */
.lg-form .lg-form-row:last-child {
    text-align: center;
}

/* Sicherheitsnetz: alles im Formular linksbündig und gleiche Schriftgröße */
.lg-form,
.lg-form * {
    font-size: .9rem;
    text-align: left;
}
.lg-form .lg-form-row:last-child .lg-btn {
    text-align: center;
}

/* ================= Typo-Ausrichtung & -Größe angleichen ================= */

/* Basis-Schriftgröße für alles im Accordion-Body */
.lg-accordion-body,
.lg-accordion-body p,
.lg-accordion-body td,
.lg-accordion-body th,
.lg-accordion-body span,
.lg-accordion-body a,
.lg-accordion-body small {
    font-size: .9rem;
    line-height: 1.4;
    text-align: left;
}

/* Falls das Theme table td/th center forced: noch ein Hammer obendrauf */
.lg-accordion-body table td,
.lg-accordion-body table th {
    text-align: left !important;
}

/* ================= Responsive ================= */

@media (max-width: 768px) {
    .lg-accordion-header {
        grid-template-columns: 1fr;
        text-align: left;
        row-gap: .2rem;
    }

    .lg-table,
    .lg-table tbody,
    .lg-table tr,
    .lg-table th,
    .lg-table td {
        display: block;
        width: 100%;
    }

    .lg-table tr {
        margin-bottom: .75rem;
        border: 1px solid #e5e7eb;
        border-radius: .5rem;
        background: #f5f5f5;
        overflow: hidden;
    }

    .lg-table th {
        border-bottom: none;
        padding-bottom: .2rem;
        background: #f9fafb;
    }

    .lg-table td {
        border-bottom: none;
        padding-top: 0;
    }

    .lg-teilnehmer-row {
        flex-direction: column;
    }

    .lg-ref-item {
        flex-direction: row;
    }
}

/* -----------------------------------------
   Farben an das Seiten-Theme anpassen
----------------------------------------- */

/* Standard-Textfarbe – weiches Dunkelgrau */
.lg-lehrgangsliste,
.lg-accordion-body,
.lg-table td,
.lg-table th,
.lg-ref-text,
.lg-form label,
.lg-form input,
.lg-form select,
.lg-form textarea {
    color: #666 !important;
}
.lg-ref-text small {
	font-size:0.7rem;
}
/* Noch etwas helleres Grau für Meta-Infos */
.lg-ref-text small {
    color: #666;
}

/* Links dezenter */
.lg-accordion-body a {
    color: #b30000; /* dezentes Rot, wie im Screenshot */
    text-decoration: underline;
}
.lg-accordion-body a:hover {
    color: #800000;
}

/* Formular-Felder Text */
.lg-form input,
.lg-form select,
.lg-form textarea {
    color: #444 !important;
}

/* Placeholder in soft grey */
.lg-form input::placeholder,
.lg-form textarea::placeholder {
    color: #888;
}

.lg-heading-cat {
    margin: 2rem 0 .5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.lg-heading-year {
    margin: .5rem 0 .75rem;
    font-size: 1rem;
    font-weight: 700;
}
/* =========================================
   Kompaktere Überschriften & Jahrgänge
   ========================================= */

.lg-section-title {
    margin: 1rem 0 .5rem 0 !important;
    padding: 0;
}

.lg-year-title {
    margin: .5rem 0 .5rem 0 !important;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* Falls h2/h3 vom Theme zu große Abstände haben */
.lg-section-title,
.lg-year-title,
.lg-section-title h2,
.lg-year-title h3 {
    line-height: 1.2;
}

/* Optional: Abstand oberhalb der Liste reduzieren */
.lg-lehrgangsliste {
    margin-top: .5rem;
}