/* Social Community Styles */

/* Profile Sidebar Styles */
.profile-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    border-radius: 0.375rem;
    min-height: 500px;
}

.sidebar-header {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0;
}

.sidebar-nav .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-nav .nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
    transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
    background-color: #0d6efd;
    color: white;
    border-left: 4px solid #0a58ca;
}

.sidebar-nav .nav-link.active:hover {
    background-color: #0a58ca;
    color: white;
    transform: none;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

.profile-content {
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Remove problematic container styles */
#account-edit {
    padding-bottom: 2rem;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .profile-sidebar {
        min-height: auto;
        position: relative;
        margin-bottom: 1rem;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .sidebar-nav .nav {
        flex-direction: row;
        min-width: max-content;
    }
    
    .sidebar-nav .nav-link {
        border-bottom: none;
        border-right: 1px solid #e9ecef;
        flex-shrink: 0;
    }
    
    .sidebar-nav .nav-link:hover {
        transform: none;
    }
}

@media (max-width: 767.98px) {
    .sidebar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .sidebar-nav .nav-link i {
        margin-right: 0.25rem;
    }
}

.post-card {
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.delete-post-btn,
.delete-comment-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-post-btn:hover,
.delete-comment-btn:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding: 0.75rem;
}

.comment-item:last-child {
    border-bottom: none;
}

/* Success alerts */
.alert-success {
    background-color: #d1edff;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-success .btn-close {
    filter: invert(1) grayscale(100%) brightness(30%);
}

/* Fade animations */
.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Post box styles */
.post-box-container {
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Background selector styles */
.background-grid {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    overflow-x: auto;
}

.bg-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    background-size: cover;
    background-position: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bg-thumb.no-bg {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.bg-thumb:hover,
.bg-thumb.active {
    border-color: var(--bs-primary, #0d6efd);
    transform: scale(1.05);
}

/* Post with background styles */
.post-background {
    border-radius: 12px;
    overflow: hidden;
    background-size: cover !important;
}

.post-text-overlay {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Facebook-style Reaction Picker */
.reaction-container {
    position: relative;
    display: inline-block;
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 50px;
    padding: 8px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    margin-bottom: 8px;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.15s ease-out;
    pointer-events: none;
}

.reaction-picker:not(.d-none) {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.reaction-picker::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.reaction-btn {
    font-size: 24px !important;
    border: none !important;
    background: none !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
    transition: all 0.15s ease !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.reaction-btn:hover {
    transform: scale(1.2) !important;
    background: #f0f2f5 !important;
}

.reaction-btn:active {
    transform: scale(1.1) !important;
}

/* Like button states */
.like-btn.reacted {
    color: #1877f2 !important;
    font-weight: 600;
}

.like-btn.reacted:hover {
    color: #166fe5 !important;
}

/* Reaction counts display */
.reaction-summary {
    margin-right: 8px;
    font-size: 13px;
    color: #65676b;
}

.reaction-summary:hover {
    text-decoration: underline;
    cursor: pointer;
}

/* Post stats styling */
.post-stats {
    font-size: 13px;
    color: #65676b;
    margin-bottom: 8px;
    padding: 0 4px;
}

.post-stats .reaction-summary-container {
    margin-left: 8px;
}

/* Post actions styling */
.post-actions .btn {
    color: #65676b;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    margin-right: 4px;
}

.post-actions .btn:hover {
    background-color: #f0f2f5;
    color: #1c1e21;
}

.post-actions .btn i {
    margin-right: 6px;
}

/* Comment reaction styling */
.comment-reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 50px;
    padding: 4px 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    margin-bottom: 8px;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.15s ease-out;
    pointer-events: none;
}

.comment-reaction-picker:not(.d-none) {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.comment-reaction-picker::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 16px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
}

.comment-reaction-btn {
    font-size: 20px !important;
    border: none !important;
    background: none !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    transition: all 0.15s ease !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 1px;
}

.comment-reaction-btn:hover {
    transform: scale(1.15) !important;
    background: #f0f2f5 !important;
}

.comment-like-btn.reacted {
    color: #1877f2 !important;
    font-weight: 600;
}

.comment-like-btn.reacted:hover {
    color: #166fe5 !important;
}

/* Comment actions styling */
.comment-actions .btn {
    color: #65676b;
    font-weight: 500;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.comment-actions .btn:hover {
    background-color: #f0f2f5;
    color: #1c1e21;
}

.comment-stats {
    font-size: 12px;
    color: #65676b;
    margin-bottom: 4px;
}

/* Character counter */
.character-counter {
    font-size: 0.75rem;
    color: #6c757d;
    transition: color 0.2s ease;
}

/* Action button colors */
.action-btn.photo-btn i { color: #45bd62; }
.action-btn.gif-btn i { color: #f02849; }
.action-btn.video-btn i { color: #f3425f; }
.action-btn.feeling-btn i { color: #f7b928; }
.post-box-container {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.075);
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-input {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 1.25rem;
    padding: 0.75rem 1rem;
    min-height: 40px;
    font-family: inherit;
    line-height: 1.5;
}

.post-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: #6c757d;
    font-weight: 600;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background-color: #f8f9fa;
}

.post-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modern Post Actions Styling */
.post-stats {
    font-size: 0.875rem;
    color: #65676b;
}

.post-actions {
    border-top: 1px solid #e4e6ea;
    border-bottom: 1px solid #e4e6ea;
    margin: 0.5rem -1rem;
    padding: 0.25rem 1rem;
    gap: 0.5rem;
}

.post-actions .btn-link {
    color: #65676b;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    background: none;
    display: flex;
    align-items: center;
}

.post-actions .btn-link:hover {
    background-color: #f2f3f4;
    color: #1c1e21;
}

.post-actions .btn-link:focus {
    box-shadow: none;
}

.post-actions .btn-link.text-danger:hover {
    background-color: #fee;
    color: #dc3545;
}

.post-actions .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.5rem;
    background-color: #6c757d !important;
}

.post-reactions {
    font-size: 0.875rem;
}

.post-reactions .badge {
    background-color: #f2f3f4 !important;
    color: #65676b !important;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Enhance existing reaction picker styling */
.reaction-picker,
.comment-reaction-picker {
    border-radius: 25px !important;
    padding: 6px !important;
    border: 1px solid #dadde1 !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

/* Comment Actions Styling (match post actions) */
.comment-actions {
    font-size: 0.875rem;
}

.comment-actions .btn-link {
    color: #65676b;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    background: none;
    display: flex;
    align-items: center;
}

.comment-actions .btn-link:hover {
    background-color: #f2f3f4;
    color: #1c1e21;
}

.comment-actions .btn-link:focus {
    box-shadow: none;
}

.comment-actions .btn-link.text-danger:hover {
    background-color: #fee;
    color: #dc3545;
}

/* Nested Comments Styles */
.replies-container {
    transition: all 0.3s ease;
}

.replies-container.d-none {
    display: none !important;
}

.replies-container.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toggle-replies {
    color: #65676b !important;
    font-weight: 600;
}

.toggle-replies:hover {
    background-color: #f2f3f4 !important;
    color: #1c1e21 !important;
}

.reply-chevron {
    transition: transform 0.3s ease;
}

.reply-chevron.rotated {
    transform: rotate(180deg);
}

.comment-item .replies-container {
    margin-top: 0.75rem;
    margin-left: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
    position: relative;
}

.comment-item .replies-container::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #007bff, transparent);
}

/* Nested comment styling adjustments */
.replies-container .comment-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

.replies-container .comment-item:last-child {
    margin-bottom: 0;
}

/* Reply count styling */
.reply-count {
    font-size: 0.8rem;
    color: #65676b;
}

/* Improved visual hierarchy */
.comment-item[data-level="1"] {
    background-color: #f8f9fa;
}

.comment-item[data-level="2"] {
    background-color: #f1f3f4;
}

/* Mega Menu Styles */
.mega-menu-wrapper {
    position: relative;
    display: inline-block;
}

.mega-menu-trigger {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
}

.mega-menu-trigger:hover {
    background-color: rgba(0,0,0,0.05);
    color: inherit;
    text-decoration: none;
}

.mega-menu-dropdown {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 20px;
    margin-top: 8px;
    min-width: 300px;
}

.mega-menu-dropdown.show {
    display: block;
}

.mega-menu-item {
    margin-bottom: 8px;
}

.mega-menu-item a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.mega-menu-item a:hover {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.mega-menu-item a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.mega-menu-html-block {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.mega-menu-html-block h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 5px;
}

.mega-menu-html-block div {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #555;
}

/* Responsive mega menu */
@media (max-width: 768px) {
    .mega-menu-dropdown {
        position: fixed;
        top: auto;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .mega-menu-dropdown .row {
        flex-direction: column;
    }
    
    .mega-menu-dropdown .col-md-3,
    .mega-menu-dropdown .col-md-4,
    .mega-menu-dropdown .col-md-6,
    .mega-menu-dropdown .col-md-12 {
        width: 100%;
        margin-bottom: 15px;
    }
}

/* Better hover states */
.mega-menu-wrapper:hover .mega-menu-trigger {
    background-color: rgba(0,0,0,0.05);
}
