/* Wacs Remaster/public/css/community.css */

.community-page-content {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.community-page-content h2 {
    font-size: 2.8em;
    color: var(--text-color-primary);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.community-page-content h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-color-1);
    border-radius: 2px;
}

.community-page-content p {
    font-size: 1.1em;
    color: var(--text-color-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Main Community Layout */
.community-main-content {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Duas colunas: feed maior, sidebar menor */
    gap: 30px;
    margin-top: 30px;
    text-align: left;
}

.community-feed-area {
    /* Ocupa a coluna maior */
}

.community-sidebar-area {
    /* Ocupa a coluna menor */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* User Profile Section */
.user-profile-section {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: var(--shadow-small);
    text-align: left;
}

.user-profile-section h3 {
    font-size: 2em;
    color: var(--gradient-color-1);
    margin-bottom: 25px;
    text-align: center;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.profile-card-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gradient-color-1);
    box-shadow: var(--shadow-medium);
}

.profile-card-name {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-color-primary);
}

.profile-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.1em;
    color: var(--text-color-secondary);
}

.stat-item i {
    font-size: 1.8em;
    color: var(--gradient-color-2);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--text-color-primary);
}

.stat-label {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.profile-actions .btn {
    padding: 10px 25px;
    font-size: 1em;
}

/* Create Post Card */
.create-post-card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-small);
    margin-bottom: 30px;
}

.post-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    color: var(--text-color-primary);
    background-color: var(--input-bg-color);
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.post-textarea:focus {
    border-color: var(--gradient-color-1);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.post-actions .btn {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Posts Feed */
.posts-feed h3 {
    font-size: 2em;
    color: var(--text-color-primary);
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    display: inline-block;
}

.posts-feed h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-color-2);
    border-radius: 2px;
}

.post-card {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(60,60,60,0.08);
    padding: 24px 24px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    transition: box-shadow 0.2s, background 0.3s;
    margin-bottom: 28px;
}

.post-card:hover {
    box-shadow: 0 4px 24px rgba(60,60,60,0.13);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.post-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--gradient-start);
    background: var(--background-color);
}

.post-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-user {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.13em;
}

.post-date {
    font-size: 0.97em;
    color: var(--border-color);
}

.post-menu-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--gradient-start);
    font-size: 1.3em;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.post-menu-btn:hover {
    background: var(--border-color);
}

.post-text {
    color: var(--text-color);
    font-size: 1.08em;
    line-height: 1.6;
    margin-bottom: 4px;
    word-break: break-word;
}

.post-image {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 8px;
    background: var(--background-color);
    box-shadow: 0 1px 8px rgba(60,60,60,0.07);
}

.post-actions {
    display: flex;
    gap: 18px;
    margin-top: 6px;
    align-items: center;
}

.post-actions button {
    background: none;
    border: none;
    color: var(--gradient-start);
    font-size: 1.15em;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 7px 12px;
    border-radius: 8px;
    transition: background 0.18s, color 0.18s;
}

.post-actions button.liked, .post-actions button.liked i {
    color: #e11d48;
    font-weight: bold;
}

.post-actions button:hover {
    background: var(--border-color);
}

.like-count, .comment-count {
    font-size: 1em;
    font-weight: 600;
    margin-left: 2px;
}

/* --- Menu de 3 pontos --- */
.post-menu {
    position: absolute;
    top: 18px;
    right: 18px;
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(60,60,60,0.13);
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-width: 120px;
    overflow: hidden;
}

.post-menu button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1em;
    padding: 12px 18px;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s;
}

.post-menu button:hover {
    background: var(--border-color);
}

/* --- Modal de Comentários --- */
.comments-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(34,34,59,0.38);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

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

.comments-content {
    background: var(--card-background);
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(60,60,60,0.18);
    width: 98vw;
    max-width: 420px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0 0 0 0;
    overflow: hidden;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 12px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
}

.comments-header span {
    font-size: 1.18em;
    font-weight: 600;
    color: var(--text-color);
}

.close-comments-btn {
    background: none;
    border: none;
    color: var(--gradient-start);
    font-size: 1.3em;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.close-comments-btn:hover {
    background: var(--border-color);
}

.comments-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 24px 0 24px;
    background: var(--card-background);
    min-height: 120px;
    max-height: 340px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--background-color);
}

.comment-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-user {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1em;
}

.comment-date {
    font-size: 0.93em;
    color: var(--border-color);
}

.like-comment-btn {
    background: none;
    border: none;
    color: var(--gradient-start);
    font-size: 1.1em;
    cursor: pointer;
    margin-left: 6px;
    border-radius: 6px;
    padding: 4px 7px;
    transition: background 0.18s, color 0.18s;
}

