/* ============================================================
   FEED.CSS — Activity Feed, Feed Posts, Reactions, Compose,
               Replies, Emoji Picker
   ============================================================ */

/* ===== ACTIVITY FEED ===== */
.feed-distance-filters {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-primary);
}

.feed-distance-filters::-webkit-scrollbar { display: none; }

.feed-distance-filters .filter-chip {
    padding: 7px 14px;
    font-size: 13px;
}

#activityFeedList {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.feed-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    align-items: flex-start;
}

.feed-item:active {
    background: var(--bg-secondary);
}

.feed-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.feed-avatar,
.feed-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.feed-status-icon {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.feed-status-icon i {
    font-size: 9px;
    color: white;
}

.feed-body {
    flex: 1;
    min-width: 0;
}

.feed-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.feed-username {
    font-weight: 700;
    cursor: pointer;
    color: var(--text-primary);
}

.feed-username:active {
    opacity: 0.7;
}

.feed-action {
    color: var(--text-secondary);
    font-weight: 400;
}

.feed-event-card {
    display: flex;
    gap: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    align-items: flex-start;
}

.feed-event-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.feed-event-thumb-placeholder {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-light);
    font-size: 20px;
}

.feed-event-info {
    flex: 1;
    min-width: 0;
}

.feed-event-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.feed-event-loc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.feed-event-loc i {
    font-size: 10px;
    color: var(--text-light);
    margin-right: 2px;
}

.feed-event-days {
    font-size: 12px;
    font-weight: 600;
}

.feed-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-light);
}

.feed-meta i {
    font-size: 10px;
    margin-right: 2px;
}

.feed-dist {
    color: var(--primary-color);
    font-weight: 600;
}

.feed-time {
    margin-left: auto;
    color: var(--text-light);
}

/* Feed item type divider */
.feed-type-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 6px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.feed-type-divider span {
    white-space: nowrap;
}

.feed-type-divider::before,
.feed-type-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}


/* ===== FEED POSTS — COMPOSE BAR ===== */
.feed-compose-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    flex-shrink: 0;
}

.feed-compose-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.feed-compose-btn {
    flex: 1;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 24px;
    padding: 11px 18px;
    font-size: 14px;
    color: var(--text-light);
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.feed-compose-btn:active {
    background: var(--border-color);
    transform: scale(0.98);
}


/* ===== FEED POST CARD ===== */
.feed-post-card {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    transition: background 0.15s ease;
}

.feed-post-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.feed-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 17px;
}

.feed-post-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.feed-post-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: inline;
    transition: opacity 0.15s;
}

.feed-post-name:active { opacity: 0.7; }

.feed-post-location {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.feed-post-location i {
    font-size: 10px;
    color: var(--text-light);
}

.feed-post-time {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
    font-weight: 500;
}

.feed-post-delete-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.15s;
    margin-top: -2px;
}

.feed-post-delete-btn:active {
    background: var(--bg-secondary);
    color: var(--danger-color);
}

.feed-post-content {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 8px;
    -webkit-user-select: text;
    user-select: text;
}

.feed-post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    display: block;
    background: var(--bg-secondary);
}

.feed-post-image:active {
    opacity: 0.92;
}

.feed-post-distance-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(52, 168, 83, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}


/* ===== POST ACTIONS BAR ===== */
.feed-post-actions {
    display: none;
}

/* Reply button styled like react-more-btn */
.feed-reply-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px dashed var(--border-color);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.2;
    vertical-align: middle;
}

.feed-reply-inline-btn:hover {
    background: var(--bg-secondary);
    border-color: #4285f4;
    color: #4285f4;
}

.feed-reply-inline-btn:active {
    transform: scale(0.93);
    background: rgba(66, 133, 244, 0.08);
    border-color: #4285f4;
    color: #4285f4;
}

.feed-reply-inline-btn i {
    font-size: 13px;
}

/* ===== REPLIES SHEET — improved ===== */
.replies-sheet {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    animation: slideUpFull 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.replies-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-primary);
}

.replies-header-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.replies-post-preview {
    flex-shrink: 0;
    margin: 0 16px 0;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-radius: 14px;
    border-left: 3px solid var(--primary-color);
    position: relative;
}

