/* whenever data-theme="dark" is set, force all .title elements to white */
[data-theme="dark"] .title {
    color: #ffffff !important;
}

/*
 * Bulma keeps <strong> on a dark default text color. In dark mode that breaks
 * inside otherwise-correct light text containers such as organizer tables.
 */
[data-theme="dark"] strong,
body.has-background-dark strong {
    color: #f4f7fb !important;
}

/*
 * Bulma's `is-light` color variants are tuned for light surfaces. The app uses
 * them extensively for status tags and action buttons, so dark mode needs its
 * own palette to keep text contrast stable across pages.
 */
[data-theme="dark"],
body.has-background-dark {
    --dark-light-neutral-bg: #343842;
    --dark-light-neutral-border: #50586a;
    --dark-light-neutral-text: #f4f7fb;
    --dark-light-primary-bg: #1f4d47;
    --dark-light-primary-border: #32786f;
    --dark-light-primary-text: #dcfff7;
    --dark-light-link-bg: #233c64;
    --dark-light-link-border: #3a5f97;
    --dark-light-link-text: #dce7ff;
    --dark-light-success-bg: #1f4939;
    --dark-light-success-border: #34795e;
    --dark-light-success-text: #defded;
    --dark-light-info-bg: #234b5a;
    --dark-light-info-border: #367488;
    --dark-light-info-text: #def6ff;
    --dark-light-warning-bg: #5f4a21;
    --dark-light-warning-border: #9a7630;
    --dark-light-warning-text: #ffedb8;
    --dark-light-danger-bg: #5b3136;
    --dark-light-danger-border: #94515a;
    --dark-light-danger-text: #ffe0e4;
}

[data-theme="dark"] .button.is-light,
[data-theme="dark"] .tag.is-light,
[data-theme="dark"] .notification.is-light,
body.has-background-dark .button.is-light,
body.has-background-dark .tag.is-light,
body.has-background-dark .notification.is-light {
    background-color: var(--dark-light-neutral-bg) !important;
    border-color: var(--dark-light-neutral-border) !important;
    color: var(--dark-light-neutral-text) !important;
}

