/**
 * ======================================================
 *  Elonara Social – An Actually Social Network
 *  Plan real events. Connect with real people. Share real life.
 * ======================================================
 *
 *  File: app.css
 *  Description: Global styles for Elonara Social
 *  Author: Elonara Social Team
 *
 *  Branding Notes:
 *  - Use .app- prefixes for all classes
 *  - Use variable as much as possible
 *  - Consistent spacing, rounded corners
 *  - Trust-centric vocabulary only
 *
 * ======================================================
 */


/* Elonara Social - Clean Semantic CSS with .app- Prefixes */

/* Dev trick. Gives every container a green border */
/*
 {
    border: solid .5px green;
}
*/

/* Variables */
:root {
    --app-primary: #667eea;
    --app-primary-dark: #5a67d8;
    --app-text: #1f2937;
    --app-text-muted: #6b7280;
    --app-surface: #ffffff;
    --app-background: #f9fafb;
    --app-border: #e5e7eb;
    --app-success: #10b981;
    --app-success-light: #d1fae5;
    --app-success-border: #6ee7b7;
    --app-danger: #ef4444;
    --app-danger-light: #fef2f2;
    --app-danger-border: #fecaca;
    --app-warning: #f59e0b;
    --app-warning-light: #fef3c7;
    --app-info: #3b82f6;
    --app-info-light: #dbeafe;

    /* Spacing scale */
    --app-space-xs: 0.25rem;
    --app-space-sm: 0.5rem;
    --app-space-md: 1rem;
    --app-space-lg: 1.5rem;
    --app-space-xl: 2rem;

    /* Border radius scale */
    --app-radius-sm: 0.25rem;
    --app-radius-md: 0.5rem;
    --app-radius-lg: 0.75rem;
}

/* Core Layout */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18.75px;
    line-height: 1;
    color: var(--app-text);
    background-color: var(--app-background);
}

a {
    color: var(--app-primary);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
    outline: none;
}

.app-link {
    color: var(--app-primary);
    text-decoration: none;
}

.app-link:hover,
.app-link:focus {
    text-decoration: underline;
}

/* Two Column Layout */
.app-page-two-column {
    display: flex;
    gap: var(--app-space-md);
    height: 100vh;
    min-height: 25rem;
    margin: 0;
    padding: var(--app-space-sm);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for flex child scrolling */
}

.app-main-nav {
    flex-shrink: 0;
    background: var(--app-surface);
    border: 0.125rem solid var(--app-border);
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    gap: 0;
    z-index: 10;
}

.app-logo-link {
    flex: 0 0 auto;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-right: 0.0625rem solid var(--app-border);
}

.app-logo {
    height: 2rem;
    width: auto;
    display: block;
}

.app-main-nav-item {
    flex: 1;
    padding: 0.75rem 0.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--app-text-muted);
    font-weight: 500;
    border-bottom: 0.1875rem solid transparent;
    transition: all 0.2s ease;
}

.app-main-nav-item:hover,
.app-main-nav-item:focus {
    color: var(--app-primary);
    background: var(--app-background);
    outline: none;
}

.app-main-nav-item.active {
    color: var(--app-primary);
    border-bottom-color: var(--app-primary);
    background: var(--app-background);
}

.app-main-content {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .25rem;
    border: 0.125rem solid var(--app-border);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    background: var(--app-surface);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-main-content::-webkit-scrollbar {
    display: none;
}

.app-sidebar {
    flex-shrink: 0;
    width: 25%;
    overflow-y: auto;
    overscroll-behavior: contain;
    height: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-sidebar-section {
    width: 80%;
    margin-bottom: var(--app-space-lg);
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--app-space-sm);
}

.app-btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.app-profile-card {
    padding: var(--app-space-md);
    background: var(--app-surface);
    border: 0.125rem solid var(--app-border);
    border-radius: var(--app-radius-md);
}

.app-search-box {
    position: relative;
}

.app-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--app-surface);
    border: 0.125rem solid var(--app-border);
    border-radius: var(--app-radius-md);
    margin-top: var(--app-space-xs);
    max-height: 20rem;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
}

.app-sidebar::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .app-page-two-column {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 4rem);
        padding: 0.125rem;
        gap: 0.25rem;
        margin: 0;
    }
    
    .app-main {
        height: 60vh;
        min-height: 25rem;
        flex-shrink: 0;
        margin: 0;
    }
    
    .app-main-content {
        padding: 0.25rem;
        margin: 0;
        overflow-y: visible;
        overflow-x: hidden;
    }
    
    .app-sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        overflow-y: visible;
        flex-shrink: 0;
        margin-bottom: 1rem;
        padding: 0;
    }
    
    .app-main-nav-item {
        padding: 0.375rem 0.25rem;
        font-size: 0.875rem;
    }
    
    .app-section {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .app-p-4 {
        padding: 0.5rem;
    }
    
    /* Constrain card width on mobile */
    .app-card {
        max-width: 100%;
        box-sizing: border-box;
        width: 100%;
        margin: .25rem;
        padding: .25rem;
    }
    
}

