:root {
    --grundee-green: #54A300;
    /* WCAG AA (4.5:1): the bright green is a fill with dark text on it (5.8:1, as on the landing pages); green
       text and outlines on white or the soft green use the deeper shade (5.3:1 on white, 4.7:1 on #e9f5db). */
    --grundee-green-text: #3d7a00;
    --grundee-on-green: #0d1608;
    --grundee-green-fill-hover: #62b80a; /* hover of the green fill, keeps the dark text at 7:1 */
    --grundee-dark: #2c3e50;
    --grundee-light: #f8f9fa;
    --grundee-accent: #e9f5db;
    --bs-link-color: #3d7a00;
    --bs-link-color-rgb: 61, 122, 0;
    --bs-link-hover-color: #2f5f00;
    --bs-link-hover-color-rgb: 47, 95, 0;
    --bs-nav-pills-link-active-bg: #54A300;
    --bs-primary-bg-subtle: #e9f5db;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--grundee-light);
    color: var(--grundee-dark);
    /* viewport-fit=cover (base.html): keep content off the notch when a phone is held sideways */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

a {
    color: var(--grundee-dark);
    text-decoration: none;
}

a:hover {
    color: var(--grundee-green-text);
}

/* Form Controls */
.form-check-input:checked {
    background-color: var(--grundee-green) !important;
    border-color: var(--grundee-green) !important;
}

.form-check-input:focus {
    border-color: var(--grundee-green) !important;
    box-shadow: 0 0 0 0.25rem rgba(84, 163, 0, 0.25) !important;
}

/* Navbar */
.navbar-grundee {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn-grundee {
    background-color: var(--grundee-green);
    color: var(--grundee-on-green);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-grundee:hover,
.btn-grundee:focus-visible,
.btn-grundee:active {
    background-color: var(--grundee-green-fill-hover);
    color: var(--grundee-on-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 163, 0, 0.3);
}

.btn-outline-grundee {
    border: 2px solid var(--grundee-green-text);
    color: var(--grundee-green-text);
    font-weight: 600;
    border-radius: 8px;
}

.btn-outline-grundee:hover,
.btn-outline-grundee:focus-visible,
.btn-outline-grundee:active,
.btn-outline-grundee.active,
.btn-check:checked + .btn-outline-grundee {
    background-color: var(--grundee-green);
    border-color: var(--grundee-green);
    color: var(--grundee-on-green);
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1;
    border-radius: 0.2rem;
}

.btn-light {
    padding: 0.6rem 1.2rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(84, 163, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilities */
.text-grundee {
    color: var(--grundee-green-text) !important;
}

/* Text on the green fill is dark, also where a template still says text-white / text-light */
.bg-grundee,
.bg-grundee.text-white,
.bg-grundee.text-light {
    background-color: var(--grundee-green) !important;
    color: var(--grundee-on-green) !important;
}

.bg-grundee-soft {
    background-color: var(--grundee-accent) !important;
}

.border-grundee {
    border-color: var(--grundee-accent) !important;
}

/* Section Titles */
.section-title {
    color: #2c3e50;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 10px;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.icon-square {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.hover-bg-light:hover {
    background-color: #f8f9fa;
    border-color: #54A300 !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Bootstrap 5.3 only ships opacity-0/25/50/75/100; templates use opacity-10 for faint
   background icons and dividers (e.g. events/components/event_card.html). */
.opacity-10 {
    opacity: .1 !important;
}

/* A tournament match in the upcoming-events carousel (events/components/match_card.html): the calendars' gold
   (css/gcal.css), dark text on the light fill */
.match-card { box-shadow: inset 4px 0 0 #c98a00; }
.match-card__kind {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px;
    background: #fdf3d6; color: #5c4100; font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.04em;
}

.transition-all {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.bg-success-subtle {
    background-color: #d1e7dd;
}

.text-success {
    color: #146c43;
}

.bg-danger-subtle {
    background-color: #f8d7da;
}

.text-danger {
    color: #b02a37;
}

.bg-warning-subtle {
    background-color: #fff3cd;
}

.text-warning-emphasis {
    color: #664d03;
}

/* RSVP Button Styles */
.btn-rsvp {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.btn-rsvp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.btn-rsvp-yes {
    background-color: #fff;
    border-color: #198754;
    color: #198754;
}

.btn-rsvp-yes:hover {
    background-color: #d1e7dd;
    border-color: #146c43;
    color: #146c43;
}

.btn-rsvp-yes.active {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.btn-rsvp-no {
    background-color: #fff;
    border-color: #dc3545;
    color: #dc3545;
}

.btn-rsvp-no:hover {
    background-color: #f8d7da;
    border-color: #b02a37;
    color: #b02a37;
}

.btn-rsvp-no.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-rsvp-maybe {
    background-color: #fff;
    border-color: #ffc107;
    color: #997404;
}

.btn-rsvp-maybe:hover {
    background-color: #fff3cd;
    border-color: #997404;
    color: #664d03;
}

.btn-rsvp-maybe.active {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.reason-field {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effect for links */
.hover-text-grundee:hover {
    color: var(--grundee-green-text) !important;
}

/* Messages Container - Bottom Overlay */
.messages-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 600px;
    pointer-events: none;
}

.message-toast {
    pointer-events: auto;
    margin-bottom: 1rem;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: slideInUp 0.4s ease-out;
}

.message-toast.fade.show {
    opacity: 1;
}

.message-toast.fade:not(.show) {
    animation: fadeOutDown 0.3s ease-out;
}

/* Message Toast Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(50px);
    }
}

/* Enhanced alert styles for overlay */
.message-toast.alert-success {
    background-color: #d1e7dd;
    border-left: 4px solid #198754;
    color: #0f5132;
}

.message-toast.alert-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #842029;
}

.message-toast.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #664d03;
}

.message-toast.alert-info {
    background-color: #cff4fc;
    border-left: 4px solid #0dcaf0;
    color: #055160;
}


/* Heatmap */
.heatmap-grid {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 2px;
    font-family: monospace;
}

.heatmap-cell {
    background-color: var(--grundee-green);
    border-radius: 2px;
    transition: all 0.1s;
    cursor: pointer;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.5);
    z-index: 10;
    border: 1px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.heatmap-label {
    font-size: 0.7rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5px;
    font-weight: bold;
}

.heatmap-header {
    font-size: 0.8rem;
    text-align: center;
    color: #6c757d;
    margin-bottom: 2px;
    font-weight: bold;
}


/* Option Card Styles */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.option-card {
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
    height: 100%;
    border-radius: 16px;
}

.option-card:hover {
    border-color: #54A300;
    box-shadow: 0 4px 12px rgba(84, 163, 0, 0.15);
}

.option-card.selected {
    border-color: #54A300;
    background-color: #f0f9ff;
    box-shadow: 0 4px 12px rgba(84, 163, 0, 0.2);
}

.option-card .icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background-color: var(--bg-light);
    color: var(--text-muted);
}

.option-card .icon-circle i {
    color: #666;
    transition: all 0.2s ease;
}

.option-card.selected .icon-circle {
    background-color: #54A300 !important;
    color: white !important;
}

.option-card.selected .icon-circle i {
    color: white;
}

/* Captain Profile Section Enhancement */
.captain-profile-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #54A300;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.captain-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.captain-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #54A300 0%, #468a00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Horizontal Rule with Text */
.hr-text {
    line-height: 1em;
    position: relative;
    outline: 0;
    border: 0;
    color: black;
    text-align: center;
    height: 1.5em;
    opacity: 0.5;
}

.hr-text:before {
    content: '';
    background: linear-gradient(to right, transparent, #818078, transparent);
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
}

.hr-text:after {
    content: attr(data-content);
    position: relative;
    display: inline-block;
    color: black;
    padding: 0 .5em;
    line-height: 1.5em;
    background-color: #fff;
}


/* Activity icon styling */
.activity-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 4px;
}



/* Filters */
.filter-fab {
    position: fixed;
    bottom: calc(85px + env(safe-area-inset-bottom));
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--grundee-green);
    color: white;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-fab:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(84, 163, 0, 0.3);
}

.filter-fab:active {
    transform: translateY(0) scale(0.95);
}

.filter-fab i {
    font-size: 1.5rem;
}

.active-filters-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 0.875rem;
    margin: 0rem 0.25rem;
}

.active-filters-chip .badge {
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .filter-fab {
        display: none;
    }
}


/* Quill Editor */
.ql-editor {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    font-family: inherit;
    background: white;
}

.ql-toolbar {
    background: #f8f9fa;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding-bottom: 0.5rem;
}

/* Modern Action Styles */
.action-pill {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #f8f9fa;
    color: var(--grundee-green-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-pill:hover {
    background: #54A300;
    color: var(--grundee-on-green);
    border-color: #54A300;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(84, 163, 0, 0.2);
}

.action-link {
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.action-link i {
    transition: transform 0.2s ease;
}

.action-link:hover {
    color: #3d7500 !important;
}

.action-link:hover i {
    transform: translateX(4px);
}

.action-link-danger {
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    color: var(--bs-danger);
}

.action-link-danger:hover {
    color: var(--bs-danger) !important;
}

.action-link-danger i {
    transition: transform 0.2s ease;
}

.action-link-danger:hover i {
    transform: translateX(4px);
}


.expandable-container {
    position: relative;
}

.toggle-content {
    transition: max-height 0.4s ease-in-out;
}

.toggle-content.hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0 !important;
    pointer-events: none;
    max-height: 0 !important;
    overflow: hidden;
}

.toggle-content.visible {
    position: relative;
    opacity: 1 !important;
    transform: translateY(0);
    max-height: 2000px;
}

/* Bootstrap-select Customization */
.bootstrap-select .dropdown-toggle {
    height: auto !important;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.bootstrap-select .filter-option-inner-inner {
    height: auto !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

/* Team Card Premium Enhancements */
.team-card {
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-card-banner-wrapper {
    position: relative;
    height: 140px;
    width: 100%;
    background-color: #f0f2f5;
    overflow: hidden;
}

.team-card-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.team-card:hover .team-card-banner {
    transform: scale(1.08);
}

.team-card-price-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
}

/* The user's role in the team (teams/roles.py), top right of the card: one colour and icon per role */
.team-role-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    font-size: 1rem;
    cursor: default;
}

.team-role-badge__letter {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
}

.team-role-badge__count {
    position: absolute;
    right: -6px;
    bottom: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #17211a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.team-role-badge--coach { background: #1d4ed8; color: #fff; }
.team-role-badge--assistant_coach { background: #dbeafe; color: #1e40af; }
/* The captain's armband: a "C" */
.team-role-badge--captain { background: #f5b301; color: #2b1d00; }
.team-role-badge--club_manager { background: #6d28d9; color: #fff; }
.team-role-badge--club_staff { background: #ede9fe; color: #5b21b6; }
.team-role-badge--player { background: var(--grundee-green); color: var(--grundee-on-green); }
.team-role-badge--players { background: #0f766e; color: #fff; }

/* Team page: where the team plays (templates/teams/components/team_places.html), the header's main place */
.team-where {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--grundee-accent);
    font-weight: 600;
    color: var(--grundee-green-text);
    text-decoration: none;
}

.team-where:hover,
.team-where:focus-visible {
    text-decoration: underline;
}

.team-places__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.team-places__title .fa-map-location-dot {
    color: var(--grundee-green-text);
}

.team-places__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-place-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e1e6dc;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(23, 33, 26, 0.05);
}

.team-place-card.is-main {
    border-color: var(--grundee-green);
    box-shadow: 0 0 0 3px var(--grundee-accent);
}

.team-place-card__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eceee8;
    color: #4d574f;
}

.team-place-card.is-main .team-place-card__icon {
    background: var(--grundee-green);
    color: var(--grundee-on-green);
}

.team-place-card__text {
    flex: 1;
    min-width: 0;
}

.team-place-card__text p {
    margin: 0;
}

.team-place-card__name {
    overflow: hidden;
    font-weight: 700;
    color: #17211a;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-place-card__line {
    font-size: 0.85rem;
    color: #5f6b62;
}

.team-place-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px !important;
}

.team-place-card__tag {
    padding: 1px 8px;
    border-radius: 999px;
    background: #eceee8;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4d574f;
}

.team-place-card__tag--main {
    background: var(--grundee-accent);
    color: var(--grundee-green-text);
}

.team-place-card__map {
    display: inline-flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--grundee-green-text);
    text-decoration: none;
}

.team-place-card__map:hover,
.team-place-card__map:focus-visible {
    background: var(--grundee-accent);
}

/* Dashboard: a club the user runs that has no team yet (templates/teams/dashboard.html) */
.club-no-teams {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    padding: 1.25rem 1.5rem;
    border: 2px dashed #cfd8c8;
    border-radius: 18px;
    background: #fff;
}

.club-no-teams__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--grundee-accent);
    color: var(--grundee-green-text);
    font-size: 1.4rem;
}

.club-no-teams__text {
    flex: 1 1 260px;
    min-width: 0;
}

.club-no-teams__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 575.98px) {
    .club-no-teams__actions,
    .club-no-teams__actions .btn {
        width: 100%;
    }
}

/* Dashboard: someone with no team or club yet sees the three steps to a first game (templates/teams/dashboard.html).
   Phones: a column of steps joined by a dashed line; from md: three across, joined left to right. */
.teams-start {
    padding: 1.5rem;
    border: 2px dashed #cfd8c8;
    border-radius: 18px;
    background: #fff;
}

.teams-start__head {
    margin-bottom: 1.5rem;
}

.teams-start__steps {
    display: grid;
    gap: 1.25rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.teams-start__step {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 1rem;
    align-items: start;
}

.teams-start__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 72px;
    bottom: calc(-1.25rem + 8px);
    left: 31px;
    border-left: 2px dashed #cfd8c8;
}

.teams-start__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--grundee-accent);
    color: var(--grundee-green-text);
    font-size: 1.5rem;
}

.teams-start__num {
    position: absolute;
    top: -4px;
    right: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--grundee-green);
    color: var(--grundee-on-green);
    font-size: 0.75rem;
    font-weight: 700;
}

.teams-start__title {
    margin: 0.25rem 0;
    font-size: 1rem;
    font-weight: 700;
}

.teams-start__text {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.teams-start__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .teams-start {
        padding: 2rem;
    }

    .teams-start__head {
        text-align: center;
    }

    .teams-start__steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .teams-start__step {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .teams-start__icon {
        margin-bottom: 0.5rem;
    }

    /* From this step's icon to the next one's: the next centre is half a step plus the gap away */
    .teams-start__step:not(:last-child)::after {
        top: 31px;
        bottom: auto;
        left: calc(50% + 44px);
        right: calc(-50% - 1.5rem + 44px);
        border-left: 0;
        border-top: 2px dashed #cfd8c8;
    }
}

@media (max-width: 575.98px) {
    .teams-start {
        padding: 1.25rem;
    }

    .teams-start__actions,
    .teams-start__actions .btn {
        width: 100%;
    }
}

.team-card-badge-wrapper {
    position: absolute;
    top: 90px;
    left: 1.5rem;
    z-index: 6;
}

.team-card .card-body {
    padding-top: 30px !important;
    /* Offset for badge */
    display: flex;
    flex-direction: column;
    height: auto;
    flex-grow: 1;
}

.team-card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.text-city {
    color: #6c757d;
    font-weight: 500;
}

/* Team Detail Banner Hero */
.team-detail-banner-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
    background-color: #f0f2f5;
    overflow: hidden;
    margin-bottom: -100px;
    /* Overlap content */
}

.team-detail-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* An uploaded banner gets more room (about 1.5:5, the placeholder keeps the short strip) */
.team-detail-banner-wrapper--uploaded {
    height: auto;
    aspect-ratio: 10 / 3;
    min-height: 300px;
    max-height: 600px;
}

.team-detail-hero {
    position: relative;
    z-index: 10;
}

.team-header-content {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.team-header-info {
    flex-grow: 1;
}

@media (max-width: 991.98px) {
    .team-detail-banner-wrapper {
        height: 200px;
    }

    .team-detail-banner-wrapper--uploaded {
        height: auto;
        min-height: 200px;
    }

    .team-header-content {
        padding: 1.5rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .team-detail-badge-wrapper {
        margin-top: -80px;
    }
}


/* Badges */
.player-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.badge-activity,
.badge-payment,
.badge-amenity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50rem;
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--grundee-light);
    color: var(--grundee-green-text);
    border: 1px solid rgba(84, 163, 0, 0.1);
    margin-bottom: 0.5rem;
}

.badge-payment,
.badge-amenity {
    background: #f8f9fa;
    color: #495057;
    border-color: #e9ecef;
}




/* SHARE MODAL */
.share-modal-content {
    border-radius: 24px;
    overflow: hidden;
}

/* Full screen on phones only as a modal: the same card is a page section on the share, open-game and invite pages,
   where a fixed screen height cut its content off. */
@media (max-width: 575.98px) {
    .share-modal-content {
        border-radius: 0;
    }
    .modal .share-modal-content {
        height: 100vh;
    }
}

.share-entity-badge-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.share-entity-badge {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid #fff;
}

.share-entity-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 4px solid #fff;
}

.share-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #ced4da;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.share-divider::before,
.share-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #f1f3f5;
}

.share-divider:not(:empty)::before {
    margin-right: 1.5rem;
}

.share-divider:not(:empty)::after {
    margin-left: 1.5rem;
}

.qr-card {
    text-align: center;
}

.qr-title {
    font-weight: 800;
    color: #1a1a1a;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.qr-image-wrapper {
    background: #fff;
    padding: 1rem;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid #f1f3f5;
    margin-bottom: 0.5rem;
    width: 100%;
    max-width: 320px;
}

.qr-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.qr-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #adb5bd;
    font-weight: 500;
}

.qr-footer img {
    height: 14px;
}

.share-action-btn {
    border-radius: 16px !important;
    padding: 1rem 1.5rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-outline-grundee.share-action-btn:hover {
    background-color: #54A300;
    color: var(--grundee-on-green);
    transform: scale(1.02);
}

/* Compact share-to-app buttons (icon over label) in a row of three:
   teams/components/invite_link_share.html */
.share-action-btn.share-channel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.85rem 0.25rem !important;
    font-size: 0.85rem;
}

.share-channel-btn i {
    font-size: 1.5rem;
}


/* QUill */

.quill-accordion-content h1 {
    font-size: 20px;
    font-weight: bold;
}

.quill-accordion-content h2 {
    font-size: 18px;
    font-weight: bold;
}

.quill-accordion-content h3 {
    font-size: 16px;
    font-weight: bold;
}

.quill-accordion-content h4 {
    font-size: 14px;
    font-weight: bold;
}

.quill-accordion-content h5 {
    font-size: 12px;
    font-weight: bold;
}

.quill-accordion-content h6 {
    font-size: 10px;
    font-weight: bold;
}

.quill-accordion-content p {
    margin-bottom: 0;
}

.quill-accordion-content ul {
    margin-bottom: 0;
}

/* A Quill tartalmát befogadó konténeren belül */
.quill-accordion-content ol {
    list-style-type: none;
    counter-reset: main-list-counter;
    /* Létrehozunk egy saját számlálót */
    padding-left: 0;
    margin-bottom: 0;
}

/* A fő lista elemei (nincs indent osztályuk) */
.quill-accordion-content ol li:not([class*="ql-indent"]) {
    counter-increment: main-list-counter;
    margin-bottom: 8px;
}

.quill-accordion-content ol li:not([class*="ql-indent"])::before {
    content: counter(main-list-counter) ". ";
    color: var(--grundee-green-text);
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 8px;
    min-width: 20px;
}

/* A behúzott (indent-1) elemek formázása */
.quill-accordion-content ol li.ql-indent-1 {
    padding-left: 30px;
    /* Behúzás mértéke */
    margin-top: 4px;
}

.quill-accordion-content ol li.ql-indent-1::before {
    content: "➔";
    /* Itt adhatod meg a nyilat */
    margin-right: 10px;
    color: var(--grundee-green-text);
    /* Opcionális: szín a nyílnak */
}

.quill-accordion-content a {
    color: var(--grundee-green-text);
}

.quill-accordion-content table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
}