[data-theme="dark"] .button.is-light:hover,
[data-theme="dark"] .button.is-light:focus,
body.has-background-dark .button.is-light:hover,
body.has-background-dark .button.is-light:focus {
    background-color: #3d4350 !important;
    border-color: #647089 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .button.is-primary.is-light,
[data-theme="dark"] .tag.is-primary.is-light,
[data-theme="dark"] .notification.is-primary.is-light,
body.has-background-dark .button.is-primary.is-light,
body.has-background-dark .tag.is-primary.is-light,
body.has-background-dark .notification.is-primary.is-light {
    background-color: var(--dark-light-primary-bg) !important;
    border-color: var(--dark-light-primary-border) !important;
    color: var(--dark-light-primary-text) !important;
}

[data-theme="dark"] .button.is-primary.is-light:hover,
[data-theme="dark"] .button.is-primary.is-light:focus,
body.has-background-dark .button.is-primary.is-light:hover,
body.has-background-dark .button.is-primary.is-light:focus {
    background-color: #285f58 !important;
    border-color: #4c978d !important;
    color: #effffb !important;
}

[data-theme="dark"] .button.is-link.is-light,
[data-theme="dark"] .tag.is-link.is-light,
[data-theme="dark"] .notification.is-link.is-light,
body.has-background-dark .button.is-link.is-light,
body.has-background-dark .tag.is-link.is-light,
body.has-background-dark .notification.is-link.is-light {
    background-color: var(--dark-light-link-bg) !important;
    border-color: var(--dark-light-link-border) !important;
    color: var(--dark-light-link-text) !important;
}

[data-theme="dark"] .button.is-link.is-light:hover,
[data-theme="dark"] .button.is-link.is-light:focus,
body.has-background-dark .button.is-link.is-light:hover,
body.has-background-dark .button.is-link.is-light:focus {
    background-color: #2c4a7b !important;
    border-color: #5c7fc4 !important;
    color: #f1f5ff !important;
}

[data-theme="dark"] .button.is-success.is-light,
[data-theme="dark"] .tag.is-success.is-light,
[data-theme="dark"] .notification.is-success.is-light,
body.has-background-dark .button.is-success.is-light,
body.has-background-dark .tag.is-success.is-light,
body.has-background-dark .notification.is-success.is-light {
    background-color: var(--dark-light-success-bg) !important;
    border-color: var(--dark-light-success-border) !important;
    color: var(--dark-light-success-text) !important;
}

[data-theme="dark"] .button.is-success.is-light:hover,
[data-theme="dark"] .button.is-success.is-light:focus,
body.has-background-dark .button.is-success.is-light:hover,
body.has-background-dark .button.is-success.is-light:focus {
    background-color: #275c49 !important;
    border-color: #4b9d7b !important;
    color: #f0fff8 !important;
}

[data-theme="dark"] .button.is-info.is-light,
[data-theme="dark"] .tag.is-info.is-light,
[data-theme="dark"] .notification.is-info.is-light,
body.has-background-dark .button.is-info.is-light,
body.has-background-dark .tag.is-info.is-light,
body.has-background-dark .notification.is-info.is-light {
    background-color: var(--dark-light-info-bg) !important;
    border-color: var(--dark-light-info-border) !important;
    color: var(--dark-light-info-text) !important;
}

[data-theme="dark"] .button.is-info.is-light:hover,
[data-theme="dark"] .button.is-info.is-light:focus,
body.has-background-dark .button.is-info.is-light:hover,
body.has-background-dark .button.is-info.is-light:focus {
    background-color: #2b5d70 !important;
    border-color: #5199b1 !important;
    color: #f1fcff !important;
}

[data-theme="dark"] .button.is-warning.is-light,
[data-theme="dark"] .tag.is-warning.is-light,
[data-theme="dark"] .notification.is-warning.is-light,
body.has-background-dark .button.is-warning.is-light,
body.has-background-dark .tag.is-warning.is-light,
body.has-background-dark .notification.is-warning.is-light {
    background-color: var(--dark-light-warning-bg) !important;
    border-color: var(--dark-light-warning-border) !important;
    color: var(--dark-light-warning-text) !important;
}

[data-theme="dark"] .button.is-warning.is-light:hover,
[data-theme="dark"] .button.is-warning.is-light:focus,
body.has-background-dark .button.is-warning.is-light:hover,
body.has-background-dark .button.is-warning.is-light:focus {
    background-color: #755a28 !important;
    border-color: #b9903b !important;
    color: #fff5d3 !important;
}

[data-theme="dark"] .button.is-danger.is-light,
[data-theme="dark"] .tag.is-danger.is-light,
[data-theme="dark"] .notification.is-danger.is-light,
body.has-background-dark .button.is-danger.is-light,
body.has-background-dark .tag.is-danger.is-light,
body.has-background-dark .notification.is-danger.is-light {
    background-color: var(--dark-light-danger-bg) !important;
    border-color: var(--dark-light-danger-border) !important;
    color: var(--dark-light-danger-text) !important;
}

[data-theme="dark"] .button.is-danger.is-light:hover,
[data-theme="dark"] .button.is-danger.is-light:focus,
body.has-background-dark .button.is-danger.is-light:hover,
body.has-background-dark .button.is-danger.is-light:focus {
    background-color: #6f3a40 !important;
    border-color: #b56a76 !important;
    color: #fff0f3 !important;
}

/* Comment action buttons styling */
.comment-actions .button.is-white {
    background: transparent !important;
    border: none !important;
    color: #4a4a4a !important;
    transition: color 0.2s ease;
}

.comment-actions .button.is-white:hover {
    background: transparent !important;
    border: none !important;
    color: #3273dc !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Dark theme comment action buttons */
[data-theme="dark"] .comment-actions .button.is-white,
body.has-background-dark .comment-actions .button.is-white {
    background: transparent !important;
    border: none !important;
    color: #b5b5b5 !important;
}

[data-theme="dark"] .comment-actions .button.is-white:hover,
body.has-background-dark .comment-actions .button.is-white:hover {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Phone number validation styles */
.phone-validation-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.phone-validation-message.success {
    color: #48c774;
}

.phone-validation-message.warning {
    color: #ffdd57;
}

.phone-validation-message.danger {
    color: #f14668;
}

/* Email confirmation styling to match phone validation */
.help.is-warning {
    color: #ffdd57 !important;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.help.is-warning i {
    margin-right: 0.5rem;
}

/* Consistent helper text styling */
.help {
    font-size: 0.875rem !important;
    margin-top: 0.5rem !important;
    transition: all 0.3s ease;
}

.help.is-info {
    color: #3298dc !important;
    font-size: 0.875rem !important;
}

.help.is-warning {
    color: #ffdd57 !important;
    font-size: 0.875rem !important;
}

.help.is-danger {
    color: #f14668 !important;
    font-size: 0.875rem !important;
}

.help.is-success {
    color: #48c774 !important;
    font-size: 0.875rem !important;
}

/* Dark theme email confirmation */
[data-theme="dark"] .help.is-warning,
body.has-background-dark .help.is-warning {
    color: #ffdd57 !important;
}

/* Dark theme helper texts */
[data-theme="dark"] .help.is-info,
body.has-background-dark .help.is-info {
    color: #3298dc !important;
}

[data-theme="dark"] .help.is-danger,
body.has-background-dark .help.is-danger {
    color: #f14668 !important;
}

[data-theme="dark"] .help.is-success,
body.has-background-dark .help.is-success {
    color: #48c774 !important;
}

/* Dark theme phone validation */
[data-theme="dark"] .phone-validation-message .help.is-success {
    color: #48c774 !important;
}

[data-theme="dark"] .phone-validation-message .help.is-danger {
    color: #f14668 !important;
}

[data-theme="dark"] .phone-validation-message .help.is-warning {
    color: #ffdd57 !important;
}

/* Intl-tel-input dark theme compatibility */
[data-theme="dark"] .iti__selected-flag,
body.has-background-dark .iti__selected-flag {
    background-color: #4a4a4a !important;
    border-color: #666 !important;
    color: #f5f5f5 !important;
}


[data-theme="dark"] .iti__selected-flag:hover,
body.has-background-dark .iti__selected-flag:hover {
    background-color: #666 !important;
    border-color: #888 !important;
}

[data-theme="dark"] .iti__arrow,
body.has-background-dark .iti__arrow {
    border-top-color: #f5f5f5 !important;
}

[data-theme="dark"] .iti__country-list,
body.has-background-dark .iti__country-list {
    background-color: #4a4a4a !important;
    border-color: #666 !important;
    color: #f5f5f5 !important;
}

[data-theme="dark"] .iti__country,
body.has-background-dark .iti__country {
    border-bottom-color: #666 !important;
}

[data-theme="dark"] .iti__country:hover,
body.has-background-dark .iti__country:hover {
    background-color: #666 !important;
}

[data-theme="dark"] .iti__country--highlighted,
body.has-background-dark .iti__country--highlighted {
    background-color: #3273dc !important;
    color: #ffffff !important;
}

[data-theme="dark"] .iti__country--selected,
body.has-background-dark .iti__country--selected {
    background-color: #48c774 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .iti__dial-code,
body.has-background-dark .iti__dial-code {
    color: #b5b5b5 !important;
}

[data-theme="dark"] .iti__country--highlighted .iti__dial-code,
[data-theme="dark"] .iti__country--selected .iti__dial-code,
body.has-background-dark .iti__country--highlighted .iti__dial-code,
body.has-background-dark .iti__country--selected .iti__dial-code {
    color: #ffffff !important;
}

/* Phone input field dark theme */
[data-theme="dark"] .iti__tel-input,
body.has-background-dark .iti__tel-input {
    background-color: #4a4a4a !important;
    border-color: #666 !important;
    color: #f5f5f5 !important;
}

[data-theme="dark"] .iti__tel-input:focus,
body.has-background-dark .iti__tel-input:focus {
    border-color: #3273dc !important;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25) !important;
}

/* Pixel-perfect country flag selector styling */
.iti__selected-flag {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 8px 0 12px !important;
    height: 38px !important;
    min-width: 120px !important;
    border: 1px solid #dbdbdb !important;
    border-right: none !important;
    border-radius: 4px 0 0 4px !important;
    background-color: #f5f5f5 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.iti__selected-flag:hover {
    background-color: #e8e8e8 !important;
    border-color: #b5b5b5 !important;
}

.iti__selected-flag:focus {
    outline: none !important;
    border-color: #3273dc !important;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25) !important;
}

/* Flag icon styling */
.iti__flag {
    width: 20px !important;
    height: 15px !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
    /* Remove background properties that interfere with flag sprites */
    /* background-size: contain !important; */
    /* background-repeat: no-repeat !important; */
    /* background-position: center !important; */
}

/* Dial code styling */
.iti__selected-dial-code {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #4a4a4a !important;
    margin-right: 4px !important;
    flex-grow: 1 !important;
    text-align: left !important;
    line-height: 1.2 !important;
}

/* Arrow styling */
.iti__arrow {
    width: 0 !important;
    height: 0 !important;
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    border-top: 4px solid #7a7a7a !important;
    margin-left: 4px !important;
    transition: transform 0.2s ease !important;
    flex-shrink: 0 !important;
}

.iti__arrow--up {
    transform: rotate(180deg) !important;
}

/* Phone input field alignment */
.iti__tel-input {
    height: 38px !important;
    padding: 8px 12px !important;
    border: 1px solid #dbdbdb !important;
    border-radius: 0 4px 4px 0 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}

.iti__tel-input:focus {
    border-color: #3273dc !important;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25) !important;
    outline: none !important;
}

.public-entry-grid {
    align-items: stretch;
}

.public-entry-grid .column {
    display: flex;
}

.public-entry-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 18rem;
    border-radius: 1.25rem;
    overflow: hidden;
    text-decoration: none;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1.2rem 2.5rem rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.public-entry-card:hover,
.public-entry-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 1.4rem 3rem rgba(15, 23, 42, 0.14);
    border-color: rgba(15, 23, 42, 0.16);
    color: #0f172a;
}

.public-entry-visual {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 9rem;
    padding: 1.25rem;
    position: relative;
}

.public-entry-visual .icon {
    height: 3rem;
    width: 3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.12);
}

.public-entry-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1.5rem;
}

.public-entry-body strong {
    font-size: 1.1rem;
    line-height: 1.2;
}

.public-entry-body span {
    line-height: 1.5;
}

.public-entry-card-signup .public-entry-visual {
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.42) 0, rgba(255, 255, 255, 0) 28%),
        linear-gradient(135deg, #ffb84d 0%, #ff7a59 48%, #ea5f89 100%);
}