/* Upload Progress Bars */
.app-progress-bar {
    width: 100%;
    height: 1.25rem;
    background: var(--app-border);
    border-radius: var(--app-radius-md);
    overflow: hidden;
}

.app-progress-fill {
    height: 100%;
    background: var(--app-info);
    width: 0%;
    transition: width 0.3s ease;
}

.app-progress-text {
    text-align: center;
    margin-top: var(--app-space-xs);
    font-size: 0.875rem;
    color: var(--app-text-muted);
}

.app-upload-message {
    padding: var(--app-space-sm);
    border-radius: var(--app-radius-sm);
    font-size: 0.875rem;
}

.app-upload-message-success {
    background: var(--app-success);
    color: white;
}

.app-upload-message-error {
    background: var(--app-danger);
    color: white;
}

/* Error Page Container */
.app-error-container {
    max-width: 37.5rem;
    margin: 0 auto;
    background: var(--app-surface);
    padding: var(--app-space-xl);
    border-radius: var(--app-radius-md);
    box-shadow: 0 0.125rem 0.625rem rgba(0,0,0,0.1);
    text-align: center;
}

/* Main Application Container */
.app-app {
    max-width: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: block;
}

/* Layout Containers */
.app-page {
    width: 100%;
    padding: 1.25rem;
}

/* Form page wrapper - wide layout */
.app-page-form {
    max-width: 90%;
    width: 90%;
    margin: 0 auto;
    padding: 1.25rem;
}

/* Form page wrapper - centered layout */
.app-page-form-centered {
    max-width: 50rem; /* Match the main column width from two-column layout */
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem;
}

/* Action bar for context navigation */
.app-action-bar {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 0.0625rem solid var(--app-border);
}

/* Main nav styling - works in both two-column and centered layouts */
.app-main-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--app-surface);
    border-bottom: 0.0625rem solid var(--app-border);
    margin-bottom: 1rem;
}

/* When nav is inside centered container, remove negative margins */
.app-page-form-centered .app-main-nav {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    margin-top: -1.25rem;
    margin-bottom: 1rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Responsive adjustments for centered form layout */
@media (max-width: 768px) {
    .app-page-form-centered {
        max-width: 100%;
        padding: 0.75rem;
    }

    .app-action-bar {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
}

.app-main {
    min-width: 0;
}

.app-sidebar {
    min-width: 0;
}

/* Core Components */
.app-section {
    background: var(--app-surface);
    border: 0.125rem solid var(--app-border);
    border-radius: 0.75rem;
    padding: .5rem;
    margin-bottom: 1.5rem;
}

.app-section-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 0.125rem solid var(--app-border);
}

.app-header {
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Typography */
.app-heading {
    font-weight: 600;
    color: var(--app-text);
    margin: 0 0 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.app-heading-xl { font-size: 2.5rem; }
.app-heading-lg { font-size: 2rem; }
.app-heading-md { font-size: 1.5rem; }
.app-heading-sm { font-size: 1.25rem; }

.app-text-primary { color: var(--app-primary); }
.app-text-muted { color: var(--app-text-muted); }
.app-text-center { text-align: center; }
.app-text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}
.app-text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}
.app-font-bold {
    font-weight: 700;
}

/* Unread Item Styling */
.app-item-unread,
.app-card.app-item-unread {
    font-weight: 700;
    background-color: var(--app-info-light);
    border-left: 0.25rem solid var(--app-primary);
    padding-left: 0.75rem;
}

.app-item-unread .app-heading {
    font-weight: 700;
}

.app-item-unread .app-text-primary {
    font-weight: 700;
}
.app-title-primary {
    color: var(--app-primary);
    font-weight: 600;
}
.app-title-secondary {
    color: var(--app-text-muted);
    font-weight: 500;
}
.app-text-meta,
.app-activity-metadata,
.app-activity-time,
.app-list-meta {
    font-size: 0.75rem;
    color: var(--app-text-muted);
}

/* Buttons */
.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
/*    padding: 0.75rem 1.25rem; */
    padding: 0.25rem 1.25rem;
    border: 0.125rem solid var(--app-primary);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--app-primary);
    color: white;
    max-height: 2rem;
}

.app-btn:hover,
.app-btn:focus {
    opacity: 0.9;
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

.app-btn-primary {
    background: var(--app-background);
    color: var(--app-text);
}

.app-btn-secondary {
    background: var(--app-surface);
    color: var(--app-text);
    border: 0.125rem solid var(--app-border);
}

.app-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
}