.quill-accordion-content table td,
.quill-accordion-content table th {
    border: 1px solid #ddd;
    padding: 8px;
}

.quill-accordion-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.quill-accordion-content img {
    display: block;
    max-width: 100%;
    height: auto;
}

.quill-content img {
    display: block;
    max-width: 100%;
    height: auto;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    color: var(--grundee-green-text);
    background-color: #fff;
}

/* Timer Animations */
@keyframes pulse-text {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-text {
    animation: pulse-text 1.5s infinite ease-in-out;
    display: inline-block;
}

.countdown-item {
    min-width: 45px;
}

.deadline-timer-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.countdown-divider {
    margin-top: -12px;
    opacity: 0.5;
}

/* Elevate the offcanvas element securely above the standard backdrop mask */
#mobileExploreDrawer.offcanvas-bottom {
    z-index: 1055 !important; /* Bootstrap defaults backdrops to 1040, modals to 1055 */
}

/* Ensure the background overlay doesn't block interactions if active */
.offcanvas-backdrop {
    z-index: 1050 !important;
}

/* Ensure the inner body clears the mobile navigation height and forces element visibility */
#mobileExploreDrawer .offcanvas-body {
    padding-bottom: calc(75px + 1.5rem) !important; 
    position: relative;
    z-index: 2;
    pointer-events: auto !important; /* Forces the browser to register clicks directly on links */
}
/* Custom Mobile Drawer Configurations */
.custom-mobile-drawer.offcanvas-bottom {
    height: auto !important;
    max-height: 80vh !important;
    z-index: 1055 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Rounded corners setup */
.rounded-top-5 {
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
}

/* iOS Native Drag Handle */
.drawer-drag-handle {
    width: 40px;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin: 10px auto 0 auto;
}

/* Glassmorphism Header */
.custom-mobile-drawer .offcanvas-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Close indicator styling */
.btn-close-custom {
    background: #f1f3f5;
    border: none;
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.2s ease, transform 0.2s ease;
}
.btn-close-custom:active {
    transform: scale(0.9);
    background: #e2e6ea;
}

/* Interactive Layout Sizing */
.custom-mobile-drawer .offcanvas-body {
    padding-bottom: calc(80px + 2rem) !important;
    overflow-y: auto;
}

/* Venue Dashboard - Onboarding Tips Banner */
.tips-banner-header {
    font-weight: 700;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .04em;
    color: var(--grundee-dark);
    opacity: .7;
    margin-bottom: .5rem;
}

.tips-banner-carousel {
    position: relative;
}

.tips-banner-scroll {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: 1rem;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .08);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tips-banner-scroll::-webkit-scrollbar {
    display: none;
}

.tip-card {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--grundee-green), #3f7d00);
}