.like-comment-btn.liked, .like-comment-btn.liked i {
    color: #e11d48;
    font-weight: bold;
}

.like-comment-btn:hover {
    background: var(--border-color);
}

.like-count {
    font-size: 0.98em;
    font-weight: 600;
    margin-left: 2px;
}

.delete-comment-btn {
    background: none;
    border: none;
    color: #e11d48;
    font-size: 1.1em;
    cursor: pointer;
    margin-left: 6px;
    border-radius: 6px;
    padding: 4px 7px;
    transition: background 0.18s;
}

.delete-comment-btn:hover {
    background: #fbe9ea;
}

.comment-text {
    color: var(--text-color);
    font-size: 1.01em;
    line-height: 1.5;
    margin-top: 2px;
    word-break: break-word;
}

.no-comments {
    color: var(--border-color);
    text-align: center;
    margin-top: 24px;
    font-size: 1.08em;
}

.comments-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px 18px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--background-color);
}

.comments-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--background-color);
}

.comments-input {
    flex: 1 1 auto;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1em;
    color: var(--text-color);
    background: var(--card-background);
    outline: none;
    transition: border-color 0.2s;
}

.comments-input:focus {
    border-color: var(--gradient-start);
}

.send-comment-btn {
    background: var(--gradient-start);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.18s;
}

.send-comment-btn:hover {
    background: var(--gradient-end);
}

/* --- Toasts --- */
#toast-container {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 340px;
    background: var(--card-background);
    color: var(--text-color);
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(60,60,60,0.13);
    padding: 16px 24px;
    font-size: 1.08em;
    font-weight: 500;
    opacity: 0;
    animation: toastIn 0.25s forwards;
    pointer-events: auto;
}

.toast-success {
    border-left: 6px solid #22c55e;
}

.toast-error {
    border-left: 6px solid #e11d48;
}

.toast-info {
    border-left: 6px solid var(--gradient-start);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Responsividade --- */
@media (max-width: 700px) {
    .comments-content {
        max-width: 98vw;
        min-width: 0;
        border-radius: 10px;
        padding: 0;
    }
    .post-card {
        padding: 14px 8px 12px 8px;
    }
    .post-header {
        gap: 8px;
    }
    .post-avatar {
        width: 40px; height: 40px;
    }
    .post-menu {
        right: 8px; top: 8px;
    }
    #toast-container {
        top: 12px; right: 8px;
    }
}

@media (max-width: 480px) {
    .comments-content {
        max-width: 100vw;
        border-radius: 0;
        padding: 0;
    }
    .post-card {
        padding: 8px 2px 8px 2px;
        border-radius: 8px;
    }
    .post-header {
        gap: 6px;
    }
    .post-avatar {
        width: 32px; height: 32px;
    }
    .post-menu {
        right: 2px; top: 2px;
    }
    #toast-container {
        top: 4px; right: 2px;
    }
}

/* =========================
   FIM FEED DA COMUNIDADE
   ========================= */

/* Private Chats Section */
.private-chats-section {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-small);
}

.private-chats-section h3 {
    font-size: 1.8em;
    color: var(--gradient-color-1);
    margin-bottom: 20px;
    text-align: center;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: var(--input-bg-color); /* Um pouco diferente do card para diferenciar */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-item:hover {
    background-color: var(--hover-bg-color);
}

.chat-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gradient-color-2);
}

.chat-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.chat-contact-name {
    font-weight: 600;
    color: var(--text-color-primary);
    font-size: 1.05em;
}

.last-message {
    font-size: 0.9em;
    color: var(--text-color-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px; /* Limita o tamanho da mensagem para não quebrar o layout */
}

.unread-count {
    background-color: var(--gradient-color-1);
    color: white;
    font-size: 0.8em;
    font-weight: 700;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsividade */
@media (max-width: 992px) {
    .community-main-content {
        grid-template-columns: 1fr; /* Uma única coluna em telas menores */
    }

    .community-sidebar-area {
        order: -1; /* Move a sidebar para cima em telas menores */
    }
}

/* New Styles for Suggestions Section */
.suggestions-section,
.trending-topics-section {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-small);
}

.suggestions-section h3,
.trending-topics-section h3 {
    font-size: 1.8em;
    color: var(--gradient-color-1);
    margin-bottom: 20px;
    text-align: center;
}

.suggestion-list,
.topic-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    background-color: var(--input-bg-color);
    transition: background-color 0.3s ease;
}

