/* helfer-schichten.css – Theme-kompatibles Layout-Styling für das Helfer-Schichten-Plugin.
 * Nutzt CSS Custom Properties / inherit für maximale Theme-Kompatibilität.
 * Keine eigenen Fonts, keine festen Farben – alles wird vererbt oder über Fallbacks gesteuert.
 */

/* ── Container ──────────────────────────────────────────────────── */
.hs-container {
    font-family: inherit;
    color: inherit;
    line-height: 1.6;
    max-width: 960px;
    margin: 0 auto;
}

/* ── Event-Header ───────────────────────────────────────────────── */
.hs-event-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 2px solid currentColor;
    opacity: 0.9;
}

.hs-event-name {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 0.25em;
}

.hs-event-dates {
    font-size: 0.95em;
    opacity: 0.7;
    margin: 0;
}

/* ── Sections ───────────────────────────────────────────────────── */
.hs-section {
    margin-bottom: 2em;
}

.hs-section-name {
    font-size: 1.25em;
    font-weight: 600;
    margin: 0 0 0.75em;
    padding-bottom: 0.4em;
    border-bottom: 1px solid currentColor;
    opacity: 0.8;
}

/* ── Jobs (Akkordeon) ───────────────────────────────────────────── */
.hs-job {
    margin-bottom: 1em;
    border: 1px solid rgba(128, 128, 128, 0.25);
    border-radius: 6px;
    overflow: hidden;
}

.hs-job[open] {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hs-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75em 1em;
    cursor: pointer;
    font-weight: 600;
    background: rgba(128, 128, 128, 0.06);
    list-style: none;
}

.hs-job-header::-webkit-details-marker {
    display: none;
}

.hs-job-header::before {
    content: '▸';
    margin-right: 0.5em;
    transition: transform 0.2s ease;
    display: inline-block;
}

.hs-job[open] > .hs-job-header::before {
    transform: rotate(90deg);
}

.hs-job-name {
    flex: 1;
}

/* ── Badges ─────────────────────────────────────────────────────── */
.hs-badge {
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.25em 0.6em;
    border-radius: 4px;
    white-space: nowrap;
}

.hs-badge--open {
    background: #16a34a;
    color: #fff;
}

.hs-badge--full {
    background: rgba(128, 128, 128, 0.2);
    color: inherit;
    opacity: 0.6;
}

/* ── Job-Body ───────────────────────────────────────────────────── */
.hs-job-body {
    padding: 1em;
}

.hs-job-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1em;
}

.hs-job-teaser {
    font-size: 1em;
    font-weight: 500;
    margin: 0 0 0.5em;
}

.hs-job-description {
    font-size: 0.95em;
    opacity: 0.85;
    margin-bottom: 0.75em;
}

/* Markdown-Inhalt (Aufgabenbeschreibung) */
.hs-markdown h1,
.hs-markdown h2,
.hs-markdown h3,
.hs-markdown h4,
.hs-markdown h5,
.hs-markdown h6 {
    font-weight: 600;
    margin: 1em 0 0.5em;
    line-height: 1.3;
}

.hs-markdown h1 { font-size: 1.35em; }
.hs-markdown h2 { font-size: 1.2em; }
.hs-markdown h3 { font-size: 1.1em; }

.hs-markdown p {
    margin: 0 0 0.75em;
}

.hs-markdown p:last-child {
    margin-bottom: 0;
}

.hs-markdown ul,
.hs-markdown ol {
    margin: 0 0 0.75em;
    padding-left: 1.5em;
}

.hs-markdown li {
    margin-bottom: 0.25em;
}

.hs-markdown a {
    color: inherit;
    text-decoration: underline;
}

.hs-markdown blockquote {
    margin: 0 0 0.75em;
    padding-left: 1em;
    border-left: 3px solid rgba(128, 128, 128, 0.35);
    opacity: 0.9;
}

.hs-markdown code {
    font-family: inherit;
    font-size: 0.9em;
    padding: 0.15em 0.35em;
    border-radius: 3px;
    background: rgba(128, 128, 128, 0.12);
}