.replies-post-preview-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.replies-post-preview-author i {
    color: var(--primary-color);
    font-size: 11px;
}

.replies-post-preview-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.replies-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 4px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    flex-shrink: 0;
}

.replies-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.replies-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 8px;
}

.reply-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    align-items: flex-start;
    transition: background 0.15s;
    border-radius: 0;
}

.reply-item:active {
    background: var(--bg-secondary);
}

.reply-bubble {
    flex: 1;
    min-width: 0;
    background: var(--bg-secondary);
    border-radius: 0 14px 14px 14px;
    padding: 9px 13px 8px;
    position: relative;
}

.reply-bubble-mine {
    background: rgba(52, 168, 83, 0.09);
    border-radius: 14px 0 14px 14px;
    border: 1px solid rgba(52, 168, 83, 0.18);
}

.reply-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.reply-time {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
    margin-left: 4px;
}

.reply-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
    margin-top: 3px;
}

.reply-actions-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
}

.reply-to-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.reply-to-btn:hover,
.reply-to-btn:active {
    color: #4285f4;
}

.reply-to-btn i {
    font-size: 10px;
}

.reply-delete-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 11px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-left: auto;
}

.reply-delete-btn:active {
    background: #fce8e6;
    color: var(--danger-color);
}

/* Reply-to bar */
#replyToBar {
    flex-shrink: 0;
    background: rgba(66, 133, 244, 0.07);
    border-top: 1px solid rgba(66, 133, 244, 0.18);
    padding: 7px 16px;
    display: none;
    align-items: center;
    gap: 8px;
}

.replies-composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-primary);
}

.replies-input {
    flex: 1;
    border: 1.5px solid var(--border-color);
    border-radius: 22px;
    padding: 10px 16px;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    resize: none;
    max-height: 100px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.replies-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.replies-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #34a853, #2d9148);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
}

.replies-send-btn:active   { transform: scale(0.92); }
.replies-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Mention highlight in reply content */
.reply-mention {
    color: #4285f4;
    cursor: pointer;
    font-weight: 600;
}

.reply-mention:active {
    opacity: 0.7;
}

/* Empty replies state */
.replies-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-light);
    gap: 10px;
}

.replies-empty i {
    font-size: 36px;
    opacity: 0.35;
}

.replies-empty p {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.replies-empty span {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

/* ===== FEED POST REACTIONS ===== */
.feed-reactions-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 4px 0 2px;
    min-height: 32px;
    width: 100%;
}

.feed-reactions-row > * {
    flex: 0 0 auto;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.2;
    vertical-align: middle;
}

.reaction-pill:active {
    transform: scale(0.93);
}

.reaction-pill.mine {
    background: rgba(52, 168, 83, 0.12);
    border-color: rgba(52, 168, 83, 0.4);
}

.reaction-pill .pill-emoji {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

.reaction-pill .pill-count {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 8px;
    text-align: center;
    line-height: 1;
}

.reaction-pill.mine .pill-count {
    color: #2d9148;
}

.feed-react-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px dashed var(--border-color);
    background: transparent;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.2;
    vertical-align: middle;
}

.feed-react-more-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-light);
}

.feed-react-more-btn:active {
    transform: scale(0.93);
}

.feed-react-more-btn i {
    font-size: 12px;
}

/* Reaction summary pills shown below post content */
.feed-reaction-summary {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 6px;
}

.feed-reaction-summary:empty {
    display: none;
    margin: 0;
    padding: 0;
}