.tip-card.tip-card-accent {
    background: linear-gradient(135deg, var(--grundee-green), #3f7d00);
}

.tip-card.tip-card-warning {
    background: linear-gradient(135deg, #e08600, #c46a00);
}

.tip-card.tip-card-muted {
    background: linear-gradient(135deg, var(--grundee-dark), #1c2833);
}

.tip-card-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    font-size: 1.4rem;
}

.tip-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.tip-card-body h5,
.tip-card-body p {
    color: #fff;
}

.tip-card-body p {
    opacity: .9;
}

.tips-banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--grundee-dark);
    box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity .2s ease;
}

.tips-banner-nav-prev {
    left: 1rem;
}

.tips-banner-nav-next {
    right: 1rem;
}

.tips-banner-nav.disabled {
    opacity: 0;
    pointer-events: none;
}

.tips-banner-dots {
    position: absolute;
    bottom: .6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .4rem;
    z-index: 2;
}

.tips-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .5);
    padding: 0;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.tips-banner-dot.active {
    background: #fff;
    transform: scale(1.2);
}

@media (max-width: 767.98px) {
    .tip-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        text-align: left;
    }

    .tip-card > .btn,
    .tip-card > .badge {
        align-self: flex-start;
    }

    .tips-banner-nav {
        display: none;
    }
}
/* "Who's in" on the team share page (teams/components/invite_progress.html): someone who just joined */
.invite-progress-new {
    animation: invite-progress-new 3s ease-out;
    border-radius: 0.5rem;
}

