/* United We Rise - Main Stylesheet */

/* ========================================
   TOTP/2FA STYLES
======================================== */

.totp-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.totp-status {
    margin-bottom: 1rem;
}

.totp-enabled, .totp-disabled, .totp-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.totp-enabled {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.totp-disabled {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.totp-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.totp-icon {
    font-size: 1.2rem;
}

.totp-date {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: auto;
}

.totp-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.totp-info, .backup-codes-info {
    margin-top: 0.5rem;
}

.backup-codes-info small {
    color: #6c757d;
}

/* TOTP Setup Modal */
.totp-setup-modal {
    min-width: 500px;
    max-width: 600px;
}

.setup-step {
    margin-bottom: 2rem;
}

.setup-step h4 {
    color: #4b5c09;
    margin-bottom: 0.5rem;
}

.qr-code-container {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.qr-code {
    max-width: 200px;
    height: auto;
}

.manual-code {
    text-align: center;
    margin-top: 1rem;
}

.manual-code code {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #495057;
    border: 1px solid #e9ecef;
}

.totp-input {
    width: 150px;
    text-align: center;
    font-size: 1.5rem;
    font-family: monospace;
    padding: 0.75rem;
    border: 2px solid #4b5c09;
    border-radius: 6px;
    margin: 1rem 0;
    letter-spacing: 0.2rem;
}

.totp-input:focus {
    outline: none;
    border-color: #6b8109;
    box-shadow: 0 0 0 3px rgba(75, 92, 9, 0.1);
}

/* Backup Codes Modal */
.backup-codes-modal {
    min-width: 500px;
    max-width: 600px;
}

.backup-codes-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.backup-code {
    font-family: monospace;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #dee2e6;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Modal Overlay for TOTP */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10003 !important;
}

.modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f8f9fa;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    margin-top: 2rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Responsive Design for TOTP */
@media (max-width: 768px) {
    .totp-setup-modal,
    .backup-codes-modal {
        min-width: 90vw;
        max-width: 90vw;
        margin: 1rem;
    }
    
    .backup-codes-list {
        grid-template-columns: 1fr;
    }
    
    .totp-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* ========================================
   CONVERSATION VIEW STYLES
======================================== */

.conversation-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.conversation-header {
    margin-bottom: 2rem;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 14px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #5a6268;
}

.conversation-title {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.conversation-location {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.engagement-count {
    color: #4b5c09;
    font-weight: 600;
}

.conversation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(75, 92, 9, 0.1);
    color: #4b5c09;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.conversation-content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.main-post {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.post-header {
    margin-bottom: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.author-name {
    font-weight: 600;
    color: #2c3e50;
}

.post-time {
    font-size: 0.85rem;
    color: #6c757d;
}

.post-body {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #2c3e50;
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: transparent;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f8f9fa;
    border-color: #4b5c09;
}

.comments-section {
    padding: 0;
}

.add-comment {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.add-comment textarea {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.comment-submit-btn {
    background: #4b5c09;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.comment-submit-btn:hover {
    background: #3a4607;
}

.comments-list {
    padding: 0;
}

.comment {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-bottom: 1px solid #f8f9fa;
}

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

.comment-avatar {
    width: 32px;
    height: 32px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #4b5c09;
    font-size: 0.9rem;
}

.comment-time {
    color: #6c757d;
    font-size: 0.8rem;
}

.comment-body {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: #2c3e50;
    font-size: 0.95rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-action {
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-action:hover {
    background: #f8f9fa;
    color: #4b5c09;
}

.error-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.error-message h2 {
    color: #dc3545;
    margin-bottom: 1rem;
}

/* ========================================
   BASE STYLES
======================================== */

html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden; /* Prevent page scrolling */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: #f0f4f8;
}

/* Basic button styling */
.btn {
    background: #4b5c09;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #3d4a08;
}

.btn-secondary {
    background: #6B8E23;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background: #556b1d;
}

/* OAuth Authentication Styles */
.oauth-divider {
    text-align: center;
    margin: 1.5rem 0 1rem 0;
    position: relative;
}

.oauth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.oauth-divider span {
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.oauth-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.oauth-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    border-color: #4285f4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
}

.microsoft-btn:hover {
    border-color: #0078d4;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.15);
}

.apple-btn {
    color: #000;
}

.apple-btn:hover {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.oauth-btn svg {
    flex-shrink: 0;
}

/* OAuth Provider Manager Styles */
.oauth-provider-manager {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.oauth-provider-manager h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2rem;
}

.oauth-description {
    color: #666;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.oauth-provider-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.oauth-provider-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.oauth-provider-card.linked {
    background: #f0f8f0;
    border-color: #c8e6c9;
}

.oauth-provider-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.provider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.provider-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #333;
}

.provider-email {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.provider-date {
    margin: 0.25rem 0 0 0;
    font-size: 0.8rem;
    color: #999;
}

.provider-status {
    margin: 0;
    font-size: 0.85rem;
    color: #999;
}

.provider-actions {
    flex-shrink: 0;
}

.link-btn, .unlink-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.link-btn {
    background: #4b5c09;
    color: white;
}

.link-btn:hover {
    background: #3d4a08;
}

.unlink-btn {
    background: #dc3545;
    color: white;
}

.unlink-btn:hover {
    background: #c82333;
}

.oauth-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.oauth-message.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.oauth-message.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none;
}

details {
    margin-bottom: 0.5rem;
}

/* ========================================
   TOP BAR STYLES
======================================== */

.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 5.5vh;
    background: #202e0c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 10;
    box-sizing: border-box;
}

.top-bar-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.top-bar-center {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-bar-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.desktop-search {
    padding: 8px 12px;
    width: 250px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.9);
}

.desktop-search:focus {
    outline: 2px solid #6B8E23;
    background: white;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 0;
}

.logo-circle {
    height: 60px;
    width: 60px;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    border-radius: 50%;  /* Keeps the hover effect circular */
    /* Circle fills the whole image now, so no special fitting needed */
}

.logo-circle:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(0,0,0,0.35);
}

/* Site Title Styles */
.site-title-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.site-title-container:hover .site-title-left,
.site-title-container:hover .site-title-right {
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    transform: translateY(-1px);
}

.site-title-left,
.site-title-right {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    user-select: none;
    transition: all 0.2s ease;
}

.site-title-right {
    position: relative;
}

.rise-e {
    position: relative;
    display: inline-block;
}

.beta-badge {
    position: absolute;
    top: -4px;
    left: 0px;
    background: #ff6b35;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    animation: subtle-pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Responsive adjustments for site title */
@media (max-width: 1024px) {
    .site-title-left,
    .site-title-right {
        font-size: 1.5rem;
    }
    
    .site-title-container {
        gap: 0.5rem;
    }
    
    .logo-circle {
        height: 50px;
        width: 50px;
    }
}

@media (max-width: 768px) {
    .site-title-left,
    .site-title-right {
        font-size: 1.2rem;
    }
    
    .site-title-container {
        gap: 0.4rem;
    }
    
    .logo-circle {
        height: 40px;
        width: 40px;
    }
    
    .beta-badge {
        font-size: 0.5rem;
        padding: 1px 4px;
        margin-left: 0.2rem;
    }
}

@media (max-width: 480px) {
    .site-title-left,
    .site-title-right {
        font-size: 1rem;
    }
    
    .logo-circle {
        height: 35px;
        width: 35px;
    }
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.login-btn {
    background: #6B8E23;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-btn:hover {
    background: #556b1d;
}

.notification-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.notification-btn:hover {
    background: rgba(255,255,255,0.1);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #d32f2f;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 1.2rem;
}

.mobile-search-btn:hover {
    background: rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

/* ========================================
   LAYOUT STRUCTURE
======================================== */

.container {
    display: flex;
    height: calc(100vh - 5.5vh); /* Full height minus top bar */
    margin-top: 5.5vh;
    overflow: hidden; /* Prevent container overflow */
}

.sidebar {
    background: #4b5c09;
    color: white;
    width: 3vw;
    transition: width 0.3s ease;
    position: fixed;
    top: 5.5vh;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 9;
}

.sidebar.expanded {
    width: 10vw;
}

.sidebar.expanded .thumbs {
    align-items: flex-start;
    padding-left: 0.5rem;
}

.sidebar .thumbs {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
    padding-left: 0;
    flex-grow: 1;
}

.sidebar .thumb {
    margin: 10px 0;
    cursor: pointer;
    font-size: 1.1rem; /* Reduced from 1.5rem */
    white-space: nowrap;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar .thumb:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar .label {
    margin-left: 10px;
    display: none;
    font-size: 0.8rem; /* Smaller text for labels */
}

.sidebar.expanded .label {
    display: inline;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar.expanded .sidebar-bottom {
    align-items: flex-start;
}

/* Old toggle sidebar styles - keeping for legacy compatibility */
#toggleSidebar {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    align-self: center;
    margin-bottom: 0.5rem;
}

/* New edge toggle button styles */
.sidebar-toggle-edge {
    position: fixed;
    top: 50%;
    left: 3vw; /* Position at the edge of collapsed sidebar */
    transform: translateY(-50%) translateX(-50%); /* Center on the edge */
    background: #4b5c09;
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    width: 30px;
    height: 60px;
    cursor: pointer;
    z-index: 10;
    border-radius: 8px; /* Rounded on all sides since it's centered on edge */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.sidebar-toggle-edge:hover {
    background: #5a6b0a;
    border-color: rgba(255,255,255,0.4);
}

.sidebar-toggle-edge:hover .arrow-icon {
    color: #1a1a1a; /* Even darker on hover for extra visibility */
}

/* Adjust toggle button position when sidebar is expanded */
.sidebar.expanded ~ .sidebar-toggle-edge {
    left: 10vw; /* Position at the edge of expanded sidebar */
}

/* Arrow icon styling */
.arrow-icon {
    transition: all 0.3s ease;
    display: inline-block;
    color: #F5DEB3; /* Manila/khaki color for better visibility without being jarring */
    font-weight: bold;
}

.logout-thumb {
    font-size: 1.0rem; /* Reduced from 1.2rem to match smaller sidebar text */
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.logout-thumb:hover {
    background: rgba(255,0,0,0.1);
    color: #ff6b6b;
}

.main {
    margin-left: 3vw;
    margin-right: 26%; /* Permanently sized for collapsed map space */
    padding-top: 1vh; /* Small top padding in vh */
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1vh;
    flex-grow: 1;
    height: calc(100vh - 5.5vh); /* Full viewport height minus top bar */
    box-sizing: border-box;
    overflow: hidden; /* Prevent main container from scrolling - let content handle it */
}

/* Main content should not scroll - interfaces handle their own scrolling */

.sidebar.expanded ~ .main {
    margin-left: 10vw;
}

/* Welcome content styling */
.welcome-content {
    padding: 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* My Profile Component Styles */
.my-profile {
    position: fixed;
    left: 3.5vw;
    right: 26%;
    top: 6vh;
    bottom: 0;
    background: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
    z-index: 10;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.my-profile::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Adjust profile position when sidebar is expanded */
.sidebar.expanded ~ .main .my-profile {
    left: 10.5vw;
}

.my-profile .profile-header {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.my-profile .profile-picture-container {
    flex-shrink: 0;
}

.my-profile .profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.my-profile .profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.my-profile .profile-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.my-profile .tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s;
}

.my-profile .tab-button.active {
    color: #4b5c09;
    border-bottom: 2px solid #4b5c09;
    margin-bottom: -2px;
}

.my-profile .tab-pane {
    /* Remove scroll from tab pane - let main container handle scrolling */
    position: relative;
}

/* Sticky Post Composer */
.sticky-composer-wrapper {
    background: white;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 3; /* Below map (z-index: 5) and modals */
}

.sticky-composer-wrapper.sticky {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.25rem 0.5rem; /* Minimal padding - just enough border */
    margin: -0.25rem -0.5rem 1rem -0.5rem;
    background: #ffffff;
    z-index: 3; /* Keep below map layer */
    top: -32px; /* Compensate for container padding to position higher */
}

.quick-post-composer {
    background: #f8f9fa;
    padding: 1rem; /* Reduced from 1.5rem */
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.quick-post-composer textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box; /* Fix textarea protruding from container */
    font-family: inherit;
}

.quick-post-composer .btn {
    background: #4b5c09;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.quick-post-composer .btn:hover {
    background: #3a4807;
}

.my-profile .posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px; /* Centered, not too wide */
    margin: 0 auto; /* Center the posts */
}

.my-profile .post-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.3s;
}

.my-profile .post-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.my-profile .empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* ========================================
   REPUTATION BADGE STYLES
======================================== */

/* Base reputation badge styling */
.reputation-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 4px;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    cursor: help;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Green badge for trusted users (95-100) */
.reputation-badge-green {
    background-color: #22c55e;
    color: white;
    border: 1px solid #16a34a;
}

.reputation-badge-green:hover {
    background-color: #16a34a;
}

/* Yellow badge for mixed reputation users (30-49) */
.reputation-badge-yellow {
    background-color: #eab308;
    color: white;
    border: 1px solid #ca8a04;
}

.reputation-badge-yellow:hover {
    background-color: #ca8a04;
}

/* Brown badge for low trust users (0-29) */
.reputation-badge-brown {
    background-color: #a16207;
    color: white;
    border: 1px solid #92400e;
}

.reputation-badge-brown:hover {
    background-color: #92400e;
}

/* Badge positioning in different contexts */
.post-author .reputation-badge,
.post-header .reputation-badge {
    margin-left: 6px;
    font-size: 10px;
    padding: 1px 5px;
}

.profile-header .reputation-badge,
.user-profile .reputation-badge {
    margin-left: 8px;
    font-size: 12px;
    padding: 3px 8px;
}

.comment-author .reputation-badge {
    margin-left: 4px;
    font-size: 9px;
    padding: 1px 4px;
}

.user-list-item .reputation-badge,
.search-result .reputation-badge {
    margin-left: 6px;
    font-size: 10px;
    padding: 2px 5px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .reputation-badge {
        font-size: 10px;
        padding: 1px 4px;
        margin-left: 3px;
    }
    
    .profile-header .reputation-badge,
    .user-profile .reputation-badge {
        font-size: 11px;
        padding: 2px 6px;
        margin-left: 6px;
    }
}

.reputation-badge:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

@media print {
    .reputation-badge {
        display: none;
    }
}

/* ========================================
   PHOTO TAGGING & MEDIA VIEWER STYLES
======================================== */

/* Media viewer overlay */
.media-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.media-viewer-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.media-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px 8px 0 0;
}

.media-viewer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.media-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.media-viewer-tag-btn {
    background: #4b5c09;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.media-viewer-tag-btn:hover {
    background: #5d6e0b;
}

.media-viewer-tag-btn.active {
    background: #e67e22;
    color: white;
}

.media-viewer-tag-btn.active:hover {
    background: #d35400;
}

.media-viewer-image-container {
    position: relative;
    display: inline-block;
}

.media-viewer-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Photo tags overlay */
.photo-tags-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.photo-tag {
    position: absolute;
    pointer-events: all;
}

.tag-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid #e67e22;
    border-radius: 50%;
    background: rgba(230, 126, 34, 0.8);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.tag-indicator:hover {
    transform: scale(1.2);
    background: rgba(230, 126, 34, 1);
}

.tag-tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.photo-tag:hover .tag-tooltip {
    opacity: 1;
}

/* User search for tagging */
.tag-user-search {
    position: fixed;
    z-index: 10001;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    overflow: hidden;
}

.user-search-box {
    padding: 0;
}

.user-search-input {
    width: 100%;
    padding: 12px;
    border: none;
    outline: none;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.user-search-input:focus {
    background: #f8f9fa;
}

.user-search-results {
    max-height: 200px;
    overflow-y: auto;
}

.user-search-result {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.user-search-result:hover {
    background: #f8f9fa;
}

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

.user-search-result .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4b5c09;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

.user-search-result .user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex-grow: 1;
}

.user-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 2px;
}

.user-username {
    color: #6c757d;
    font-size: 12px;
}

/* Post media styles */
.post-media {
    margin: 0.75rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-media-item {
    position: relative;
    display: inline-block;
    margin: 4px;
}

.post-media-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.post-media-item img:hover {
    opacity: 0.9;
}

.media-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.gif-badge {
    background: rgba(230, 126, 34, 0.9);
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4b5c09;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    transform: translateX(400px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 300px;
    font-size: 14px;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .media-viewer-content {
        max-width: 98vw;
        max-height: 98vh;
    }
    
    .media-viewer-header {
        padding: 8px;
    }
    
    .media-viewer-tag-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .tag-user-search {
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
    }
    
    .user-search-result {
        padding: 8px 10px;
    }
    
    .user-search-result .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 8px;
    }
    
    .toast-notification {
        right: 10px;
        bottom: 10px;
        max-width: calc(100vw - 40px);
        transform: translateX(calc(100vw - 20px));
    }
}

/* ========================================
   MY FEED STYLES
======================================== */

/* DEPRECATED: myFeedContent CSS removed - element no longer exists
   My Feed now uses myFeedPosts in main content area */

/* My Feed infinite scroll loading indicator */
.feed-loading {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-style: italic;
}

.feed-end-indicator {
    text-align: center;
    padding: 1rem;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 1rem;
}

/* ========================================
   BACKGROUND IMAGE STYLES
======================================== */

/* Background image support for My Feed main content area */
/* My Feed container styling */
.my-feed {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

#myFeedPosts {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    max-height: calc(100vh - 250px); /* Allow room for header and composer */
    overflow-y: auto;
}

/* Hide scrollbar for My Feed but keep functionality */
#myFeedPosts::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

#myFeedPosts {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

/* Make posts narrower in My Feed */
.my-feed .post-item,
.my-feed .post-card {
    max-width: 100%;
    margin: 0 auto 1rem auto;
}

/* Composer styling in My Feed */
.my-feed .quick-post-composer {
    max-width: 100%;
    margin: 0 auto 1rem auto;
}

/* Background image support for My Profile (already added above) */

/* Frosted glass effect for posts when background is present */
.my-profile.has-background .post-card,
.my-profile.has-background .quick-post-composer,
#myFeedPosts.has-background .post-card,
#myFeedPosts.has-background .quick-post-composer {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Ensure good contrast for text in frosted glass posts */
.my-profile.has-background .post-card,
.my-profile.has-background .quick-post-composer,
#myFeedPosts.has-background .post-card,
#myFeedPosts.has-background .quick-post-composer {
    color: #2c3e50;
}

/* Background image settings section */
.background-settings {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.background-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.background-preview {
    width: 200px;
    height: 100px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
}

.background-upload-btn,
.background-remove-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.background-upload-btn {
    background: #4b5c09;
    color: white;
}

.background-upload-btn:hover {
    background: #3a4607;
}

.background-remove-btn {
    background: #dc3545;
    color: white;
}

.background-remove-btn:hover {
    background: #c82333;
}