.suggestion-item:hover {
    background-color: var(--hover-bg-color);
}

.suggestion-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gradient-color-2);
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.suggestion-name {
    font-weight: 600;
    color: var(--text-color-primary);
    font-size: 1.05em;
}

.suggestion-role {
    font-size: 0.9em;
    color: var(--text-color-secondary);
}

.connect-btn {
    padding: 8px 15px;
    font-size: 0.85em;
    white-space: nowrap; /* Evita que o texto quebre */
}

/* New Styles for Trending Topics Section */
.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background-color: var(--input-bg-color);
    transition: background-color 0.3s ease;
}

.topic-item:hover {
    background-color: var(--hover-bg-color);
}

.topic-name {
    font-weight: 600;
    color: var(--gradient-color-1);
    font-size: 1em;
}

.topic-posts {
    font-size: 0.9em;
    color: var(--text-color-secondary);
}

/* Styles for interactive post elements (likes/comments) */
.post-footer .post-stats {
    cursor: pointer;
    transition: color 0.3s ease;
}

.post-footer .post-stats:hover {
    color: var(--gradient-color-1);
}

.post-footer .post-stats i {
    pointer-events: none; /* Garante que o clique seja no span pai */
}

@media (max-width: 768px) {
    .community-page-content h2 {
        font-size: 2.2em;
    }

    .profile-card-pic {
        width: 100px;
        height: 100px;
    }

    .profile-card-name {
        font-size: 1.5em;
    }

    .profile-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .stat-value {
        font-size: 1.4em;
    }

    .stat-label {
        font-size: 0.85em;
    }

    .profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .profile-actions .btn {
        width: 100%;
    }

    .post-actions {
        flex-direction: column;
        gap: 10px;
    }

    .post-actions .btn {
        width: 100%;
    }

    .last-message {
        max-width: 120px; /* Ajuste para telas muito pequenas */
    }

    .suggestion-item {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .suggestion-info {
        align-items: center;
    }

    .connect-btn {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .community-page-content {
        padding: 20px 15px;
    }

    .community-page-content h2 {
        font-size: 1.8em;
    }

    .profile-card {
        padding: 15px;
    }

    .profile-card-pic {
        width: 80px;
        height: 80px;
    }

    .profile-card-name {
        font-size: 1.3em;
    }

    .stat-item {
        font-size: 1em;
    }

    .stat-item i {
        font-size: 1.5em;
    }

    .stat-value {
        font-size: 1.2em;
    }

    .profile-actions .btn {
        padding: 8px 20px;
        font-size: 0.95em;
    }

    .private-chats-section h3,
    .suggestions-section h3,
    .trending-topics-section h3 {
        font-size: 1.6em;
    }

    .chat-item,
    .suggestion-item,
    .topic-item {
        padding: 8px;
    }

    .chat-pic,
    .suggestion-pic {
        width: 40px;
        height: 40px;
    }

    .chat-contact-name,
    .suggestion-name {
        font-size: 1em;
    }

    .last-message,
    .suggestion-role,
    .topic-posts {
        font-size: 0.8em;
    }
}

/* Login Required Message */
.login-required-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh; /* Ajuste conforme necessário para centralização vertical */
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* Adicionado para preencher o espaço vertical disponível */
}

.login-required-message .message-box {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-large);
    max-width: 500px;
    width: 100%;
}

.login-required-message .message-icon {
    font-size: 4em;
    color: var(--gradient-color-1);
    margin-bottom: 20px;
}

.login-required-message h2 {
    font-size: 2.5em;
    color: var(--text-color-primary);
    margin-bottom: 15px;
}