/* ===== EMOJI PICKER SHEET ===== */
.emoji-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeInOverlay 0.15s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.emoji-picker-sheet {
    background: var(--bg-primary, #fff);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUpPicker 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes slideUpPicker {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.emoji-picker-header h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.emoji-picker-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.emoji-picker-close:active {
    background: var(--border-color);
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 16px 20px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.emoji-picker-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    line-height: 1;
}

.emoji-picker-item:hover {
    background: var(--bg-secondary);
}

.emoji-picker-item:active {
    transform: scale(1.25);
    background: rgba(147, 51, 234, 0.1);
}

.emoji-picker-item.selected {
    background: rgba(147, 51, 234, 0.12);
    border-color: rgba(147, 51, 234, 0.3);
}

@keyframes reactPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.react-pop {
    animation: reactPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ===== COMPOSE POST SHEET ===== */
@keyframes slideUpFull {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.post-compose-sheet {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    animation: slideUpFull 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-compose-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-primary);
}

.post-compose-header-title {
    flex: 1;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.post-publish-btn {
    background: linear-gradient(135deg, #34a853, #2d9148);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
}

.post-publish-btn:active { transform: scale(0.96); }
.post-publish-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.post-compose-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px;
}

.post-compose-textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-primary);
    background: transparent;
    resize: none;
    min-height: 100px;
    font-family: inherit;
}

.post-compose-textarea::placeholder {
    color: var(--text-light);
}

.post-compose-footer {
    border-top: 1px solid var(--border-color);
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    flex-shrink: 0;
    background: var(--bg-primary);
}

.post-compose-tools {
    display: flex;
    gap: 4px;
}

.post-tool-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.post-tool-btn:active { transform: scale(0.96); }

.post-tool-btn.active {
    background: rgba(66, 133, 244, 0.1);
    color: var(--primary-color);
}

.post-tool-btn.active i { color: var(--primary-color); }

.post-location-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(52, 168, 83, 0.08);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.post-location-preview i {
    color: #34a853;
    font-size: 14px;
    flex-shrink: 0;
}

.post-location-preview .remove-loc {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 2px;
    font-size: 13px;
    margin-left: auto;
    flex-shrink: 0;
}

.post-image-preview-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.post-image-preview-wrap img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 14px;
    display: block;
    object-fit: cover;
}

.post-image-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.post-char-count {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.post-char-count.near-limit {
    color: #fbbc04;
    font-weight: 700;
}

.post-char-count.at-limit {
    color: var(--danger-color);
    font-weight: 700;
}


/* ===== REPLIES SHEET ===== */
.replies-sheet {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    animation: slideUpFull 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.replies-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-primary);
}

.replies-header-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.replies-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.reply-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    align-items: flex-start;
}

.reply-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.reply-body { flex: 1; min-width: 0; }

.reply-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.reply-time {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.reply-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
    margin-top: 2px;
}

.reply-delete-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
    flex-shrink: 0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.reply-delete-btn:active {
    background: #fce8e6;
    color: var(--danger-color);
}

.replies-composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-primary);
}

.replies-input {
    flex: 1;
    border: 1.5px solid var(--border-color);
    border-radius: 22px;
    padding: 10px 16px;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    resize: none;
    max-height: 100px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.replies-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.replies-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #34a853, #2d9148);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
}

.replies-send-btn:active   { transform: scale(0.92); }
.replies-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Reply-to bar */
#replyToBar {
    flex-shrink: 0;
}

.reply-to-btn:hover {
    color: #4285f4;
}

.reply-to-btn:active {
    color: #1a73e8;
}

/* Mention highlight in reply content */
.reply-mention {
    color: #4285f4;
    cursor: pointer;
    font-weight: 600;
}

.reply-mention:active {
    opacity: 0.7;
}