.public-entry-card-login .public-entry-visual {
    background:
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.38) 0, rgba(255, 255, 255, 0) 30%),
        linear-gradient(135deg, #6ea8fe 0%, #4f7cff 52%, #304ffe 100%);
}

.public-entry-card-attendee .public-entry-visual {
    background:
        radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.34) 0, rgba(255, 255, 255, 0) 30%),
        linear-gradient(135deg, #8be28b 0%, #40c9a2 45%, #1098ad 100%);
}

.public-home-sidebox ul {
    padding-left: 1.1rem;
    line-height: 1.7;
}

[data-theme="dark"] .public-entry-card,
body.has-background-dark .public-entry-card {
    background: #1b1f2a;
    color: #f5f5f5;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.26);
}

[data-theme="dark"] .public-entry-card:hover,
[data-theme="dark"] .public-entry-card:focus-visible,
body.has-background-dark .public-entry-card:hover,
body.has-background-dark .public-entry-card:focus-visible {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .public-entry-visual .icon,
body.has-background-dark .public-entry-visual .icon {
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
}

@media (max-width: 1023px) {
    .public-entry-card {
        min-height: 15rem;
    }
}

/* Container alignment */
.iti {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    margin-bottom: 0.5rem !important;
}

/* Dark theme specific adjustments */
[data-theme="dark"] .iti__selected-flag,
body.has-background-dark .iti__selected-flag {
    background-color: #4a4a4a !important;
    border-color: #666 !important;
}

[data-theme="dark"] .iti__selected-dial-code,
body.has-background-dark .iti__selected-dial-code {
    color: #f5f5f5 !important;
}

[data-theme="dark"] .iti__arrow,
body.has-background-dark .iti__arrow {
    border-top-color: #b5b5b5 !important;
}

[data-theme="dark"] .iti__selected-flag:hover,
body.has-background-dark .iti__selected-flag:hover {
    background-color: #666 !important;
    border-color: #888 !important;
}

[data-theme="dark"] .iti__selected-flag:focus,
body.has-background-dark .iti__selected-flag:focus {
    border-color: #3273dc !important;
    box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25) !important;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.section {
    flex: 1;
}

.checkbox:hover {
    color: #abb1bf;
}

.footer {
    margin-top: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.debug-role {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
}

/* Disabled button styling */
button.is-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    color: #7a7a7a !important;
    border-color: #dbdbdb !important;
}

button.is-disabled:hover {
    background-color: #f5f5f5 !important;
    color: #7a7a7a !important;
    border-color: #dbdbdb !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Dark mode disabled button styling */
[data-theme="dark"] button.is-disabled,
body.has-background-dark button.is-disabled {
    background-color: #363636 !important;
    color: #b5b5b5 !important;
    border-color: #4a4a4a !important;
}

[data-theme="dark"] button.is-disabled:hover,
body.has-background-dark button.is-disabled:hover {
    background-color: #363636 !important;
    color: #b5b5b5 !important;
    border-color: #4a4a4a !important;
}

.timeline {
    display: flex;
    flex-wrap: wrap;
}

.slot-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.day-section {
    margin-bottom: 2rem;
}

.day-section.is-collapsed {
    margin-bottom: 1.1rem;
}

.day-section-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.day-section-summary {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.day-section.is-collapsed .day-section-header {
    gap: 0.5rem;
}

.day-section.is-collapsed .title {
    margin-bottom: 0;
}

.slot {
    /*border: 1px solid #dbdbdb;*/
    border-radius: 6px;
    padding: 0.75rem;
    background: #fff;
    flex: 1;
    position: relative;
}
.slot.now {
    background-color: #e0f7ff;
    border-color: #3273dc;
}
.slot.past {
    opacity: 0.6;
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: self-start;
    margin-bottom: 0.5rem;
}
.slot-hours {
    font-size: 0.8rem;
    color: #666;
}

.session-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    position: relative;
}
.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--category-color, #00d1b2);
}

.session-card[draggable="true"] {
    cursor: grab;
}

.session-card.dragging {
    opacity: 0.6;
    cursor: grabbing;
}

.session-card.menu-open {
    /* Ensure expanded action menus overlay adjacent period slots */
    z-index: 1000;
}

.slot.over .session-cards {
    border: 2px dashed #666;
}

.no-session {
    color: #888;
    font-style: italic;
}

.session-card .details {
    font-size: 0.9rem;
}

.form {
    max-width: 700px;
    margin: 1rem auto;
}

/* Profile page form layout */
/*.profile-form {
    max-width: 700px;
    margin: 1rem auto;
}*/

.profile-form .form-row {
    display: flex;
    gap: 1rem;
}

.profile-form .form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.profile-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.profile-form label.checkbox-label {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    width: auto;
}

.profile-form .checkbox-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.profile-form select {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
}

.profile-form .form-actions {
    text-align: right;
}

/* Allow wider alignment when needed */
.wide-form {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.join-form {
    max-width: 600px;
    margin: 1rem auto;
}

.join-form .form-row {
    display: flex;
    gap: 1rem;
}

.join-form .form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.join-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.join-form input,
.join-form select {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
}

.join-form .form-actions {
    text-align: right;
}

.create-form .form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.create-form .form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.create-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.create-form label.checkbox-label,
label.checkbox-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    font-weight: normal;
    margin-bottom: 0;
    white-space: nowrap;
    width: 100%;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.create-form input,
.create-form select {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
}

.config-form input[type="checkbox"] {
    width: auto;
}

.create-form input[type="checkbox"] {
    width: auto;
}

.config-form .form-actions {
    text-align: right;
}

.create-form .form-actions {
    text-align: right;
}


.avatar-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.avatar-icon:hover {
    transform: scale(1.2);
}

.champion-border {
    box-shadow: 0 0 0 2px #ffd700;
}

.empty-slot {
    opacity: 0.4;
}

/* Prevent clicks on empty slots when the player already joined */
.no-join {
    pointer-events: none;
}

.avatars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.25rem;
}

.avatar-overflow-count {
    align-items: center;
    background: rgba(50, 115, 220, 0.12);
    border-radius: 999px;
    color: #1f2937;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    height: 24px;
    justify-content: center;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    min-width: 24px;
    padding: 0 0.45rem;
    vertical-align: middle;
}

.empty-slot-count {
    background: rgba(122, 122, 122, 0.14);
    color: #5a5a5a;
}

[data-theme="dark"] .avatar-overflow-count,
body.has-background-dark .avatar-overflow-count {
    background: rgba(72, 149, 239, 0.24);
    color: #f5f5f5;
}

[data-theme="dark"] .empty-slot-count,
body.has-background-dark .empty-slot-count {
    background: rgba(181, 181, 181, 0.22);
    color: #f5f5f5;
}

.create-icon {
    margin-left: 0.25rem;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.create-icon > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.create-icon.disabled {
    color: #b5b5b5;
    cursor: not-allowed;
    pointer-events: none;
}

.create-icon:hover {
    background-color: #FFFFFF;
}

/* Highlight create icon when its slot is the current period */
.slot.now .create-icon {
    background-color: #3273dc;
    color: #fff;
    border-color: #3273dc;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.icon-choice {
    width: 100%;
}

/* Config table alignment */
/*.create-form .table td {
    vertical-align: middle;
}*/
.create-form .icon-input {
    width: 100%;
}
.create-form input[type="color"] {
    padding: 0;
}

/* Ensure config tables span the full container */
.create-form .config-table {
    width: 100%;
    table-layout: auto;
}

/* Keep action column compact and aligned to the right */
.create-form .config-table td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

#payments-user-picker {
    width: 15rem;
    max-width: 100%;
}

.table-container {
    overflow-x: auto;
}

.slot-add {
    color: #3273dc;
}

.inline-form {
    display: inline;
}

.start-time {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.25rem;
    align-items: center;
    font-size: inherit;
}
.time-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 0.25rem;
    column-gap: 0.25rem;
    align-items: center;
    font-size: 0.8rem;
}