.login-required-message p {
    font-size: 1.1em;
    color: var(--text-color-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.login-required-message .btn {
    font-size: 1.1em;
    padding: 12px 30px;
}

.like-span.liked {
    color: #1976d2;
    font-weight: bold;
}

.like-span.liked i {
    color: #1976d2;
}

/* Estilos para elementos carregados dinamicamente */
.no-chats-message,
.no-suggestions-message,
.error-message {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-color-secondary);
    font-style: italic;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.no-chats-message p,
.no-suggestions-message p,
.error-message p {
    margin: 0;
    font-size: 1em;
}

.error-message {
    color: #e74c3c;
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

/* Melhorias para chat-item dinâmico */
.chat-item {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.chat-item:hover::before {
    left: 100%;
}

/* Melhorias para suggestion-item dinâmico */
.suggestion-item {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.suggestion-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-color-1);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.suggestion-item:hover::after {
    width: 100%;
}

/* Loading states */
.chat-list.loading,
.suggestion-list.loading {
    position: relative;
    min-height: 100px;
}

.chat-list.loading::after,
.suggestion-list.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--gradient-color-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Melhorias para imagens de perfil */
.chat-pic,
.suggestion-pic {
    transition: transform 0.3s ease;
}

.chat-item:hover .chat-pic,
.suggestion-item:hover .suggestion-pic {
    transform: scale(1.1);
}

/* Melhorias para botões de conexão */
.connect-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.connect-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.connect-btn:hover::before {
    left: 100%;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Estilos para grid de usuários */
.users-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    margin-top: 20px;
}

.user-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.user-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gradient-start);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-card-info {
    flex: 1;
    min-width: 0;
}

.user-card-name {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.user-card-role {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: var(--gradient-start);
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.user-card-email {
    margin: 0;
    font-size: 0.8em;
    color: var(--text-color);
    opacity: 0.7;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

/* Responsividade para elementos dinâmicos */
@media (max-width: 768px) {
    .no-chats-message,
    .no-suggestions-message,
    .error-message {
        padding: 20px 15px;
        font-size: 0.9em;
    }
    
    .chat-item,
    .suggestion-item {
        padding: 12px;
    }

    /* Ajustes para grid de usuários em mobile - mantendo 3 colunas */
    .users-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .user-card {
        padding: 10px;
        gap: 6px;
        min-height: auto;
        overflow: hidden;
    }

    .user-card-avatar {
        width: 45px;
        height: 45px;
    }

    .user-card-name {
        font-size: 0.8em;
        line-height: 1.1;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .user-card-role {
        font-size: 0.7em;
        line-height: 1.1;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .user-card-email {
        font-size: 0.6em;
        line-height: 1.1;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .no-chats-message,
    .no-suggestions-message,
    .error-message {
        padding: 15px 10px;
        font-size: 0.85em;
    }

    /* Ajustes para grid de usuários em telas muito pequenas - mantendo 3 colunas */
    .users-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        margin-top: 16px;
    }

    .user-card {
        padding: 6px;
        gap: 4px;
        min-height: auto;
        overflow: hidden;
    }

    .user-card-avatar {
        width: 35px;
        height: 35px;
    }

    .user-card-name {
        font-size: 0.7em;
        line-height: 1.0;
        margin-bottom: 1px;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }

    .user-card-role {
        font-size: 0.6em;
        line-height: 1.0;
        margin-bottom: 1px;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .user-card-email {
        font-size: 0.55em;
        line-height: 1.0;
        display: none; /* Esconder email em telas muito pequenas para economizar espaço */
    }
}

/* Estilos para notificações */
.notification {
    position: fixed;
    z-index: 10000;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.notification-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.notification.notification-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.notification.notification-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

/* Posição padrão (canto superior direito) */
.notification.notification-top-right {
    top: 20px;
    right: 20px;
}

/* Posição centralizada */
.notification.notification-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    max-width: 500px;
    width: 90%;
    text-align: center;
    padding: 25px 30px;
    font-size: 1.1em;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.notification.notification-center.show {
    transform: translateX(-50%) translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.notification-content span {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2em;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .notification {
        max-width: 90%;
        margin: 0 10px;
    }
    
    .notification.notification-top-right {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification.notification-center {
        width: 95%;
        padding: 20px 25px;
        font-size: 1em;
        top: 0;
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.notification-center.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* Estilos para barra de busca */
.search-container {
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-small);
}

.search-input-wrapper:focus-within {
    border-color: var(--gradient-color-1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    color: var(--text-color-secondary);
    font-size: 14px;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--gradient-color-1);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-color-primary);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    padding: 0;
}

.search-input::placeholder {
    color: var(--text-color-secondary);
    opacity: 0.7;
}

.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-color-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.search-clear-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: scale(1.1);
}

.search-clear-btn:active {
    transform: scale(0.95);
}

/* Mensagem de resultado da busca */
.search-results-info {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--gradient-color-1);
}

.search-results-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-color-secondary);
    font-weight: 500;
}

/* Estados de carregamento para busca */
.search-input-wrapper.searching {
    border-color: var(--gradient-color-1);
}

.search-input-wrapper.searching .search-icon {
    animation: spin 1s linear infinite;
    color: var(--gradient-color-1);
}

/* Animações para a busca */
@keyframes searchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.search-input-wrapper:focus-within {
    animation: searchPulse 0.3s ease;
}

/* Responsividade para busca */
@media (max-width: 768px) {
    .search-input-wrapper {
        padding: 6px 12px;
    }
    
    .search-input {
        font-size: 13px;
    }
    
    .search-icon {
        font-size: 12px;
        margin-right: 8px;
    }
    
    .search-clear-btn {
        padding: 4px;
        margin-left: 6px;
    }

    /* Ajustes para página de usuários em tablet */
    .page-content {
        padding: 0 16px !important;
    }

    .page-content h2 {
        font-size: 1.6em !important;
    }

    /* Ajustes para grid de usuários em tablet - mantendo 3 colunas */
    .users-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .user-card {
        padding: 14px;
        gap: 10px;
    }

    .user-card-avatar {
        width: 60px;
        height: 60px;
    }

    .user-card-name {
        font-size: 0.9em;
    }

    .user-card-role {
        font-size: 0.8em;
    }

    .user-card-email {
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .search-container {
        margin-bottom: 15px;
    }
    
    .search-input-wrapper {
        padding: 5px 10px;
        border-radius: 20px;
    }
    
    .search-input {
        font-size: 12px;
    }
    
    .search-results-info {
        padding: 8px 12px;
        margin-top: 10px;
    }
    
    .search-results-info p {
        font-size: 13px;
    }

    /* Ajustes para página de usuários em mobile */
    .page-content {
        padding: 0 12px !important;
        margin: 16px auto !important;
    }

    .page-content h2 {
        font-size: 1.4em !important;
    }

    .page-content .btn {
        padding: 8px 12px !important;
        font-size: 0.8em !important;
    }

    /* Ajustes para cabeçalho da página de usuários */
    .page-content > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .page-content > div:first-child > div:last-child {
        align-self: stretch !important;
    }

    .page-content > div:first-child .btn {
        width: 100% !important;
        text-align: center !important;
    }
}

/* Melhorias visuais para sugestões com busca */
.suggestion-item {
    transition: all 0.3s ease, transform 0.2s ease;
}

.suggestion-item.highlighted {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--gradient-color-1);
    transform: translateX(5px);
}

.suggestion-item.hidden {
    display: none;
}

/* Indicador de busca ativa */
.search-active .suggestion-item:not(.highlighted) {
    opacity: 0.5;
    filter: grayscale(0.3);
}

.search-active .suggestion-item.highlighted {
    opacity: 1;
    filter: none;
}

/* --- Modal de Imagem em Tela Cheia --- */
.image-fullscreen-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.18s;
}
.image-fullscreen-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20,20,30,0.88);
  cursor: zoom-out;
}
.image-fullscreen-content {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 1;
  background: #fff;
  object-fit: contain;
  animation: imageIn 0.22s;
}
@keyframes imageIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.image-fullscreen-close {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 2;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s;
}
.image-fullscreen-close:hover {
  background: rgba(0,0,0,0.85);
}
@media (max-width: 700px) {
  .image-fullscreen-content {
    max-width: 100vw;
    max-height: 80vh;
    border-radius: 8px;
  }
  .image-fullscreen-close {
    top: 8px; right: 8px; width: 36px; height: 36px; font-size: 1.1em;
  }
}

/* Chat Regional Info */
.regional-chat-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, var(--gradient-color-1), var(--gradient-color-2));
    border-radius: 12px;
    color: white;
    text-align: left;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.regional-chat-info:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.regional-chat-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
}

.regional-chat-content {
    flex: 1;
}

.regional-chat-content h4 {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.regional-chat-content p {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.regional-chat-content p:last-child {
    margin-bottom: 0;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.8);
}

.regional-chat-content i {
    margin-right: 5px;
}

.regional-chat-actions {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.regional-chat-actions .enter-chat-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.regional-chat-actions .enter-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.regional-chat-actions .enter-chat-btn i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Estilo específico para o botão outline */
.regional-chat-actions .btn-outline-gradient {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
}

.regional-chat-actions .btn-outline-gradient:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

@media (max-width: 768px) {
    .regional-chat-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .regional-chat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
    
    .regional-chat-content h4 {
        font-size: 1.2em;
    }
    
    .regional-chat-content p {
        font-size: 0.9em;
    }
    
    .regional-chat-actions .enter-chat-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .regional-chat-info {
        padding: 15px;
        gap: 12px;
    }
    
    .regional-chat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
    
    .regional-chat-content h4 {
        font-size: 1.1em;
    }
    
    .regional-chat-content p {
        font-size: 0.85em;
    }
    
    .regional-chat-actions .enter-chat-btn {
        padding: 8px 14px;
        font-size: 0.85em;
    }
    
    .regional-chat-actions .enter-chat-btn i {
        font-size: 1em;
    }
} 