/* VolunteerSpace frontend — neutral, theme-friendly base styling. */

.vspace {
    margin: 1.5em 0;
}

.vspace-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    margin: 1em 0 1.5em;
}

.vspace-nav-item {
    padding: .5em 1em;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid currentColor;
    line-height: 1.2;
}

.vspace-nav-item.is-current {
    font-weight: 700;
}

.vspace-greeting {
    margin-bottom: .25em;
}

.vspace-fields {
    width: 100%;
    border-collapse: collapse;
    margin: .5em 0 1em;
}

.vspace-fields th,
.vspace-fields td {
    text-align: left;
    vertical-align: top;
    padding: .5em .75em;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.vspace-fields th {
    width: 40%;
    font-weight: 600;
}

.vspace-card {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 8px;
    padding: 1em 1.25em;
    margin-bottom: 1em;
}

.vspace-card h3 {
    margin-top: 0;
}

.vspace-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    flex-wrap: wrap;
}

.vspace-print {
    cursor: pointer;
    padding: .5em 1em;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: transparent;
}

.vspace-empty {
    opacity: .6;
}

.vspace-notice {
    padding: 1em 1.25em;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 8px;
    background: rgba(0, 0, 0, .03);
}

.vspace-error {
    border-left: 4px solid #d63638;
}

.vspace-briefing {
    margin-top: 1.5em;
}

.vspace-video iframe,
.vspace-video video {
    max-width: 100%;
}

/* Print: only the assignment content, no navigation/buttons. */
@media print {
    .vspace-nav,
    .vspace-print,
    .vspace-briefing {
        display: none !important;
    }
}

/* =====================================================================
 * Portal — single mobile-first one-pager. All rules scoped to
 * .vspace-portal so existing shortcodes are untouched. Mobile-first:
 * the base styles target small screens; the 768px breakpoint enhances.
 * Colors stay neutral/inheritable (currentColor + translucent black).
 * ===================================================================== */

.vspace-portal {
    margin: 1em auto;
    line-height: 1.5;
}

.vspace-portal-header {
    margin: 0 0 1rem;
}

.vspace-portal-actions {
    margin: .75rem 0 0;
}

/* "Aktualisieren": a link, styled as a pill so it reads as an action and keeps
 * a 44px touch target. */
.vspace-refresh {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem 1rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1.2;
}

.vspace-refresh:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* A shift and its briefing link. Stacks on narrow screens so the long link text
 * never pushes the time out of view. */
.vspace-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .75rem;
    padding: .25rem 0;
}

.vspace-slot-time {
    font-variant-numeric: tabular-nums;
}

.vspace-briefing-link {
    font-size: .9em;
}

.vspace-portal .vspace-greeting {
    margin: 0 0 .25rem;
    font-size: 1.6rem;
    line-height: 1.2;
}

.vspace-portal-subtitle {
    margin: 0;
    opacity: .75;
}

.vspace-portal-section {
    margin: 0 0 2rem;
}

.vspace-portal-section > h2 {
    margin: 0 0 .75rem;
    font-size: 1.25rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
}

/* Cards: subtle border/radius/shadow, comfortable tap spacing. */
.vspace-portal .vspace-card {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    background: rgba(0, 0, 0, .015);
}

.vspace-portal .vspace-card h3 {
    margin-top: 0;
}

/* Ensure inline links (supervisor phone/mail, contact) stay easy to tap
 * without inflating the line box or breaking baseline alignment. */
.vspace-portal .vspace-card a {
    display: inline-block;
    padding-block: .35rem;
}

.vspace-portal .vspace-toolbar .vspace-print {
    min-height: 44px;
}

/* --- >=768px: wider centered container, two-column profile. --- */
@media (min-width: 768px) {
    .vspace-portal {
        max-width: 780px;
    }

    /* Profile fields side-by-side in two columns on larger screens. */
    .vspace-portal #vsp-profil .vspace-fields tbody {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 1.5rem;
    }

    .vspace-portal #vsp-profil .vspace-fields tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
    }

    .vspace-portal #vsp-profil .vspace-fields th,
    .vspace-portal #vsp-profil .vspace-fields td {
        width: auto;
        border-bottom: 0;
        padding: .35rem 0;
    }

    .vspace-portal #vsp-profil .vspace-fields th {
        opacity: .7;
        font-weight: 600;
    }
}

/* Print: the refresh action is meaningless on paper. */
@media print {
    .vspace-portal-actions {
        display: none !important;
    }
}
