/* Event page (Event.cshtml) - extracted inline styles */

/* Page loading overlay - green, responsive */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #166534 0%, #22c55e 50%, #16a34a 100%);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.page-loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.page-loading-overlay .loader-content {
    text-align: center;
    padding: 1.5rem;
}
.page-loading-overlay .loader-spinner {
    width: clamp(40px, 10vw, 56px);
    height: clamp(40px, 10vw, 56px);
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 1rem;
}
.page-loading-overlay .loader-text {
    color: rgba(255,255,255,0.95);
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    font-weight: 500;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Composer Card */
.composer-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.composer-trigger {
    padding: 1rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.composer-trigger:hover {
    background: #f2f3f5;
}
.composer-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}
.composer-placeholder {
    flex: 1;
    color: #65676b;
    font-size: 1rem;
    padding: 0.625rem 0;
}

.composer-form {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid #e4e6eb;
}
.composer-form.active {
    display: block;
}

.password-group {
    display: none;
}
.password-group.active {
    display: block;
}

.file-input-wrapper {
    margin-top: 0.75rem;
}
.file-input-label {
    display: block;
    padding: 0.75rem;
    border: 2px dashed #dadde1;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    background: #f7f8fa;
    transition: all 0.2s;
}
.file-input-label:hover {
    background: #e4e6eb;
    border-color: var(--theme-primary);
}
.file-input-label.has-files {
    border-color: var(--theme-primary);
    background: #e7f3ff;
}
input[type="file"] {
    display: none;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f2f5;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preview-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
}
.preview-remove:hover {
    background: rgba(0,0,0,0.85);
}

.composer-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Feed */
.feed { margin-top: 0; }

/* Games card (event page) */
.games-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}
.games-card-toggle {
    width: 100%;
    border: none;
    background: white;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid #e4e6eb;
}
.games-card-toggle-icon {
    margin-right: 0.5rem;
}
.games-card-toggle-text {
    flex: 1;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
}
.games-card-toggle-caret {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}
.games-card-inner {
    transition: max-height 0.2s ease, opacity 0.2s ease;
}
.games-card.is-collapsed .games-card-inner {
    display: none;
}
.games-card.is-collapsed .games-card-toggle-caret {
    transform: rotate(-90deg);
}
.games-card-header {
    padding: 0.875rem 1rem 0.75rem;
    border-bottom: 1px solid #e4e6eb;
}
.games-card-title {
    font-weight: 700;
    color: #050505;
    font-size: 0.975rem;
}
.games-card-subtitle {
    color: #65676b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
.games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
}
.games-tile {
    border: 1px solid #e4e6eb;
    background: #fff;
    border-radius: 10px;
    padding: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    transition: transform 0.08s ease, border-color 0.2s ease, background 0.2s ease;
}
.games-tile:hover {
    border-color: var(--theme-primary);
    background: var(--bg-accent);
}
.games-tile:active { transform: scale(0.99); }
.games-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-gradient-end));
    color: white;
    flex-shrink: 0;
}
.games-tile-title {
    font-weight: 700;
    color: #050505;
    font-size: 0.95rem;
    line-height: 1.2;
}
.games-tile-desc {
    color: #65676b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Games modal */
.games-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.games-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.games-modal-panel {
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}
.games-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light, #e5e7eb);
    gap: 0.75rem;
}
.games-modal-tabs {
    display: inline-flex;
    gap: 0.25rem;
    background: var(--bg-accent, #f0fdf4);
    border-radius: 10px;
    padding: 0.25rem;
}
.games-tab {
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.875rem;
    color: #374151;
}
.games-tab.active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    color: var(--theme-primary);
}
.games-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted, #6b7280);
    padding: 0.25rem 0.5rem;
}
.games-modal-close:hover { color: #111; }
.games-modal-body {
    overflow-y: auto;
    padding: 0.875rem 1rem 1.25rem;
}
.games-loading {
    color: var(--text-muted, #6b7280);
    padding: 1rem 0;
    text-align: center;
}
.games-error {
    background: rgba(239, 68, 68, 0.12);
    color: #7f1d1d;
    border-left: 4px solid #ef4444;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
}
.games-panel { display: none; }
.games-panel.active { display: block; }

/* Missions */
.missions-list {
    display: grid;
    gap: 0.5rem;
}
.mission-item {
    border: 1px solid #e4e6eb;
    background: #fff;
    border-radius: 12px;
    padding: 0.875rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.mission-item.is-completed {
    opacity: 0.78;
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.06);
}
.mission-left { min-width: 0; }
.mission-title {
    font-weight: 800;
    color: #111;
    font-size: 0.95rem;
}
.mission-desc {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
.mission-meta {
    margin-top: 0.5rem;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.mission-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-accent, #f0fdf4);
    color: var(--theme-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8125rem;
}
.mission-cta {
    border: none;
    background: var(--theme-primary);
    color: #fff;
    font-weight: 800;
    border-radius: 10px;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
}
.mission-cta:hover { background: var(--theme-primary-hover); }
.mission-cta.is-completed {
    background: #e5e7eb;
    color: #374151;
    cursor: default;
}
.mission-cta.is-completed:hover { background: #e5e7eb; }

/* BINGO */
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.bingo-square {
    border: 1px solid #e4e6eb;
    background: #fff;
    border-radius: 12px;
    padding: 0.75rem;
    min-height: 92px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.08s ease;
}
.bingo-square.is-completed {
    border-color: rgba(16, 185, 129, 0.65);
    background: rgba(16, 185, 129, 0.08);
}
.bingo-square:hover {
    border-color: var(--theme-primary);
    background: var(--bg-accent);
}
.bingo-square:active { transform: scale(0.99); }
.bingo-text {
    font-weight: 800;
    color: #111;
    font-size: 0.875rem;
    line-height: 1.25;
}
.bingo-sub {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}
.bingo-square.is-completed .bingo-sub {
    color: #065f46;
    font-weight: 800;
}
.feed-empty {
    background: white;
    border-radius: 8px;
    padding: 3rem 1rem;
    text-align: center;
    color: #65676b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.feed-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.feed-loading {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #65676b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Feed Post */
.feed-post {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.post-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.post-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    flex-shrink: 0;
}
.post-info { flex: 1; }
.post-author {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #050505;
}
.post-time {
    font-size: 0.8125rem;
    color: #65676b;
}
.post-caption {
    padding: 0 1rem 0.75rem;
    font-size: 0.9375rem;
    color: #050505;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Game badge in feed posts (missions/bingo) */
.post-game-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 1rem 0.5rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--bg-accent, #f0fdf4);
    color: var(--theme-primary);
    font-weight: 800;
    font-size: 0.8125rem;
    width: fit-content;
}
.post-images {
    display: grid;
    gap: 2px;
    background: #f0f2f5;
}
.post-images.count-1 { grid-template-columns: 1fr; }
.post-images.count-2 { grid-template-columns: repeat(2, 1fr); }
.post-images.count-3 { grid-template-columns: repeat(2, 1fr); }
.post-images.count-3 .post-image:first-child { grid-row: 1 / 3; }
.post-images.count-4 { grid-template-columns: repeat(2, 1fr); }
.post-image {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #f0f2f5;
    aspect-ratio: 1;
}
.post-images.count-1 .post-image {
    aspect-ratio: 4/3;
    max-height: 500px;
}
.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.post-image:hover img { transform: scale(1.05); }

/* More photos overlay */
.post-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.post-image-overlay:hover { background: rgba(0, 0, 0, 0.8); }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    color: #050505;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close:hover { background: white; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    color: #050505;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 99;
}
.lightbox-nav:hover { background: white; }
.lightbox-nav.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-info {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Event footer (Free plan only) - fixed at bottom of viewport */
.event-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 1rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-light, #e4e6eb);
    background: var(--bg-page, #fafdfb);
}
body.has-event-footer .container { padding-bottom: 4rem; }
.event-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary, #65676b);
    font-size: 0.9375rem;
    transition: color 0.2s;
}
.event-footer-brand:hover { color: var(--theme-primary); }
.event-footer-logo { width: 28px; height: auto; }
.event-footer-text { font-weight: 600; }

/* Mobile adjustments */
@media (max-width: 640px) {
    .composer-card,
    .feed-post { border-radius: 0; }
    .games-card { border-radius: 0; }
    .games-grid { grid-template-columns: 1fr; }
    .bingo-grid { grid-template-columns: repeat(2, 1fr); }
    .post-images.count-3 .post-image:first-child {
        grid-column: span 2;
        grid-row: auto;
    }
}

/* Privacy modal (event page only) */
.privacy-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.privacy-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.privacy-modal-panel {
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light, #e5e7eb);
    flex-shrink: 0;
}
.privacy-modal-header h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.privacy-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted, #6b7280);
    padding: 0.25rem;
}
.privacy-modal-close:hover { color: #111; }
.privacy-modal-body {
    overflow-y: auto;
    padding: 1rem 1.25rem 1.5rem;
}
.privacy-modal-body .privacy-header { text-align: center; margin-bottom: 1.5rem; }
.privacy-modal-body .privacy-header h1 { font-size: 1.375rem; margin-bottom: 0.25rem; }
.privacy-modal-body .privacy-summary { background: var(--bg-accent, #f0fdf4); border-radius: 8px; padding: 1rem; margin-bottom: 1.5rem; font-size: 0.9375rem; }
.privacy-modal-body .privacy-section { margin-bottom: 1.5rem; }
.privacy-modal-body .privacy-section h2 { font-size: 1.0625rem; margin-bottom: 0.5rem; color: #111; }
.privacy-modal-body .privacy-section p, .privacy-modal-body .privacy-section ul { font-size: 0.9375rem; line-height: 1.6; color: #374151; margin-bottom: 0.5rem; }
.privacy-modal-body .privacy-section ul { padding-left: 1.5rem; }
.privacy-modal-body .privacy-footer-links { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; text-align: center; }
.privacy-modal-body .privacy-footer-links a { color: var(--theme-primary, #059669); text-decoration: none; }
.privacy-modal-body .privacy-footer-links a:hover { text-decoration: underline; }
.privacy-modal-body a[href="/"] { display: none; }

/* Extracted inline styles (markup helpers) */
.is-hidden { display: none !important; }
.event-name-link { color: inherit; text-decoration: none; cursor: pointer; }
.composer-approval-note { margin-bottom: 0.75rem; }
.upload-btn-grow { flex: 1; }
.feed-empty-subtext { font-size: 0.875rem; margin-top: 0.5rem; }
.privacy-footer { text-align: center; padding: 0.75rem; font-size: 0.8125rem; }
.privacy-link {
    color: var(--text-muted, #6b7280);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.privacy-modal-loading { text-align: center; color: var(--text-muted); padding: 2rem; }