.app-btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.admin-dashboard-btn {
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 0.4rem;
}

.app-btn-danger {
    background: var(--app-danger);
    color: white;
    border: 0.125rem solid var(--app-danger);
}

.app-btn-danger:hover {
    opacity: 0.9;
}

.app-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border: none;
    background: none;
    color: var(--app-text-muted);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.app-btn-icon:hover {
    background: var(--app-background);
    color: var(--app-text);
}

/* Mobile adjustments */                                                        
@media (max-width: 768px) {
    
    .app-btn {
        padding: 0.25rem 1.25rem;
        border-radius: 0.5rem;
        font-size: 0.75rem;
        font-weight: 500;
        max-height: 1.25rem;
    }
    .app-btn-sm {                                                                   
        padding: 0.25rem 0.5rem;                                                  
        font-size: 0.75rem;                                                        
    }
} 


.admin-user-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-user-card {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid var(--app-border);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    width: 100%;
}

.admin-user-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.admin-user-name {
    font-weight: 700;
    color: #10162f;
    font-size: 1rem;
}

.admin-user-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #eef2fb;
    color: #4a5470;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.admin-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.admin-user-field {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #4a5470;
}

.admin-user-field.is-right {
    justify-content: flex-end;
    text-align: right;
}

.admin-user-field span {
    font-weight: 600;
    color: #10162f;
}

.admin-user-verified {
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-user-verified.is-verified {
    color: #15803d;
}

.admin-user-verified.is-unverified {
    color: #b91c1c;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.admin-user-actions form {
    margin: 0;
}

.app-reply-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* Alerts */
.app-alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 0.0625rem solid transparent;
    border-radius: 0.375rem;
}

.app-alert-success {
    background-color: var(--app-success-light);
    border-color: var(--app-success-border);
    color: var(--app-success);
}

.app-alert-error {
    background-color: var(--app-danger-light);
    border-color: var(--app-danger-border);
    color: var(--app-danger);
}

.app-alert-info {
    background-color: #e7f3ff;
    border-color: #4a90e2;
    color: #2563a8;
}

/* Badges */
.app-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    max-height: 2rem;
}

.app-badge-primary {
    background-color: var(--app-primary);
    color: white;
}

.app-badge-secondary {
    background-color: var(--app-text-muted);
    color: white;
}

.app-badge-success {
    background-color: var(--app-success);
    color: white;
}

.app-badge-public {
    background-color: var(--app-info-light);
    color: var(--app-info);
}

.app-badge-private {
    background-color: var(--app-danger-light);
    color: var(--app-danger);
}


/* Forms */
.app-form-group {
    margin-bottom: 1.25rem;
}

.app-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--app-text);
}

.app-form-input, 
.app-form-textarea, 
.app-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 0.125rem solid var(--app-border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--app-surface);
}

.app-form-input:focus, 
.app-form-textarea:focus, 
.app-form-select:focus {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.1875rem rgba(102, 126, 234, 0.1);
}

/* Cards */
.app-card {
    background: var(--app-surface);
    border: 0.0625rem solid var(--app-border);
    border-radius: 0.5rem;
    overflow: hidden;
    margin: .25rem;
}

.app-card-header {
    padding: 1rem;
    border-bottom: 0.0625rem solid var(--app-border);
    background: var(--app-background);
}

.app-card-body {
    padding: 1rem;
}

.app-card-footer {
    padding: 1rem;
    border-top: 0.0625rem solid var(--app-border);
    background: var(--app-background);
}

.app-card-info {
    border-color: var(--app-primary);
}

.app-card-success {
    border-color: var(--app-success);
}

.app-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.app-card-sub {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.app-card-desc {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.app-card-meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
}

.app-card-image {
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;
}

.app-card-image-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Navigation */
.app-nav {
    flex-shrink: 0;
    display: flex;
    gap: 0.25rem;
    background: var(--app-surface);
    border: 0.125rem solid var(--app-border);
    border-left: none;
    border-right: none;
    border-top: none;
    padding: 0.25rem .25rem;
    margin: 0;
}

.app-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.25rem .25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--app-text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    max-height: 2rem;
}

.app-nav-item:hover,
.app-nav-item:focus {
    background: var(--app-background);
    color: var(--app-text);
    outline: none;
}

.app-nav-item.active {
    background: var(--app-primary);
    color: white;
}

/* Tab Navigation */
.app-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--app-surface);
    border: 0.125rem solid var(--app-border);
    border-radius: 0.75rem;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.app-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--app-text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.app-tab:hover {
    background: var(--app-background);
    color: var(--app-text);
    text-decoration: none;
}

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