.wallboard-time-row {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    gap: 0.25rem;
}

.wallboard-time-row .time-separator {
    margin: 0 0.25rem;
}

.time-row {
    display: contents;
}
.starting-soon {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
    grid-column: 1 / span 2;
    width: fit-content;
}

.countdown {
    font-size: inherit;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.25rem;
    align-items: center;
}

.start-time-icon,
.countdown-icon {
    /*margin-right: 0.15rem;*/
    /*vertical-align: mid1le;*/
    /*display: inline-flex;*/
    width: 0.75rem !important;
    /*height: 0.5 rem;*/
}

.session-part-indicator {
    font-size: 0.75rem;
    color: #666;
    margin-left: 0.25rem;
}

.event-start-label {
    display: inline-block;
    margin-top: 0.25rem;
}

.last-spot {
    display: inline-block;
    margin-top: 0.25rem;
}
.full-label {
    color: #666;
}

.session-cards {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
    grid-template-columns: repeat(var(--cols, 1), 1fr);
    align-items: start;
}

.session-card .card-header {
    position: relative;
}

/* Reserve space for the action menu so titles don't flow underneath */
.session-card .card-header-title {
    padding-right: 2.5rem;
}

.session-header {
    flex-wrap: wrap;
}

.session-header .time-grid {
    flex-basis: 100%;
    padding: 0 1rem 0.5rem;
}

