/* ===========================================
   Events Page Styles
   Matches FamilyRack design language
   =========================================== */

/* Page Container */
.events-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
}

/* Create Event Card (Dashed Border) */
.create-event-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border: 2px dashed var(--primary);
    border-radius: 16px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 16px;
}

.create-event-card:hover {
    background: var(--primary-soft);
    border-color: var(--primary-dark);
}

.create-event-card .mdi {
    font-size: 20px;
}

/* Events Tabs */
.events-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--border);
}

.events-tab {
    flex: 1;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.events-tab:hover {
    color: var(--text);
    background: var(--background);
}

.events-tab.active {
    background: var(--primary);
    color: white;
}

/* Event Card (List/Index Page) */
.events-container .event-card {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.1s, box-shadow 0.2s;
}

.events-container .event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Cover Image in Event Card */
.event-cover-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-right: 16px;
}

.event-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Event Content (List Page) */
.event-content {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 8px;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-meta-item .mdi {
    font-size: 16px;
    color: var(--text-light);
    flex-shrink: 0;
}

.event-families {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.family-badge {
    padding: 4px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

.events-container .event-chevron {
    color: var(--text-light);
    font-size: 24px;
    margin: auto 12px auto 0;
}

/* Empty State */
.events-empty {
    text-align: center;
    padding: 60px 24px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.events-empty .mdi {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.events-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.events-empty-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Loading Spinner for Infinite Scroll */
.events-loading {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.events-loading .mdi {
    font-size: 24px;
    color: var(--primary);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===========================================
   Event Form (New/Edit)
   =========================================== */

.event-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px;
}

.event-form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 32px;
}

/* Form Fields */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.form-label .mdi {
    font-size: 18px;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text);
    background: white;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-input-file {
    width: 100%;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--background);
    cursor: pointer;
}

.form-hint {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Cover Image Preview */
.cover-image-preview {
    margin-top: 12px;
    position: relative;
}

.cover-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    object-fit: cover;
}

.current-cover-image {
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.current-cover-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    object-fit: cover;
}

.remove-cover-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.remove-cover-btn:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* Share Section (reuse from quotes) */
.share-section {
    margin-top: 24px;
    margin-bottom: 32px;
}

.share-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.share-section-header .mdi {
    font-size: 22px;
    color: var(--text);
}

.share-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* Submit Button */
.event-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.event-submit-btn:hover {
    background: var(--primary-dark);
}

.event-submit-btn .mdi {
    font-size: 20px;
}

.event-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Life Event Link Section */
.life-event-link-section .form-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.life-event-link-section .form-label .mdi {
    font-size: 18px;
    color: var(--primary);
}

/* ===========================================
   Event Detail Page (Show)
   =========================================== */

.event-detail-container {
    max-width: 800px;
    margin: 24px auto;
    padding: 16px;
}

.event-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: var(--background);
}

.event-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.btn-action:hover {
    background: var(--primary);
    color: white;
}

.btn-action:focus {
    outline: none;
}

.btn-action.btn-delete {
    background: rgba(220, 38, 38, 0.1);
    color: rgb(220, 38, 38);
}

.btn-action.btn-delete:hover {
    background: rgb(220, 38, 38);
    color: white;
}

/* Event Card (Detail Page) */
.event-card-detail {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.event-cover-image-large {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.event-cover-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
}

.event-header {
    padding: 20px;
}

.event-title-large {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.event-meta-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.event-meta-row .mdi {
    font-size: 18px;
    color: var(--text-light);
    flex-shrink: 0;
}

.event-location-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.event-location-link:hover {
    text-decoration: underline;
}

.event-location-link .mdi {
    font-size: 14px;
    margin-top: 0;
}

.event-body {
    padding: 0 20px 20px 20px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
}

/* ===========================================
   RSVP Section
   =========================================== */

.rsvp-section {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-top: 24px;
}

.rsvp-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rsvp-form-section {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.rsvp-form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.current-rsvp-status {
    padding: 10px 14px;
    background: var(--background);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.rsvp-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.rsvp-status-attending {
    background: #dcfce7;
    color: #166534;
}

.rsvp-status-maybe {
    background: #fef9c3;
    color: #854d0e;
}

.rsvp-status-not_attending {
    background: #fee2e2;
    color: #991b1b;
}

.rsvp-form {
    display: grid;
    gap: 12px;
}

.rsvp-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rsvp-form-row label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.rsvp-select,
.rsvp-input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.rsvp-select:focus,
.rsvp-input:focus {
    outline: none;
    border-color: var(--primary);
}

.rsvp-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.rsvp-submit-btn:hover {
    background: var(--primary-dark);
}

.rsvp-list-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.rsvp-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rsvp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    flex-wrap: wrap;
}

.rsvp-family-name {
    font-weight: 500;
    color: var(--text);
}

.rsvp-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.rsvp-responded-by {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

.no-rsvps {
    color: var(--text-light);
    font-style: italic;
}

/* ===========================================
   Comments Section
   =========================================== */

.comments-section {
    margin-top: 24px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-avatar .avatar-initials {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.comment-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.comment-body {
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.comment-delete-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}

.comment-delete-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: rgb(220, 38, 38);
}

.comment-delete-btn:focus {
    outline: none;
}

.comment-edit-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}

.comment-edit-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: rgb(59, 130, 246);
}

.comment-edit-btn:focus {
    outline: none;
}

/* Comment Form */
.comment-form {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.comment-input {
    flex: 1;
    min-height: 60px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    height: fit-content;
}

.comment-submit-btn:hover {
    background: var(--primary-dark);
}

/* Like Button */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.like-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.like-btn[data-liked="true"] {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.like-btn .mdi-heart-outline {
    color: #9ca3af;
    font-size: 20px;
}

.like-btn .mdi-heart {
    color: #ef4444;
    font-size: 20px;
}

.like-count {
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* Delete Modal */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.delete-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.delete-modal {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.delete-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.delete-modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.delete-modal-actions {
    display: flex;
    gap: 12px;
}

.delete-modal-actions form {
    flex: 1;
    margin: 0;
}

.delete-modal-actions form .delete-modal-confirm {
    width: 100%;
}

.delete-modal-cancel {
    flex: 1;
    padding: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.delete-modal-confirm {
    flex: 1;
    padding: 12px;
    background: #DC2626;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

.save-modal-confirm {
    flex: 1;
    padding: 12px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

.save-modal-confirm:hover {
    background: var(--primary-dark);
}

/* ===========================================
   Event Feed Item Styles
   =========================================== */

.event-feed-item {
    position: relative;
}

.event-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    z-index: 1;
}

.event-type-badge .mdi {
    font-size: 14px;
}

.event-feed-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 8px;
}

.event-feed-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-feed-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    padding: 0 20px;
}

/* Add top padding when there's no cover image (title follows header directly) */
.post-card-header+.event-feed-title {
    padding-top: 12px;
}

.event-feed-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding: 0 20px;
}

.event-feed-location a {
    color: var(--primary);
    text-decoration: none;
}

.event-feed-location a:hover {
    text-decoration: underline;
}

.event-feed-location .mdi {
    font-size: 16px;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 640px) {

    .events-container,
    .event-form-container,
    .event-detail-container {
        padding: 16px;
    }

    .event-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .events-container .event-card {
        flex-direction: column;
        padding: 0;
        overflow: hidden;
    }

    .event-cover-image {
        width: 100%;
        height: 160px;
        border-radius: 0;
        margin-right: 0;
        margin-bottom: 0;
    }

    .event-content {
        padding: 16px;
    }

    .rsvp-form {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   Media Gallery Section
   =========================================== */

.media-gallery-section {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-top: 24px;
}

.media-gallery-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-gallery-title .mdi {
    font-size: 22px;
    color: var(--primary);
}

/* Add Media Form */
.add-media-form {
    margin-bottom: 20px;
}

.add-media-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.add-media-label:hover {
    background: var(--primary);
    color: white;
}

.add-media-label .mdi {
    font-size: 20px;
}

.add-media-input {
    display: none;
}

.add-media-uploading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--background);
    color: var(--text-secondary);
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
}

.add-media-uploading .mdi {
    font-size: 20px;
}

/* Media Grid */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--background);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.gallery-item .video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.gallery-item .video-overlay .mdi {
    font-size: 48px;
    color: white;
    opacity: 0.9;
}

.gallery-item-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.gallery-item:hover .gallery-item-delete {
    opacity: 1;
}

.gallery-item-delete:hover {
    background: rgba(220, 38, 38, 0.9);
}

.no-media-message {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

@media (max-width: 640px) {
    .media-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* Uploader indicator for post media */
.gallery-item-uploader {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.gallery-item-uploader .uploader-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-uploader .uploader-initials {
    font-size: 9px;
    font-weight: 600;
    color: var(--primary);
}

/* Event Ended Notice */
.event-ended-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--background);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
}

.event-ended-notice .mdi {
    font-size: 20px;
    color: var(--text-light);
}

/* Gallery Loading/Infinite Scroll */
.gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--text-light);
    font-size: 14px;
}

.gallery-loading .mdi {
    font-size: 20px;
}