:root {
    --tp-pink: #ff4cc2;
    --tp-blue: #00119f;
}

body {
    background-color: var(--bs-body-bg);
}

main {
    padding-bottom: 3rem;
}

.navbar {
    background-color: var(--bs-body-bg) !important;
}

.navbar-brand {
    font-weight: 600;
    color: var(--tp-blue);
}

.clickable {
    cursor: pointer;
}

.pre-wrap {
    white-space: pre-wrap;
}

/* Login */

.login-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 24rem;
}

/* Member list */

/* Lists: title, search, filter and actions in one row, table without
   frame. */

.list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-box {
    flex: 0 1 16rem;
}

.status-select {
    width: auto;
}

@media (max-width: 575.98px) {
    /* Phones: search and filter in a line below title and buttons. */
    .list-header .search-box {
        order: 1;
        flex: 1 1 40%;
    }

    .list-header .status-select {
        order: 2;
        flex: 0 0 auto;
    }
}

.list-table thead th {
    border-bottom-color: var(--bs-border-color);
    font-weight: 600;
}

.list-table tbody tr:last-child td {
    border-bottom: 0;
}

.members-table thead th {
    white-space: nowrap;
}

.member-link {
    font-weight: 500;
    color: inherit;
    text-decoration: none;
}

.sort-header button {
    border: 0;
    padding: 0;
    background: none;
    font-weight: inherit;
    color: inherit;
}

.role-badge-participant {
    background-color: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.role-badge-trainer {
    background-color: var(--tp-pink);
    color: white;
}

.role-badge-team {
    background-color: var(--tp-blue);
    color: white;
}

.role-badge-waitlisted {
    background-color: #dfe3ff;
    color: var(--tp-blue);
}

/* Small popup opening on hover or tap/focus of its anchor - e.g. the "…"
   after a member's main course, or the info icon for "Besonderheiten". */

.popup-anchor {
    position: relative;
    display: inline-block;
    cursor: default;
}

.popup-content {
    display: none;
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    width: max-content;
    max-width: 18rem;
    margin-top: 0.25rem;
    padding: 0.4rem 0.6rem;
    text-align: left;
    white-space: normal;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow-sm);
}

/* For anchors near the right edge. */
.popup-content.popup-end {
    left: auto;
    right: 0;
}

.popup-anchor:hover .popup-content,
.popup-anchor:focus .popup-content {
    display: block;
}

.more-courses {
    margin-left: 0.25rem;
}

.more-courses-toggle {
    padding: 0 0.4rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-pill);
    background-color: var(--bs-body-bg);
    font-weight: 600;
}

/* Member details */

.member-page .card-header {
    font-weight: 600;
}

.member-page dt {
    font-weight: normal;
    color: var(--bs-secondary-color);
}

.consent-list li + li {
    margin-top: 0.5rem;
}

.consent-list .bi {
    margin-right: 0.4rem;
}

.contact-row {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

@media (min-width: 768px) {
    /* Align the remove button with the inputs, below their labels. */
    .contact-remove {
        padding-top: 1.85rem;
    }
}

.edit-actions {
    position: sticky;
    bottom: 0;
    padding: 0.75rem 0;
    background-color: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
}