.session-card .card-content {
    padding: .75rem 0.8rem;
}

.schedule-card-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    align-items: center;
    font-size: 0.92rem;
}

.schedule-card-summary-link {
    font-weight: 600;
}

.schedule-card-champion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
}

.schedule-card-status {
    color: #4a4a4a;
}

.schedule-card-open-spots,
.schedule-card-comments {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #666;
    white-space: nowrap;
}

.schedule-summary-empty-slot {
    width: 1rem;
    height: 1rem;
}

[data-theme="dark"] .schedule-card-status,
body.has-background-dark .schedule-card-status,
[data-theme="dark"] .schedule-card-open-spots,
body.has-background-dark .schedule-card-open-spots,
[data-theme="dark"] .schedule-card-comments,
body.has-background-dark .schedule-card-comments {
    color: #d3d7de;
}

.badge {
  z-index: 10;
  position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: var(--badge-size, 1.25rem);
    height: var(--badge-size, 1.25rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0px;
    font-size: calc(var(--badge-size, 1.25rem) * 0.6);
    box-shadow: none;
}

.action-menu {
    display: none;
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    min-width: 160px;
    max-width: 280px;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.4;
}

.inline-action-menu {
    position: absolute;
    right: 0;
    top: 100%;
}

.inline-action-menu.is-active {
    display: block;
}

.actions-cell {
    position: relative;
}

/* Dark mode support */
.action-menu.has-background-dark {
    background: #363636;
    border-color: #4a4a4a;
    color: #f5f5f5;
}

.action-menu .menu-item {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
    transition: background-color 0.15s ease;
    border-radius: 0;
    margin: 0;
}

.action-menu .menu-item:hover {
    background-color: #f5f5f5;
    color: #363636;
}

.action-menu.has-background-dark .menu-item:hover {
    background-color: #4a4a4a;
    color: #f5f5f5;
}

.action-menu .menu-item:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.action-menu .menu-item:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.action-menu .inline-form {
    margin: 0;
    padding: 0;
}

.action-menu .inline-form button {
    width: 100%;
    text-align: left;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
    transition: background-color 0.15s ease;
    border-radius: 0;
    margin: 0;
}

.action-menu .inline-form button:hover {
    background-color: #f5f5f5;
    color: #363636;
}

.action-menu.has-background-dark .inline-form button:hover {
    background-color: #4a4a4a;
    color: #f5f5f5;
}

/* Special styling for destructive actions */
.action-menu .delete-session-form button {
    color: #cc0f35;
}

.action-menu.has-background-dark .delete-session-form button {
    color: #ff3860;
}

.action-menu .delete-session-form button:hover {
    background-color: #feecf0;
    color: #cc0f35;
}

.action-menu.has-background-dark .delete-session-form button:hover {
    background-color: #4a1c1c;
    color: #ff3860;
}

/* Special styling for primary actions */
.action-menu .quick-join-form button {
    color: #00d1b2;
    font-weight: 500;
}

.action-menu.has-background-dark .quick-join-form button {
    color: #00d1b2;
    font-weight: 500;
}

.action-menu .quick-join-form button:hover {
    background-color: #f0fdfa;
    color: #00a085;
}

.action-menu.has-background-dark .quick-join-form button:hover {
    background-color: #1a4a3f;
    color: #00d1b2;
}

.action-menu form {
    margin: 0;
}

.action-menu-btn {
    font-size: 1.2rem;
    padding: 0px 8px 0px 8px;
    border: none;
    background-color: #4a4a4a;
    position: absolute;
    right: 0.25rem;
}

.actions-btn {
    position: static;
    font-size: 0.9rem;
    padding: 0px 6px;
}

.schedule-dates {
    font-size: 1rem;
    color: #666;
}

.category-filter {
    text-align: center;
    margin-bottom: 1rem;
}

.category-filter label {
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
}


.category-filter input[type="checkbox"] {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 2px solid var(--category-color, #00d1b2);
    border-radius: 2px;
    margin-right: 0.25rem;
    vertical-align: middle;
    cursor: pointer;
    background: transparent;
    position: relative;
}

.category-filter input[type="checkbox"]:checked {
    background-color: var(--category-color, #00d1b2);
}

/* Remove checkmark; fill color indicates checked state */
.category-filter input[type="checkbox"]:checked::after {
    content: none;
}

.time-filter {
    text-align: center;
    margin-bottom: 1rem;
}

.time-filter label {
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
}

.time-filter input[type="checkbox"] {
    display: none;
}

.time-filter .slot-icon {
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.6;
}

.time-filter input[type="checkbox"]:checked + .slot-icon {
    opacity: 1;
}

.time-filter .slot-icon.night { color: #4c6ef5; }
.time-filter .slot-icon.morning { color: #ffe066; }
.time-filter .slot-icon.afternoon { color: #ff9f43; }
.time-filter .slot-icon.evening { color: #9b59b6; }

.game-preset-filter {
    text-align: center;
    margin-bottom: 1rem;
}

.availability-tree ul {
    list-style: none;
    margin-left: 1rem;
}

.calendar-day {
    position: relative;
    padding: 2px;
    padding-top: 1.2em;
    height: 72px;
    box-sizing: border-box;
    cursor: pointer;
}

.calendar-day.disabled {
    cursor: default;
}

[data-availability-calendar] table,
#avail-calendar table {
    width: 100%;
    table-layout: fixed;
}

#attendance-modal-calendar .calendar-day,
#avail-calendar .calendar-day {
    width: calc(100% / 7);
}
.calendar-day.disabled .calendar-slot {
    pointer-events: none;
    background-color: #f5f5f5;
    color: #363636;
}
.day-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1;
    min-width: 1.35rem;
    min-height: 1.35rem;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    line-height: 1.2rem;
}

.calendar-day:not(.disabled) .day-number:hover,
.calendar-day:not(.disabled) .day-number:focus {
    border-color: #3273dc;
    background-color: rgba(50, 115, 220, 0.12);
    outline: 2px solid transparent;
}
.calendar-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    margin-top: 1.2em;
    height: calc(100% - 1.2em);
}
.calendar-slot {
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(50, 115, 220, 0.3);
    border-radius: 4px;
    min-height: 1.3rem;
    background-color: rgba(50, 115, 220, 0.06);
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.calendar-slot:hover,
.calendar-slot:focus {
    border-color: #3273dc;
    outline: 2px solid rgba(50, 115, 220, 0.18);
    transform: translateY(-1px);
}
.calendar-slot.disabled {
    pointer-events: none;
    background-color: #f5f5f5;
    color: #363636;
    cursor: not-allowed;
    transform: none;
}
.calendar-slot.is-selected {
    background-color: #3273dc;
    border-color: #3273dc;
    color: #fff;
}
.calendar-slot.is-away {
    background-color: #f14668;
    border-color: #f14668;
    color: #fff;
}
.calendar-slot.is-maybe {
    background-color: #ffdd57;
    border-color: #ffdd57;
    color: #363636;
}

.calendar-slot.no-response {
    color: #b5b5b5;
}

body.has-background-dark .calendar-slot.disabled {
    color: #363636;
}

body.has-background-dark .calendar-slot.no-response {
    color: #7a7a7a;
}

.slot-count {
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: 0.55rem;
}

/* highlight Create Session navbar item */
.navbar-item.create-session-link {
    font-weight: 600;
    border-radius: 4px;
}
.navbar-item.create-session-link:hover {
    background-color: rgba(255,255,255,0.25);
}

.profile-menu-item {
    padding-left: 0.25rem;
    padding-right: 0.5rem;
}

.profile-menu-trigger {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    min-height: 2.05rem;
    padding: 0.08rem 0.16rem 0.08rem 0.08rem;
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.profile-menu-trigger:hover,
.profile-menu-trigger:active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: inherit;
    transform: translateY(-1px);
}

.profile-menu-trigger:focus {
    box-shadow: none;
    outline: none;
}

.profile-menu-trigger:focus-visible {
    border-color: rgba(110, 168, 254, 0.55);
    box-shadow: 0 0 0 2px rgba(110, 168, 254, 0.18);
}

.profile-menu-item .dropdown.is-active .profile-menu-trigger {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.profile-menu-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-menu-avatar-image {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.profile-menu-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    height: 0.95rem;
    line-height: 1;
    margin-left: 0.02rem;
    opacity: 0.55;
    width: 0.9rem;
}

.profile-menu-chevron .fas {
    line-height: 1;
    transform: translateY(1px);
}

.profile-menu-item .dropdown-menu {
    min-width: 12.75rem;
    padding-top: 0.32rem;
}

.profile-menu-item .dropdown-content {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.profile-menu-summary {
    min-width: 12rem;
    padding: 0.72rem 0.9rem 0.58rem;
}

.profile-menu-summary p {
    margin-bottom: 0;
}

.profile-menu-label {
    letter-spacing: 0.01em;
    margin-bottom: 0.14rem;
}

.profile-menu-name {
    color: #1f2933;
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu-item .dropdown-item {
    color: #1f2933;
    padding: 0.64rem 0.9rem;
}

.profile-menu-item .dropdown-item:hover,
.profile-menu-item .dropdown-item:focus {
    background: rgba(15, 23, 42, 0.06);
    color: #111827;
}

.profile-menu-item.is-dark-theme .dropdown-content {
    background: #141a23;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

.profile-menu-item.is-dark-theme .profile-menu-label {
    color: #9fb3c8 !important;
}

.profile-menu-item.is-dark-theme .profile-menu-name {
    color: #f5f7fa;
}

.profile-menu-item.is-dark-theme .dropdown-item {
    color: #f5f7fa;
}

.profile-menu-item.is-dark-theme .dropdown-item:hover,
.profile-menu-item.is-dark-theme .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.profile-menu-item.is-dark-theme .dropdown-divider {
    background-color: rgba(255, 255, 255, 0.08);
}

/* highlight custom role section navbar item */
.navbar-item.role-section-link.highlight {
    font-weight: 600;
    border-radius: 4px;
    color: #ffdd57 !important;
}
.navbar-item.role-section-link.highlight:hover {
    background-color: rgba(255,255,255,0.25);
}



.month-label {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    color: #888;
}

.calendar-range {
    margin-top: 0.25rem;
}

/* Availability calendar legend */
.calendar-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.calendar-legend .legend-item {
    display: flex;
    align-items: center;
}

.calendar-legend .legend-box {
    width: 12px;
    height: 12px;
    margin-right: 4px;
}

.calendar-legend .present {
    background-color: #3273dc;
}

.calendar-legend .away {
    background-color: #f14668;
}

.calendar-legend .maybe {
    background-color: #ffdd57;
}

.attendance-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(14rem, 17rem);
    gap: 0.75rem;
    align-items: start;
    margin: 0.75rem 0 1rem;
}

.attendance-editor-layout .calendar-day {
    height: 86px;
    padding: 3px;
    padding-top: 1.35em;
}

.attendance-editor-layout .day-number {
    min-width: 1.55rem;
    min-height: 1.45rem;
    line-height: 1.3rem;
    border-color: rgba(50, 115, 220, 0.26);
    background-color: rgba(50, 115, 220, 0.06);
}

.attendance-editor-layout .calendar-slots {
    gap: 3px;
    margin-top: 1.35em;
    height: calc(100% - 1.35em);
}

.attendance-editor-layout .calendar-slot {
    font-size: 0.72rem;
    min-height: 1.5rem;
}

.attendance-state-legend {
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.attendance-how-panel {
    border-left: 3px solid #3273dc;
    padding: 0.75rem 0 0.75rem 0.9rem;
    font-size: 0.9rem;
}

.attendance-help-group + .attendance-help-group {
    margin-top: 0.8rem;
}

.attendance-help-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 0.2rem;
    text-transform: uppercase;
}

.attendance-help-group p,
.attendance-bulk-note {
    margin: 0;
}

.attendance-period-key {
    margin-top: 0.35rem !important;
}

.analytics-kpi {
    border-left: 3px solid #3273dc;
    padding: 0.75rem 0 0.75rem 0.9rem;
}

body.has-background-dark .calendar-day:not(.disabled) .day-number:hover,
body.has-background-dark .calendar-day:not(.disabled) .day-number:focus,
body.has-background-dark .calendar-slot:hover,
body.has-background-dark .calendar-slot:focus {
    border-color: #8ab4ff;
    outline-color: rgba(138, 180, 255, 0.24);
}

body.has-background-dark .calendar-slot {
    background-color: rgba(138, 180, 255, 0.1);
    border-color: rgba(138, 180, 255, 0.38);
    color: #f4f6fb;
}

body.has-background-dark .calendar-slot.is-selected {
    background-color: #485fc7;
    border-color: #485fc7;
    color: #fff;
}

body.has-background-dark .calendar-slot.is-away {
    background-color: #b84c4c;
    border-color: #b84c4c;
    color: #fff;
}

body.has-background-dark .calendar-slot.is-maybe {
    background-color: #d6b656;
    border-color: #d6b656;
    color: #000;
}

body.has-background-dark .calendar-slot.no-response {
    color: #7a7a7a;
}

body.has-background-dark .calendar-slot.disabled {
    background-color: #333;
    border-color: #444;
    color: #363636;
}

body.has-background-dark .calendar-day:not(.disabled) .day-number {
    background-color: rgba(138, 180, 255, 0.08);
    border-color: rgba(138, 180, 255, 0.3);
}

@media (max-width: 768px) {
    .attendance-editor-layout {
        grid-template-columns: 1fr;
    }

    .attendance-how-panel {
        order: -1;
        border-left: 0;
        border-top: 3px solid #3273dc;
        padding: 0.75rem 0 0;
    }
}

/* Theme toggle button styles */
#theme-toggle.theme-toggle {
    background: transparent;
    border-color: transparent;
}

#theme-toggle.theme-toggle.sun-mode:hover {
    background-color: rgba(255, 221, 87, 0.2);
}

#theme-toggle.theme-toggle.moon-mode:hover {
    background-color: rgba(72, 95, 199, 0.2);
}
.schedule-title-container {
    position: relative;
    width: fit-content;
    margin: 0 auto;
}

.badge-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.badge-legend .legend-item {
    display: inline-flex;
    align-items: center;
}

.badge-legend input[type="checkbox"] {
    display: none;
}

.badge-legend .legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--dot-color, #00d1b2);
    margin-right: 0.25rem;
    cursor: pointer;
}

.badge-legend input[type="checkbox"]:checked + .legend-dot {
    background-color: var(--dot-color, #00d1b2);
}


/* Sticky navigation and filters */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

#schedule-header {
    position: sticky;
    top: 3.25rem;
    z-index: 900;
    background-color: inherit;
    padding: 14px 0px 1px 0px;
    margin-left: -20px;
    margin-right: -20px;
}

/* Ensure modals overlay the sticky header */
.modal {
    z-index: 1100;
}

.modal-background {
    z-index: 1000;
}

.modal-content {
    z-index: 1101;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

#attendance-modal .modal-content {
    width: min(96vw, 62rem);
}

#slot-info-modal .modal-card-foot {
    justify-content: flex-end;
    padding: 0.75rem 1.5rem;
}

#slot-info-modal .modal-card-foot .button {
    min-height: 2.5rem;
}

.attendance-period-breakdown {
    border-top: 1px solid rgba(244, 247, 251, 0.22);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.attendance-period-breakdown:first-of-type {
    border-top: 0;
    margin-top: 1rem;
    padding-top: 0;
}

.attendance-period-header {
    align-items: center;
    display: grid;
    gap: 0.55rem 1.25rem;
    grid-template-columns: 8rem minmax(0, 1fr);
    margin-bottom: 0.75rem;
}

.attendance-period-header .attendance-status-counts {
    margin: 0;
}

.attendance-status-counts {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
}

.attendance-response-groups {
    display: grid;
    gap: 1rem 1.75rem;
    grid-template-columns: repeat(2, minmax(12rem, 18rem));
    max-width: 38rem;
}

.attendance-response-group.mt-2 {
    margin-top: 0 !important;
}

.attendance-response-group ul {
    margin-bottom: 0;
}

.modal-card {
    z-index: 1101;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-card-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(90vh - 120px); /* Account for header and footer */
}

/* Responsive improvements for modals */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-card {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-card-body {
        max-height: calc(95vh - 140px);
    }

    #slot-info-modal .modal-card-foot {
        padding: 0.6rem 1rem;
    }

    .attendance-period-header {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .attendance-response-groups {
        grid-template-columns: 1fr;
    }
}

/* Modal content improvements */
.modal-card-body .content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-card-body ul {
    margin-bottom: 1rem;
}

.modal-card-body li {
    margin-bottom: 0.25rem;
}

/* Ensure images don't overflow */
.modal-card-body img {
    max-width: 100%;
    height: auto;
}

/* Additional modal improvements */
.modal-card-body {
    padding: 1.5rem;
}

.modal-card-body .content {
    max-width: 100%;
}

/* Ensure long text doesn't break layout */
.modal-card-body p,
.modal-card-body li {
    word-break: break-word;
}

#map-container {
    border: 1px solid #ccc;
}

/* Wallboard layout */
.wallboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.wallboard-slot {
    display: flex;
    flex-direction: column;
}

.wallboard-date {
    font-size: 0.9rem;
    color: #888;
    margin-left: 0.25rem;
}

.wallboard-slot .session-card {
    margin-bottom: 0.5rem;
}

.wallboard-slot .session-card .card-separator {
    border: 0;
    border-top: 1px solid #dbdbdb;
    margin: 0.5rem 0;
}

.wallboard-slot .session-card.has-background-dark .card-separator {
    border-top-color: #4a4a4a;
}

.wallboard-slot.now {
    background-color: #e0f7ff;
    border-radius: 6px;
    padding: 0.5rem;
}

.player-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.player-list .player {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.player-list .player img {
    margin-right: 0.5rem;
}

.champion-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 1rem;
    background-color: rgba(255, 215, 0, 0.15);
    border-radius: 4px;
}

.champion-banner .champion-icon,
.champion-banner .champion-player-avatar {
    width: 32px;
    height: 32px;
}

.wallboard-banners .notification {
    margin-bottom: 0;
}

.wallboard-banners .notification + .notification {
    margin-top: 0.5rem;
}

/* One-time onboarding overlay */
.onboarding-tip {
    position: absolute;
    z-index: 1200;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.onboarding-tip.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-tip.is-hidden {
    display: none;
}

#calendarTip {
    transform: none;
    width: 660px;
}

/* Overlay shown during profile onboarding */
#onboardingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1100;
}