/* Profile Components */
/* Added by lonn 2025-08-09 */






/* end added by lonn */
.app-profile-cover {
    aspect-ratio: 3/1;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.app-profile-avatar {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    border: 0.25rem solid white;
    background: white;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
    position: relative;
}

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

.app-avatar-upload-btn {
    position: absolute;
    bottom: 0.25rem;
    right: 0.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--app-primary);
    color: white;
    border: 0.125rem solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

/* Avatar styles */
.app-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--app-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.app-avatar:hover {
    background: var(--app-primary-dark);
    transform: scale(1.05);
    color: white;
    text-decoration: none;
}

.app-avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.app-avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.125rem;
}

.app-avatar-xl {
    width: 6rem;
    height: 6rem;
    font-size: 2rem;
}

.app-avatar-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.app-avatar img,
.app-avatar .app-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Layout Utilities */
.app-flex { display: flex; }
.app-flex-1 { flex: 1; }
.app-flex-between { justify-content: space-between; }
.app-flex-center { justify-content: center; }
.app-flex-wrap { flex-wrap: wrap; }
.app-flex-column { flex-direction: column; }
.app-gap,
.app-gap-4 { gap: 1rem; }

.app-grid { display: grid; }
.app-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app-grid-3 { grid-template-columns: repeat(3, 1fr); }
.app-grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
}
.app-flex-shrink-0 {
    flex-shrink: 0;
}

/* Spacing System - Consolidated Scale */
.app-mb,
.app-mb-4 { margin-bottom: 1rem; }
.app-mt,
.app-mt-4 { margin-top: 1rem; }
.app-p-4 { padding: 1rem; }
.app-p-8 { padding: 2rem; }
.app-p-16 { padding: 4rem; }
.app-pb-3 { padding-bottom: 0.75rem; }
.app-m-5 { margin: 1.25rem; }

/* Form */
.app-form {
    width: 100%;
}

/* Stats */
.app-stat {
    flex-shrink: 0;
    min-width: 3.75rem;
}

.app-stat-number {
    font-size: 1.5rem;
    font-weight: 600;
}

.app-stat-label {
    font-size: 0.875rem;
    color: var(--app-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .app-page,
    .app-page-form {
        padding: 0.25rem;
        width: 100%;
        margin: 0;
    }

    .app-page-form {
        max-width: 100%;
    }

    .app-section {
        padding: 0.25rem;
        margin-bottom: 0.25rem;
    }

    .app-header {
        margin-bottom: 0.25rem;
        padding: 0;
    }

    .app-nav {
        flex-direction: column;
    }

    .app-nav-item {
        justify-content: flex-start;
    }

    .app-grid-2,
    .app-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }
    
    
    .app-profile-avatar {
        width: 6rem;
        height: 6rem;
        flex-shrink: 0;
    }
    
    .app-profile-avatar img {
        width: 6rem;
        height: 6rem;
        object-fit: cover;
    }
    
    .app-flex {
        flex-wrap: wrap;
    }
    
    .app-gap {
        gap: 0.25rem;
    }
    
    .app-mb {
        margin-bottom: 0.25rem;
    }
    
    .app-mt {
        margin-top: 0.25rem;
    }
}






.app-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.app-modal-content {
    position: relative;
    background: var(--app-surface);
    border-radius: 0.5rem;
    max-width: 90vw;
    max-height: none;
    width: 31.25rem;
    overflow: visible;
    margin: 2rem auto;
    box-shadow: 0 1.5625rem 3.125rem -0.75rem rgba(0, 0, 0, 0.25);
}

.app-modal-sm .app-modal-content {
    width: 25rem;
}

.app-modal-header {
    padding: 1rem;
    border-bottom: 0.0625rem solid var(--app-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.app-modal-body {
    padding: 1rem;
    overflow-y: auto;
}

.app-modal-footer {
    padding: 1rem;
    border-top: 0.0625rem solid var(--app-border);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Modal Styles - All modals use same positioning */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    overflow-y: auto;
}

.app-reply-modal .app-modal-content {
    position: relative;
    width: 37.5rem;
    max-width: 90vw;
    max-height: none;
    overflow: visible;
    margin: 2rem auto;
    box-shadow: 0 1.5625rem 3.125rem -0.75rem rgba(0, 0, 0, 0.25);
}

.app-btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    color: var(--app-text-muted);
    transition: all 0.2s ease;
}

.app-btn-close:hover {
    background: var(--app-background);
    color: var(--app-text);
}

.app-reply-modal .app-modal-header {
    background: var(--app-background);
    border-bottom: 0.0625rem solid var(--app-border);
    border-radius: 0.5rem 0.5rem 0 0;
}

.app-reply-modal .app-modal-body {
    padding: 0;
}

.app-reply-form {
    padding: 1.5rem;
}

.app-form-row {
    margin-bottom: 1rem;
}

.app-form-row:last-child {
    margin-bottom: 0;
}

.app-form-column {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.app-form-column:last-child {
    margin-bottom: 0;
}

.app-form-row label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--app-text);
}

