/*
css styles for single template of CPT sd_cpt_facilitator (Referent*in)

Same design tokens (identical values, not just names) as sd_program.css / sd_cpt_event.css -
lernort.siebenlinden.org's own CI (sage-green primary, not the main site's Sieben-Linden brand
green/orange), see sd_program.css's header comment for the full reasoning/sourcing. Same grey
page background + white card pattern as sd_cpt_event.css's .sd-event-page too, so all three
templates read as one consistent design.

@package SeminardeskPlugin
*/

/* tokens kept identical to sd_program.css/sd_cpt_event.css on purpose (same values, not just
   the same names) so the three templates read as one consistent design rather than three
   similar-looking ones - see sd_program.css's header comment for the CI sourcing. */
.sd-facilitator-page {
    --sd-primary: #7eb686;
    --sd-primary-dark: #5da467;
    --sd-secondary: #495057;
    --sd-secondary-dark: #383d42;
    --sd-success: #16a34a;
    --sd-danger: #c0392b;
    --sd-ink: #222;
    --sd-ink-muted: #495057;
    --sd-line: #dee2e6;
    --sd-bg: #fff;
    --sd-bg-muted: #f5f5f5;
    --sd-page-bg: #f0f0f0;

    --sd-space-xs: 0.5rem;
    --sd-space-sm: 1rem;
    --sd-space-md: 1.5rem;
    --sd-space-lg: 2rem;
    --sd-space-xl: 3rem;

    --sd-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
    /* same two radius steps as sd_program.css/sd_cpt_event.css: sm for controls, lg for cards */
    --sd-radius-sm: 0.25rem;
    --sd-radius-lg: 0.5rem;

    font-family: "Titillium Web", Titillium, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    color: var(--sd-ink);
    /* SeminarDesk free-text fields (bio, teaser, ...) sometimes contain a long unbroken run
       of characters (e.g. a "____" DE/EN divider) - without this it overflows the page width
       instead of wrapping like normal text does */
    overflow-wrap: break-word;

    /* full-width grey background, same pattern as sd_cpt_event.css's .sd-event-page - the
       card below is what carries the actual white content surface */
    background: var(--sd-page-bg);
    padding-bottom: var(--sd-space-xl);
}
.sd-facilitator-page-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--sd-space-md) var(--sd-space-md) 0;
}
/* consistent paragraph spacing for SeminarDesk's raw-HTML free text (bio, ...) across all
   three templates - see the matching rule in sd_cpt_event.css/sd_program.css */
.sd-facilitator-page p {
    margin-top: 0;
    margin-bottom: 1rem;
}
.sd-facilitator-card {
    display: block;
    background: var(--sd-bg);
    border-radius: var(--sd-radius-lg);
    box-shadow: var(--sd-shadow);
    padding: var(--sd-space-lg) var(--sd-space-lg) var(--sd-space-xl);
    margin-bottom: var(--sd-space-lg);
}
/* only shown when the HTTP referer resolves to a real sd_cpt_event post - see
   TemplateUtils::get_referring_event_url(). Same treatment as .sd-event-back-link on the
   event page. */
.sd-facilitator-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    margin-bottom: var(--sd-space-md);
    color: var(--sd-secondary);
    text-decoration: none;
    font-weight: 600;
}
.sd-facilitator-back-link:hover {
    text-decoration: underline;
}

.sd-facilitator-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.sd-facilitator-photo {
    display: block;
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
}
.sd-facilitator-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sd-facilitator-name {
    margin: 0;
    font-size: 1.6em;
    font-weight: 600;
    color: var(--sd-primary);
}

.sd-facilitator-bio {
    max-width: 60ch;
    line-height: 1.6;
    /* bios sometimes contain a long run of underscores/dashes as a DE/EN divider (no spaces
       in between, so the browser treats it as one unbreakable "word") - without this it
       overflows straight past max-width instead of wrapping like normal text does */
    overflow-wrap: break-word;
}
.sd-facilitator-bio a {
    color: var(--sd-primary);
    text-decoration: underline;
}
.sd-facilitator-bio a:hover {
    color: var(--sd-primary-dark);
}

.sd-facilitator-events-title {
    margin: var(--sd-space-lg) 0 var(--sd-space-sm) 0;
    font-size: 1.3em;
    font-weight: 600;
    color: var(--sd-primary);
}
.sd-facilitator-events-list {
    display: flex;
    flex-direction: column;
    gap: var(--sd-space-sm);
}
.sd-facilitator-event-row {
    display: grid;
    grid-template-columns: 11em 1fr;
    gap: 0.3em var(--sd-space-md);
    padding: var(--sd-space-sm) var(--sd-space-md);
    background: var(--sd-bg);
    border-radius: var(--sd-radius-lg);
    box-shadow: var(--sd-shadow);
}
.sd-facilitator-event-date {
    font-weight: 600;
    color: var(--sd-primary);
    text-decoration: none;
}
.sd-facilitator-event-date:hover {
    text-decoration: underline;
}
.sd-facilitator-event-title {
    margin: 0 0 0.3em 0;
    font-size: 1.1em;
    font-weight: 600;
}
.sd-facilitator-event-title a {
    color: var(--sd-ink);
    text-decoration: none;
}
.sd-facilitator-event-title a:hover {
    color: var(--sd-primary);
}
.sd-facilitator-event-teaser {
    margin: 0;
    color: var(--sd-ink-muted);
    font-size: 0.9em;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .sd-facilitator-event-row {
        grid-template-columns: 1fr;
    }
}

/* visible keyboard focus (WCAG 2.4.7) - see sd_program.css's header comment for why this is
   needed (the theme supplies no default outline for links/buttons) */
.sd-facilitator-page a:focus-visible {
    outline: 2px solid var(--sd-primary-dark);
    outline-offset: 2px;
}