/* Fixed-position onboarding wizard */
#getStartedWizard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    max-width: 800px;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
}

#getStartedWizard .wizard-step.is-hidden {
    display: none;
}

#getStartedWizard .wizard-progress {
    width: 100%;
}

#getStartedWizard .button {
    margin-top: 10px;
}

@media (max-width: 768px) {
    #getStartedWizard {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        max-width: calc(100% - 30px);
    }
}

/* Scroll timeline on the left */
#scroll-timeline {
    position: fixed;
    left: 3px;
    top: 0;
    width: 10px;
    pointer-events: none;
    z-index: 700;
    height: 100vh;
    background: rgba(50, 115, 220, 0.1);
    border-radius: 0;
}

@media (max-width: 1032px) {
    #scroll-timeline {
        display: none;
    }
}

#scroll-progress {
    position: absolute;
    left: 1px;
    top: 0;
    width: calc(100% - 2px);
    background-color: #3273dc;
    height: 24px;
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(50, 115, 220, 0.18);
}

/* Responsive embedded map */
.embed-map {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

.embed-map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* style.css or similar */

/* Basic styling for the inserted emoji images */
.emoji-image {
    width: 1em; /* '1em' makes it approximately the height of surrounding text */
    height: 1em; /* Keeps the image square and proportional to the text */
    vertical-align: middle; /* Aligns the image nicely with the text baseline */
    display: inline-block; /* Ensures consistent sizing and alignment */
}

/* Optional: If you want a slight margin around them */
.emoji-image:not(:last-child) {
    margin-right: 0.1em; /* Small space after the emoji, but not if it's the last thing */
}

/* Dark mode adjustments for EasyMDE editors */
body.has-background-black .EasyMDEContainer.dark-mode .CodeMirror,
body.has-background-black .EasyMDEContainer.dark-mode .CodeMirror-scroll {
    background-color: #363636;
    color: #f5f5f5;
}

body.has-background-black .EasyMDEContainer.dark-mode .editor-toolbar {
    background-color: #2f2f2f;
    border-color: #272727;
}

body.has-background-black .EasyMDEContainer.dark-mode .editor-toolbar a,
body.has-background-black .EasyMDEContainer.dark-mode .editor-toolbar button {
    color: #f5f5f5;
}

body.has-background-black .EasyMDEContainer.dark-mode .editor-toolbar button:hover,
body.has-background-black .EasyMDEContainer.dark-mode .editor-toolbar button.active {
    background-color: #444444;
}

body.has-background-black .EasyMDEContainer.dark-mode .editor-preview {
    background-color: #222222;
    color: #f5f5f5;
}

.feedback-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    margin: 1rem auto;
}
.feedback-section {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 25px;
}
.feedback-section:first-of-type {
    border-top: none;
    padding-top: 0;
}
.textarea-small {
    min-height: 80px;
}
.textarea-medium {
    min-height: 120px;
}
.form-subtitle {
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: 600;
}
.required-asterisk {
    color: #ff3860;
    margin-left: 5px;
}
.input.is-danger, .textarea.is-danger, .select.is-danger select {
    border-color: #ff3860;
}
.help.is-danger {
    color: #ff3860;
}