/* ===== EMOJI PICKER SHEET ===== */
.emoji-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99998;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeInOverlay 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.emoji-picker-sheet {
    background: var(--bg-primary);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0 16px 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    animation: slideUpPicker 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpPicker {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 12px;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 1;
}

.emoji-picker-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.emoji-picker-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.emoji-picker-close:active {
    background: var(--border-color);
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.emoji-picker-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    padding: 10px 0;
    border-radius: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

.emoji-picker-item:hover {
    background: var(--bg-secondary);
}

.emoji-picker-item:active {
    transform: scale(1.3);
    background: var(--bg-secondary);
}

.emoji-picker-item.selected {
    background: rgba(52, 168, 83, 0.15);
    border-radius: 12px;
    outline: 2px solid rgba(52, 168, 83, 0.4);
    outline-offset: -2px;
}

/* Add to app.css — RSVP Attendees section */

.rsvp-attendee-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: opacity 0.15s;
}

.rsvp-attendee-card:last-child {
    border-bottom: none;
}

.rsvp-attendee-card:active {
    opacity: 0.7;
}

.rsvp-attendee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.rsvp-attendee-avatar-ph {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.rsvp-attendee-info {
    flex: 1;
    min-width: 0;
}

.rsvp-attendee-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rsvp-attendee-loc {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   FEED COMPOSE BUTTON (two-line)
   ============================================================ */
.feed-compose-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.25;
    text-align: left;
    padding: 10px 14px;
}
.feed-compose-btn-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}
.feed-compose-btn-sub {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    white-space: normal;
    line-height: 1.35;
}

/* ============================================================
   HASHTAGS
   ============================================================ */
.feed-hashtag-link {
    color: #1d9bf0;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.feed-hashtag-link:hover {
    text-decoration: underline;
}

/* Popular hashtags bar between textarea and feed */
.popular-hashtags-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}
.popular-hashtags-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.popular-hashtags-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}
.popular-hashtags-scroll::-webkit-scrollbar {
    display: none;
}
.popular-hashtag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1d9bf0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.popular-hashtag-chip:hover,
.popular-hashtag-chip:active {
    background: rgba(29, 155, 240, 0.1);
    border-color: #1d9bf0;
    transform: translateY(-1px);
}
.popular-hashtag-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
}

/* Hashtag filter banner */
.hashtag-filter-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(29,155,240,0.12) 0%, rgba(29,155,240,0.04) 100%);
    border: 1px solid rgba(29,155,240,0.3);
    border-radius: 14px;
    padding: 12px 16px;
    margin: 14px;
}
.hashtag-filter-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.hashtag-filter-left .fa-hashtag {
    color: #1d9bf0;
    font-size: 18px;
}
.hashtag-filter-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hashtag-filter-sub {
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.hashtag-filter-clear {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.hashtag-filter-clear:hover,
.hashtag-filter-clear:active {
    background: var(--bg-secondary);
}

/* ============================================================
   PING BUTTON + DIALOG
   ============================================================ */
.feed-ping-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    color: #d97706;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.feed-ping-btn:hover,
.feed-ping-btn:active {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}
.feed-ping-btn.pinged {
    background: rgba(154,160,166,0.12);
    border-color: rgba(154,160,166,0.35);
    color: var(--text-secondary);
    cursor: default;
    opacity: 0.85;
}
.feed-ping-btn.pinged:hover {
    transform: none;
}

.ping-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInOverlay 0.2s ease;
}
.ping-dialog {
    background: var(--bg-primary);
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    animation: slideUpDialog 0.25s ease;
}
@keyframes slideUpDialog {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ping-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}
.ping-dialog-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ping-dialog-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.ping-dialog-body {
    padding: 18px 20px;
}
.ping-dialog-hint {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.ping-scope-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ping-scope-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.ping-scope-option:has(input:checked) {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.5);
}
.ping-scope-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
    flex-shrink: 0;
    cursor: pointer;
}
.ping-scope-content {
    flex: 1;
    min-width: 0;
}
.ping-scope-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.ping-scope-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.ping-dialog-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--border-color);
}
.ping-dialog-cancel {
    flex: 1;
    padding: 12px 0;
    background: var(--bg-secondary);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
}
.ping-dialog-send {
    flex: 1.5;
    padding: 12px 0;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(245,158,11,0.3);
}
.ping-dialog-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   @MENTION AUTOCOMPLETE
   ============================================================ */
.mention-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 99999;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}
.mention-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease;
}
.mention-suggestion-item:hover,
.mention-suggestion-item.active {
    background: var(--bg-secondary);
}
.mention-suggestion-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    position: relative;
}
.mention-suggestion-avatar img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}
.mention-suggestion-ph {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}
.mention-suggestion-info {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}
.mention-suggestion-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mention-suggestion-handle {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mention chips below compose area */
.post-mention-chips-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.post-mention-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.post-mention-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    background: rgba(29, 155, 240, 0.12);
    border: 1px solid rgba(29, 155, 240, 0.35);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1d9bf0;
}
.post-mention-chip-x {
    background: none;
    border: none;
    color: #1d9bf0;
    cursor: pointer;
    padding: 0 2px;
    font-size: 11px;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
}
.post-mention-chip-x:hover,
.post-mention-chip-x:active {
    opacity: 1;
}