.hs-markdown pre {
    margin: 0 0 0.75em;
    padding: 0.75em;
    border-radius: 4px;
    background: rgba(128, 128, 128, 0.08);
    overflow-x: auto;
}

.hs-markdown pre code {
    padding: 0;
    background: none;
}

.hs-job-location {
    font-size: 0.9em;
    opacity: 0.7;
    margin-bottom: 1em;
}

/* ── Tages-Gruppierung ──────────────────────────────────────────── */
.hs-shifts {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

.hs-day-heading {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 0.5em;
    opacity: 0.85;
}

/* ── Schichten-Tabelle ──────────────────────────────────────────── */
.hs-shifts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.hs-shifts-table th,
.hs-shifts-table td {
    text-align: left;
    padding: 0.5em 0.75em;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
    vertical-align: top;
}

.hs-shifts-table th {
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.6;
}

/* ── Schicht-Status ─────────────────────────────────────────────── */
.hs-shift--booked {
    opacity: 0.45;
}

.hs-slots--available {
    color: #16a34a;
    font-weight: 600;
}

.hs-slots--full {
    opacity: 0.6;
    font-style: italic;
}

.hs-booked-hint {
    opacity: 0.5;
    font-style: italic;
    font-size: 0.9em;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.hs-btn {
    display: inline-block;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s ease;
    line-height: 1.4;
}

.hs-btn:hover {
    opacity: 0.85;
}

.hs-btn--primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.hs-btn--secondary {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    opacity: 0.7;
    margin-left: 0.4em;
}

.hs-btn--small {
    font-size: 0.8em;
    padding: 0.3em 0.6em;
    margin-top: 0.5em;
    background: rgba(128, 128, 128, 0.12);
    color: inherit;
    border: 1px solid rgba(128, 128, 128, 0.25);
}

/* ── E-Mail-Box ─────────────────────────────────────────────────── */
.hs-email-box {
    margin-top: 0.75em;
    padding: 0.75em;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 4px;
    background: rgba(128, 128, 128, 0.04);
}

.hs-email-instruction {
    font-size: 0.85em;
    margin: 0 0 0.5em;
    opacity: 0.8;
}

.hs-email-text {
    width: 100%;
    font-family: inherit;
    font-size: 0.85em;
    padding: 0.5em;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    resize: vertical;
    box-sizing: border-box;
}

/* ── Utilities ──────────────────────────────────────────────────── */
.hs-hidden {
    display: none !important;
}

.hs-empty {
    text-align: center;
    opacity: 0.6;
    padding: 2em 0;
    font-style: italic;
}

.hs-error {
    color: #dc2626;
    font-weight: 600;
    padding: 1em;
    border: 1px solid #dc2626;
    border-radius: 4px;
    background: rgba(220, 38, 38, 0.05);
}

/* ── Shift-Aktionen (Buttons stacked auf kleinen Screens) ─────── */
.hs-shift-actions {
    min-width: 140px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .hs-shifts-table,
    .hs-shifts-table thead,
    .hs-shifts-table tbody,
    .hs-shifts-table th,
    .hs-shifts-table td,
    .hs-shifts-table tr {
        display: block;
    }

    .hs-shifts-table thead {
        display: none;
    }

    .hs-shifts-table tr {
        margin-bottom: 1em;
        border: 1px solid rgba(128, 128, 128, 0.15);
        border-radius: 4px;
        padding: 0.5em;
    }

    .hs-shifts-table td {
        border-bottom: none;
        padding: 0.3em 0.5em;
    }

    .hs-shifts-table td::before {
        font-weight: 600;
        font-size: 0.8em;
        text-transform: uppercase;
        display: block;
        opacity: 0.5;
        margin-bottom: 0.15em;
    }

    .hs-shift-name::before { content: 'Schicht'; }
    .hs-shift-time::before { content: 'Uhrzeit'; }
    .hs-shift-slots::before { content: 'Plätze'; }
    .hs-shift-actions::before { content: 'Aktionen'; }
}

.hs-age-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35em;
    padding: 0.1em 0.45em;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: middle;
    color: #fff;
    background: #8a3b12;
    border: 1px solid rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}