@keyframes invite-progress-new {
    from { background-color: var(--grundee-accent); }
    to { background-color: transparent; }
}

/* "Get Grundee on your phone" card on the dashboard (components/install_app_banner.html, js/pwa.js) */
.install-app-card {
    position: relative;
    background: #fff;
    border-radius: 1rem;
    border-left: 4px solid var(--grundee-green);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .08);
    padding: 1.25rem 2.75rem 1.25rem 1.25rem;
}

.install-app-close {
    position: absolute;
    top: .9rem;
    right: .9rem;
    font-size: .75rem;
}

.install-app-icon {
    flex: 0 0 auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.install-app-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.install-app-text {
    font-size: .9rem;
    color: #6c757d;
    margin: 0 0 .75rem;
}

.install-app-steps {
    margin: 0;
    padding-left: 1.2rem;
    font-size: .9rem;
}

.install-app-steps li + li {
    margin-top: .25rem;
}

.install-app-steps i {
    color: var(--grundee-green-text);
}

/* "Get reminders on this phone" (components/push_prompt.html, js/pwa.js): above the phone's bottom bar */
.push-prompt {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 1055; /* above page content and Bootstrap's offcanvas, under the cookie banner */
    width: min(440px, calc(100% - 32px));
    transform: translateX(-50%);
    background: #fff;
    border-radius: 1rem;
    border-left: 4px solid var(--grundee-green);
    box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .16);
    padding: 1rem 1.1rem;
    animation: push-prompt-in .35s cubic-bezier(.2, .8, .2, 1);
}