.app-guest-fields {
    background: var(--app-background);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.app-guest-fields .app-form-row {
    display: flex;
    gap: 1rem;
}

.app-guest-fields .app-form-row > div {
    flex: 1;
}

.app-input,
.app-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 0.125rem solid var(--app-border);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

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

.app-textarea {
    resize: vertical;
    min-height: 7.5rem;
}

/* File Upload Section */
.app-file-upload-section {
    margin-top: 1rem;
}

.app-file-help-text {
    font-size: 0.875rem;
    color: var(--app-text-muted);
    margin-top: 0.5rem;
}

.app-file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.app-file-preview {
    position: relative;
    border: 0.125rem solid var(--app-border);
    border-radius: 0.375rem;
    padding: 0.5rem;
    background: var(--app-background);
}

.app-file-preview img {
    width: 6.25rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 0.25rem;
}

.app-file-info {
    margin-top: 0.5rem;
    text-align: center;
}

.app-file-name {
    display: block;
    font-size: 0.75rem;
    color: var(--app-text-muted);
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.app-file-remove-btn {
    background: var(--app-danger);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.app-file-remove-btn:hover {
    background: #dc2626;
}

.app-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 0.0625rem solid var(--app-border);
}

.app-form-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border: 0.0625rem solid #fecaca;
}


/* Modal Open Body Style */
body.app-modal-open {
    overflow: hidden;
}

/* Followers List Styles */
.app-followers-list {
    max-height: 25rem;
    overflow-y: auto;
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.25rem;
}

.app-follower-item {
    padding: 0.75rem 1rem;
    border-bottom: 0.0625rem solid #f3f4f6;
}

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

.app-follower-item:hover {
    background-color: #f9fafb;
}

.app-form-checkbox {
    margin-right: 0;
}

.app-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 0.1875rem solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.app-modal-lg .app-modal-content {
    width: 50rem;
}

/* Activity Feed */
.app-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    background: var(--app-background);
}

.app-activity-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--app-primary);
    color: white;
    font-size: 0.875rem;
}

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

.app-activity-description {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.app-activity-link {
    color: var(--app-primary);
    text-decoration: none;
}

.app-activity-link:hover {
    text-decoration: underline;
}

.app-text-meta,
.app-activity-metadata,
.app-activity-time,
.app-list-meta {
    font-size: 0.75rem;
    color: var(--app-text-muted);
}

.app-activity-metadata {
    margin-bottom: 0.25rem;
}

.app-activity-feed-empty {
    text-align: center;
    padding: 2rem;
    color: var(--app-text-muted);
}


/* Form Enhancements */

.app-form-help {
    font-size: 0.875rem;
    color: var(--app-text-muted);
    margin-top: 0.25rem;
}



/* List Components */
.app-member-list,
.app-invitation-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 0.0625rem solid var(--app-border);
    border-radius: 0.375rem;
}

.app-member-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
}

.app-member-details {
    flex: 1;
}

.app-member-actions {
    display: flex;
    gap: 0.5rem;
}

/* Member Display Component */
.app-member-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-member-display-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.app-member-name {
    font-weight: 500;
    color: var(--app-text);
}

.app-member-display-inline .app-member-name {
    font-weight: 600;
}

/* Standardized Member/Invite Cards */

.app-invitation-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    border: 0.0625rem solid var(--app-border);
    border-radius: 0.5rem;
    background: var(--app-surface);
}

.app-invitation-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.app-invitation-title {
    font-size: 1rem;
    font-weight: 600;
}

.app-invitation-body {
    margin-top: 0.25rem;
}

.app-invitation-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    min-width: 9rem;
}

.app-invitation-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.app-invitation-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .app-invitation-item {
        flex-direction: column;
        gap: 1rem;
    }

    .app-invitation-aside {
        align-items: flex-start;
        min-width: 0;
    }

    .app-invitation-badges,
    .app-invitation-actions {
        justify-content: flex-start;
    }
}


.app-community-header {
    padding: 1.5rem;
    background: var(--app-background);
    border-bottom: 0.0625rem solid var(--app-border);
}

/* Event Components */
.app-event-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-event-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-event-info-summary {
    background: var(--app-background);
    padding: 1rem;
    border-radius: 0.375rem;
    border: 0.0625rem solid var(--app-border);
}