.rating-stars .stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-stars input {
    display: none;
}

.rating-stars label:hover,
.rating-stars input:checked ~ label {
    color: #ffdd57;
}
.invite-select select {
    width: fit-content;
}

.no-bullets {
    list-style: none;
    padding-left: 0;
}

/* Fixed-position notification flag */
.flag-notification {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 2000;
    max-width: 300px;
    transition: opacity 0.5s ease-in-out;
}

.flag-notification.fade-out {
    opacity: 0;
}

/* Theme-aware calendar export icons */
.calendar-export-button {
    background: transparent;
    border: none;
    box-shadow: none;
    color: inherit;
}

.calendar-export-button:hover {
    background: transparent;
    box-shadow: none;
}

.calendar-export-button .icon {
    color: inherit;
}

/* Responsive event map modal */
#map-modal .modal-content {
    width: 90vw;
    height: 90vh;
    max-height: 90vh;
}

#map-modal .box {
    height: 100%;
}

#map-viewer-container {
    width: 100%;
    height: 100%;
}

/* Audit log */
.audit-refresh-container {
    text-align: right;
    margin-bottom: 0.5rem;
}

.audit-body {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Game banner for session details modal */
.game-banner {
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
}

.game-banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 200px;
}

/* Steam game autocomplete */
.steam-autocomplete {
    position: relative;
}

.steam-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
}

.steam-suggestions-dropdown .suggestion-item {
    cursor: pointer;
}

.steam-game-icon {
    width: 18px;
    height: 18px;
}

.steam-suggestion-image {
    width: 32px;
    height: 18px;
    object-fit: cover;
}

.steam-suggestion-appid {
    border-radius: 3px;
}

/* Responsive tabs */
.tabs {
    overflow-x: visible;
}

.tabs ul {
    flex-wrap: wrap;
}

#ai-nudge {
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#ai-nudge-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #3298dc;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