@media (max-width: 991.98px) {
    body:has(.mobile-bottom-nav) .push-prompt { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

.push-prompt-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grundee-accent);
    color: var(--grundee-green-text);
}

.push-prompt-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .2rem;
}

.push-prompt-text {
    font-size: .875rem;
    color: #6c757d;
    margin: 0 0 .6rem;
}

@keyframes push-prompt-in {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .push-prompt { animation: none; }
}

/* Email invitations folded under the invite link on the team share page (teams/components/invite_email_form.html) */
.invite-email-subtle { border-top: 1px solid #e9ecef; padding-top: 1rem; }
.invite-email-subtle__summary { cursor: pointer; font-weight: 600; color: var(--grundee-green-text, #3d7a00); list-style: none; text-align: center; }
.invite-email-subtle__summary::-webkit-details-marker { display: none; }
.invite-email-subtle__caret { transition: transform 0.2s ease; }
.invite-email-subtle[open] .invite-email-subtle__caret { transform: rotate(180deg); }

/* Geoapify's credit for the address lookup (components/geo_credit.html): there, but quiet */
.geo-credit { font-size: 11px; line-height: 1.4; color: #9aa39b; }
.geo-credit a { color: inherit; text-decoration: none; }
.geo-credit a:hover, .geo-credit a:focus-visible { color: var(--grundee-green-text); text-decoration: underline; }
.geo-credit--info { display: inline-block; position: relative; vertical-align: baseline; margin-left: 4px; }
.geo-credit--info summary { display: inline; list-style: none; cursor: pointer; color: #b3bab4; font-size: 12px; line-height: 1; }
.geo-credit--info summary::-webkit-details-marker { display: none; }
.geo-credit--info summary:hover, .geo-credit--info[open] summary { color: #6b746d; }
/* Opens on its own line under the icon's line (a block inside the inline <details>): never clipped at a screen
   edge, whatever the width, and the icon stays where it was */
.geo-credit--info[open] { display: inline; }
.geo-credit__pop {
    display: block; width: fit-content; max-width: 100%; margin: 6px 0 2px; padding: 5px 10px; border-radius: 8px;
    background: #17211a; color: #e6eae4; font-size: 11px; line-height: 1.45;
}
.geo-credit__pop a { color: #d6eabd; }

/* Settings → Notifications: the Push / Email columns (templates/users/settings/notifications.html) */
.notification-prefs__col { flex: none; width: 3.5rem; display: flex; justify-content: center; padding-left: 0; }
.notification-prefs__col.form-switch .form-check-input { margin-left: 0; float: none; }

/* Event cards: who organises it on one line, the club first then the team, each with a small badge
   (templates/events/components/event_card.html, teams/components/mini_badge.html); wraps on a narrow card */
.event-card__org { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 1.05rem; font-weight: 600; }
.event-card__org-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: inherit; text-decoration: none; }
.event-card__org-item > span { overflow-wrap: anywhere; }
a.event-card__org-item:hover > span { text-decoration: underline; }
.event-card__org-sep { font-size: 0.65rem; color: #9aa39b; }
.mini-badge { flex: none; border-radius: 6px; object-fit: cover; }
.mini-badge--blank { display: inline-grid; place-items: center; background: var(--grundee-green); color: var(--grundee-on-green); font-size: 0.6rem; }