.app-event-conversations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-event-conversations-grouped {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-event-conversation-group {
    border: 0.0625rem solid var(--app-border);
    border-radius: 0.375rem;
    overflow: hidden;
}

.app-event-group-header {
    background: var(--app-background);
    border-bottom: 0.0625rem solid var(--app-border);
    cursor: pointer;
}

.app-event-group-header:hover {
    background: #f3f4f6;
}

.app-expand-icon {
    transition: transform 0.2s ease;
}


/* Conversations Navigation */
.app-conversations-nav {
    display: flex;
    gap: 0.5rem;
}

.app-conversations-nav.app-flex-between {
    align-items: flex-start;
}

.app-conversations-filters {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.app-conversations-filters .app-btn {
    flex: 1;
    text-align: center;
    transition: all 0.2s ease;
}

.app-conversations-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.app-conversations-nav:not(.app-flex-between) .app-btn {
    flex: 1;
    text-align: center;
    transition: all 0.2s ease;
}

.app-conversations-nav .app-btn.is-active {
    background: var(--app-primary);
    color: white;
    border-color: var(--app-primary);
}

.app-conversations-nav .app-btn:not(.is-active):hover {
    background: var(--app-background);
    border-color: var(--app-primary);
    color: var(--app-primary);
}

/* Tab Navigation (Standardized Navigation Component) */
.app-tab-nav {
    display: flex;
    gap: 0.5rem;
}

.app-tab-nav .app-btn {
    flex: 1;
    text-align: center;
    transition: all 0.2s ease;
}

.app-tab-nav .app-btn.is-active {
    background: var(--app-primary);
    color: white;
    border-color: var(--app-primary);
}

.app-tab-nav .app-btn:not(.is-active):hover {
    background: var(--app-background);
    border-color: var(--app-primary);
    color: var(--app-primary);
}

/* Danger Zone Component */
.app-danger-zone {
    border: 2px solid var(--app-danger);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 3rem;
    background: var(--app-danger-light);
}

.app-danger-zone-title {
    color: var(--app-danger);
    font-weight: 600;
}

.app-danger-zone-form {
    margin-top: 1rem;
}

/* Entity Card Component */
.app-entity-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-entity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-conversations-list.app-is-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.app-conversations-list.app-is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 0.1875rem solid var(--app-border);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: app-spinner 1s linear infinite;
}

@keyframes app-spinner {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .app-conversations-nav {
        gap: 0.25rem;
    }
    
    /* Stack combined navigation on mobile */
    .app-conversations-nav.app-flex-between {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .app-conversations-filters {
        gap: 0.25rem;
    }
    
    .app-conversations-nav .app-btn,
    .app-conversations-filters .app-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }
    
    .app-conversations-actions .app-btn {
        font-size: 0.875rem;
        width: 100%;
    }
}

/* Utilities */

.app-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: app-loading 1.5s infinite;
}

@keyframes app-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.app-conditional-hide {
    display: none;
}

.app-error-wrapper {
    padding: 1rem;
    background: #fef2f2;
    border: 0.0625rem solid #fecaca;
    border-radius: 0.375rem;
    color: #dc2626;
}

.app-success-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.app-min-w-20 {
    min-width: 5rem;
}

/* Sidebar Button Styling */
.app-sidebar .app-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Content Embed Styling */
.app-content iframe,
.app-content embed,
.app-content object {
    max-width: 100%;
    height: auto;
}

/* Embeds */
.app-embed {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.75rem;
  align-items: start;
  background: var(--app-surface);
  border: 0.0625rem solid var(--app-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  overflow: hidden;
  margin: 1rem 0;
  transition: border-color 0.2s ease;
}

.app-embed:hover {
  border-color: var(--app-primary);
}

.app-embed-image-wrapper {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.5rem;
}

.app-embed-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.app-embed:hover .app-embed-image {
  transform: scale(1.02);
}

.app-embed-content { 
  min-width: 0; 
}

.app-embed-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  text-decoration: none;
  color: var(--app-text);
  transition: color 0.2s ease;
  margin: 0 0 0.375rem 0;
}

.app-embed-title:hover {
  color: var(--app-primary);
}

.app-embed-description {
  margin-top: 0.375rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--app-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 0.5rem 0;
}

.app-embed-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--app-text-muted);
  opacity: 0.7;
}

.app-embed-provider {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--app-text-muted);
  opacity: 0.7;
}

.app-embed-link { 
  text-decoration: none; 
  color: inherit;
}