/* @mention link in rendered post content */
.feed-mention-link {
    color: #1d9bf0;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.feed-mention-link:hover {
    text-decoration: underline;
}

/* ============================================================
   GROUPS
   ============================================================ */

/* --- Green "in Group" chip on feed posts --- */
.post-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    color: #1f7a3a;
    background: rgba(52, 168, 83, 0.12);
    border: 1.5px solid rgba(52, 168, 83, 0.35);
    transition: all 0.15s ease;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    cursor: pointer;
}
.post-group-chip:hover {
    background: rgba(52, 168, 83, 0.22);
    border-color: rgba(52, 168, 83, 0.55);
    color: #0f5a28;
}
.post-group-chip i { font-size: 10px; }
.post-group-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Groups tab list --- */
.groups-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.group-create-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #34a853 0%, #2d9148 100%);
    color: white;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(52, 168, 83, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.group-create-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(52, 168, 83, 0.55);
}

.group-card {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.12s ease;
    align-items: flex-start;
}
.group-card:hover { background: rgba(0,0,0,0.02); }

.group-card-cover {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary, #f4f5f7);
}
.group-card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d9148;
    background: linear-gradient(135deg, rgba(52,168,83,0.15), rgba(45,145,72,0.08));
    font-size: 26px;
}

.group-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.group-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.group-card-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.3;
}
.group-card-membership-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(52,168,83,0.12);
    color: #1f7a3a;
    border: 1.5px solid rgba(52,168,83,0.35);
}
.group-card-membership-chip i { font-size: 9px; }

.group-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.group-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}
.group-card-meta i { margin-right: 3px; font-size: 11px; }
.group-card-distance { color: #2d9148; font-weight: 600; }

/* --- Create / Edit group dialog fields --- */
.group-create-dialog { max-width: 460px; }

.group-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.group-field-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.group-field input[type="text"],
.group-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s ease;
    resize: vertical;
}
.group-field input[type="text"]:focus,
.group-field textarea:focus {
    outline: none;
    border-color: #34a853;
    box-shadow: 0 0 0 3px rgba(52,168,83,0.15);
}
.group-field-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}
.group-field-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #34a853;
    cursor: pointer;
}

/* --- Group detail sheet --- */
.group-detail-sheet {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9800;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.25s ease;
}

.group-detail-header-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    flex-shrink: 0;
}
.group-detail-header-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.group-detail-options-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.15s ease;
}
.group-detail-options-btn:hover { background: rgba(0,0,0,0.06); }

.group-detail-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: var(--bg-secondary, #f4f5f7);
}
.group-detail-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d9148;
    background: linear-gradient(135deg, rgba(52,168,83,0.18), rgba(45,145,72,0.08));
    font-size: 70px;
}

.group-detail-info {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.group-detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.group-detail-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}
.group-detail-join-btn,
.group-detail-leave-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 999px;
}
.group-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}
.group-detail-meta-row i { color: var(--text-light); margin-right: 4px; }
.group-detail-desc {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.group-detail-section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}
.group-detail-members-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.group-detail-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.15s ease;
}
.group-detail-member-avatar:hover { transform: scale(1.08); }

.group-detail-join-nudge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    margin: 8px 16px;
    border: 1.5px dashed rgba(52,168,83,0.4);
    border-radius: 12px;
    color: #1f7a3a;
    background: rgba(52,168,83,0.05);
    font-size: 13px;
    font-weight: 600;
}

/* Missing-location state on edit dialog (makes the reminder visible) */
#editPostLocationPreview.missing-loc .post-location-preview {
    background: rgba(234, 67, 53, 0.08);
    border: 1.5px dashed rgba(234, 67, 53, 0.5);
    color: #b93526;
}
#editPostLocationPreview.missing-loc .post-location-preview i {
    color: #b93526;
}