@media (max-width: 768px)g {
  .app-embed {
    grid-template-columns: 1fr;
  }
  .app-embed-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* Profile Header Layout */
.app-avatar-row {
  padding: 1rem;
  margin-top: -3rem;
  align-items: flex-end;
  width: 100%;
}

.app-profile-identity {
  padding: 1rem;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  clear: both;
}

@media (max-width: 768px)g {
  .app-avatar-row {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: -2rem;
  }
}

/* Enhanced Date Picker - Minimal additions to existing classes */
.app-date-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.app-option-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.app-field-error {
  border-color: var(--app-danger) !important;
}

@media (max-width: 768px) {
  .app-date-time-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Menu - Minimal additions using existing classes */
.app-mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.app-mobile-menu-toggle.app-main-nav-item {
  justify-content: center;
  align-items: center;
}

.app-hamburger-icon {
  display: flex;
  flex-direction: column;
  width: 1.125rem;
  height: 0.875rem;
  gap: 0.1875rem;
}

.app-hamburger-icon span {
  height: 0.125rem;
  width: 100%;
  background: currentColor;
  border-radius: 0.0625rem;
  transition: all 0.2s ease;
  transform-origin: center;
}

.app-mobile-menu-toggle-active .app-hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(0.1875rem, 0.1875rem);
}

.app-mobile-menu-toggle-active .app-hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.app-mobile-menu-toggle-active .app-hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(0.1875rem, -0.1875rem);
}

/* Utility Classes */
.app-hidden {
  display: none;
}

/* Mobile Menu Modal Positioning */
.app-mobile-menu-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

.app-mobile-menu-modal .app-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.app-mobile-menu-modal .app-modal-content {
  position: relative;
  z-index: 2;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.15);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  width: 100%;
  max-width: 20rem;
}

.app-mobile-menu-close {
  min-width: auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .app-mobile-menu-toggle {
    display: flex;
  }
  
  .app-has-mobile-menu .app-btn-secondary,
  .app-has-mobile-menu .app-btn:not(:first-child) {
    display: none;
  }
  
  .app-mobile-menu-modal {
    padding: 1rem;
  }
  
  .app-mobile-menu-modal .app-modal-content {
    max-width: none;
    width: 100%;
  }
  
  /* Hide sidebar completely on mobile since navigation is now in mobile menu */
  .app-sidebar {
    display: none;
  }
  
  /* Make main content full width on mobile */
  .app-main-content {
    flex: 1;
    max-width: none;
  }
  
  /* Adjust two-column layout for mobile */
  .app-two-column-layout {
    flex-direction: column;
  }
  
  /* Mobile search input - slightly larger than buttons */
  .app-mobile-search-input {
    height: 2.625rem;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
  }
  
  /* Mobile search results - fix positioning in modal */
  .app-mobile-menu-modal .app-search-results {
    position: static;
    box-shadow: none;
    border: 0.0625rem solid var(--app-border);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    max-height: 18.75rem;
  }
}

/* Search Styles */
.app-search-box {
  position: relative;
  width: 100%;
}

.app-search-box .app-input {
  background: var(--app-surface);
  color: var(--app-text);
  border: 0.125rem solid var(--app-border);
  border-radius: 0.5rem;
  padding: 0.25rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.app-search-box .app-input:focus {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 0.1875rem rgba(102, 126, 234, 0.1);
  text-align: left;
}

.app-search-box .app-input::placeholder {
  color: var(--app-text-muted);
  font-weight: 500;
}

.app-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--app-surface);
  border: 0.0625rem solid var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1);
  z-index: 50;
  max-height: 25rem;
  overflow-y: auto;
}

.app-search-results-list {
  padding: 0.5rem 0;
}

.app-search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid var(--app-border);
  cursor: pointer;
  transition: background-color 0.2s;
}

.app-search-result-item:hover,
.app-search-result-item.active {
  background: var(--app-background);
}

.app-search-result-item:last-child {
  border-bottom: none;
}

.app-search-result-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.app-search-result-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.app-search-result-title a {
  text-decoration: none;
}

.app-search-result-snippet {
  margin: 0 0 0.5rem 0;
  font-size: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-search-result-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-badge-event {
  background: #fef3c7;
  color: #92400e;
}

.app-badge-community {
  background: #dbeafe;
  color: #1d4ed8;
}

.app-badge-conversation {
  background: #dcfce7;
  color: #166534;
}

.app-badge-member {
  background: #fce7f3;
  color: #be185d;
}

/* Reply Form with Attachment Button */
.app-reply-input-container {
  position: relative;
}

.app-attachment-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--app-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.app-attachment-btn:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.app-plus-icon {
  line-height: 1;
  margin-top: -0.125rem;
}

.app-attachment-btn.files-selected {
  background: var(--app-success);
}

.app-attachment-btn.files-selected:hover {
  background: var(--app-success);
  opacity: 0.9;
}

/* Error Modal - ensure text is selectable */
.app-modal-body {
  user-select: text;
  cursor: text;
}

/* Conversation Replies */
.app-replies {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.app-reply {
  padding: 1.25rem;
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  background: var(--app-surface);
  transition: all 0.2s ease;
}

.app-reply:hover {
  border-color: var(--app-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.app-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--app-border);
}

.app-reply-author .app-member-display {
  font-weight: 600;
}

.app-reply-meta {
  font-size: 0.875rem;
  white-space: nowrap;
}

.app-reply-content {
  line-height: 1.6;
  color: var(--app-text);
}

/* Reply image container */
.app-reply-image {
  width: 100%;
  margin: 0 0 1rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 0.0625rem solid var(--app-border);
}

/* General responsive image utility */
.app-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ========================================
   Embed Cards & Video Embeds
   ======================================== */

.app-embed {
  margin: var(--app-space-lg) 0;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  overflow: hidden;
  background: var(--app-surface);
  transition: box-shadow 0.2s ease;
}

.app-embed:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Video/Rich embeds with iframes */
.app-embed-rich {
  display: block;
}

.app-embed-rich .app-embed-iframe {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: #000;
}

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

.app-embed-rich .app-embed-meta {
  padding: var(--app-space-md);
  background: var(--app-background);
  border-top: 1px solid var(--app-border);
}

/* Link preview cards */
.app-embed-card {
  display: flex;
}

.app-embed-image-wrapper {
  flex-shrink: 0;
  width: 200px;
  height: auto;
  overflow: hidden;
  background: var(--app-background);
  cursor: pointer;
}

.app-embed-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-embed-content {
  flex: 1;
  padding: var(--app-space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-embed-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--app-text);
  margin-bottom: var(--app-space-sm);
  line-height: 1.3;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.app-embed-title:hover {
  color: var(--app-primary);
}

.app-embed-description {
  color: var(--app-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: var(--app-space-sm);
}

.app-embed-meta {
  color: var(--app-text-muted);
  font-size: 0.8125rem;
}

.app-embed-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.app-embed-link:hover {
  color: var(--app-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-embed {
    flex-direction: column;
  }

  .app-embed-image-wrapper {
    width: 100%;
    max-height: 200px;
  }

  .app-embed-title {
    font-size: 1rem;
  }

  .app-embed-description {
    font-size: 0.875rem;
  }

  .app-embed-content {
    padding: var(--app-space-md);
  }
}

/* ========================================
   Bluesky Follower Selector
   ======================================== */

.app-bluesky-follower-modal .app-modal-content {
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.app-bluesky-follower-modal .app-modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.app-follower-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-follower-item {
  border: 0.0625rem solid var(--app-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.app-follower-item:hover {
  background-color: var(--app-background);
  border-color: var(--app-primary);
}

.app-follower-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
}

.app-follower-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  cursor: pointer;
}

.app-follower-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.app-follower-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.app-follower-avatar-placeholder {
  background: linear-gradient(135deg, var(--app-primary) 0%, var(--app-accent) 100%);
}

.app-follower-details {
  flex: 1;
  min-width: 0;
}

.app-follower-name {
  font-weight: 600;
  color: var(--app-text);
  margin-bottom: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-follower-handle {
  font-size: 0.875rem;
  color: var(--app-text-muted);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-follower-description {
  font-size: 0.875rem;
  color: var(--app-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--app-border);
  border-top-color: var(--app-primary);
  border-radius: 50%;
  animation: app-spin 0.8s linear infinite;
}

@keyframes app-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Bluesky connection status */
.app-text-success {
  color: #10b981;
  font-weight: 600;
}

.app-divider {
  border: 0;
  border-top: 0.0625rem solid var(--app-border);
  margin: var(--app-space-lg) 0;
}

/* Large modal variant */
.app-modal-lg .app-modal-content {
  max-width: 800px;
}

/* =============================================================================
   Responsive Images
   ============================================================================= */

/* Ensure images are responsive by default */
.app-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Profile cover image responsive */
.app-profile-cover {
    position: relative;
    width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.app-profile-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Reply images responsive */
.app-reply-image {
    width: 100%;
    max-width: 800px;
}

.app-reply-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* Mobile adjustments */
@media (max-width: 768px)g {
    .app-profile-cover {
        height: 160px;
    }

    .app-reply-image {
        max-width: 100%;
    }

    /* Smaller avatar sizes on mobile */
    .app-avatar-lg {
        width: 80px;
        height: 80px;
    }

    .app-profile-avatar {
        width: 96px;
        height: 96px;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .app-profile-cover {
        height: 200px;
    }
}

/* Image preview in forms */
#avatar-preview,
#cover-preview {
    transition: opacity 0.3s ease;
}
