/* /lib/css/global.css - Estilos Globais Compartilhados */

/* ========================================
   MODAL GLOBAL SYSTEM
   ======================================== */

/* Overlay do Modal */
.global-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 999999 !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    animation: fadeIn 0.2s ease !important;
}

.global-modal-overlay.show {
    display: flex !important;
}

/* Box do Modal */
.global-modal-box {
    background: #1a1a1a;
    border: 2px solid #ff5000;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    animation: popIn 0.2s ease;
}

/* Título do Modal */
.global-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.global-modal-title i {
    color: #ff5000;
}

/* Texto do Modal */
.global-modal-text {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Botões do Modal */
.global-modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.global-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.global-modal-btn-primary {
    background: #ff5000;
    color: white;
}

.global-modal-btn-primary:hover {
    background: #e04400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 80, 0, 0.4);
}

.global-modal-btn-secondary {
    background: transparent;
    color: #aaa;
    border: 1px solid #444;
}

.global-modal-btn-secondary:hover {
    border-color: #fff;
    color: #fff;
    background: #222;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   SISTEMA DE COMENTÁRIOS - ESTILO FACEBOOK
   ======================================== */

/* Seção de comentários */
.comments-section {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 20px;
}

/* Input de comentário */
.comment-input-area {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    align-items: flex-start !important;
}

.comment-input-area textarea {
    flex: 1 !important;
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #e4e6eb !important;
    padding: 12px 15px !important;
    border-radius: 8px !important;
    resize: vertical !important;
    min-height: 60px !important;
    height: auto !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
}

.comment-input-area textarea:focus {
    outline: none !important;
    border-color: #ff5000 !important;
}

.comment-input-area textarea::placeholder {
    color: #666 !important;
}

.comment-input-area button {
    background: #ff5000 !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 14px !important;
    transition: 0.2s !important;
    white-space: nowrap !important;
}

.comment-input-area button:hover {
    background: #ff6520 !important;
    transform: scale(1.02) !important;
}

/* Lista de comentários */
#comments-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ========================================
   TOOLTIP E MODAL DE LIKES
   ======================================== */

/* Tooltip de likes (hover) */
.likes-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #242526;
    border: 1px solid #3a3b3c;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 120px;
    max-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    font-size: 12px;
}

.likes-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #3a3b3c;
}

.likes-tooltip.show {
    display: block;
}

.likes-tooltip-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.likes-tooltip-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e4e6eb;
}

.likes-tooltip-item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.likes-tooltip-more {
    color: #b0b3b8;
    font-size: 11px;
    margin-top: 4px;
    text-align: center;
}

/* Contador de likes clicável */
.like-count {
    cursor: pointer;
    transition: 0.15s;
}

.like-count:hover {
    text-decoration: underline;
    color: #ff5000 !important;
}

/* Modal de likes (lista completa) */
.likes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.likes-modal-overlay.show {
    display: flex;
}

.likes-modal {
    background: #242526;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid #3a3b3c;
}

.likes-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #3a3b3c;
}

.likes-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #e4e6eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.likes-modal-title i {
    color: #ff5000;
}

.likes-modal-close {
    background: none;
    border: none;
    color: #b0b3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: 0.15s;
}

.likes-modal-close:hover {
    background: #3a3b3c;
    color: #e4e6eb;
}

.likes-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.likes-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    transition: 0.15s;
}

.likes-modal-item:hover {
    background: #3a3b3c;
}

.likes-modal-item img {
    width: 40px;
    height: 40px;
    border-radius: 30%;
    border: 2px solid #ff5000;
}

.likes-modal-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #e4e6eb;
}

.likes-modal-empty {
    padding: 40px 20px;
    text-align: center;
    color: #b0b3b8;
}

.likes-modal-loading {
    padding: 40px 20px;
    text-align: center;
    color: #b0b3b8;
}

/* Wrapper do botão de like com tooltip */
.comment-like-wrapper {
    position: relative;
    display: inline-flex;
}

/* Comentário individual - ESTILO FACEBOOK COMPACTO */
.comment-item {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: relative;
    align-items: flex-start !important;
}

.comment-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 30% !important;
    flex-shrink: 0 !important;
    border: 2px solid #ff5000 !important;
    object-fit: cover !important;
}

.comment-body {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.comment-bubble-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 4px !important;
}

.comment-bubble {
    background: #3a3b3c !important;
    border-radius: 18px !important;
    padding: 8px 12px !important;
    display: inline-block !important;
    max-width: calc(100% - 30px) !important;
}

.comment-header {
    display: inline !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    font-weight: bold;
}

.comment-author {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #e4e6eb !important;
    margin-right: 6px !important;
}

.comment-time {
    font-size: 12px !important;
    color: #b0b3b8 !important;
    cursor: default;
}

.comment-text {
    font-size: 15px !important;
    color: #e4e6eb !important;
    line-height: 1.33 !important;
    margin-top: 2px !important;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.comment-edited {
    font-size: 12px !important;
    color: #b0b3b8 !important;
    margin-left: 4px;
}

/* Ações do comentário - linha compacta */
.comment-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 4px !important;
    padding-left: 12px !important;
    font-size: 12px !important;
}

/* Botão de Curtir (coração) */
.comment-like-btn {
    background: none !important;
    border: none !important;
    color: #ff5000 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: 0.15s;
}

.comment-like-btn:hover {
    transform: scale(1.1) !important;
}

.comment-like-btn i {
    font-size: 14px !important;
}

.comment-like-btn .like-count {
    font-weight: 600 !important;
    color: #b0b3b8 !important;
}

.comment-like-btn.liked i {
    color: #ff5000 !important;
}

.comment-like-btn:not(.liked) i {
    color: #666 !important;
}

/* Botão de Responder */
.comment-reply-btn {
    background: #2a2a2a !important;
    border: 1px solid #444 !important;
    color: #b0b3b8 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    transition: 0.15s;
}

.comment-reply-btn:hover {
    background: #333 !important;
    border-color: #ff5000 !important;
    color: #fff !important;
}

.comment-reply-btn i {
    font-size: 10px !important;
}

/* Compatibilidade com classe antiga */
.comment-action-btn {
    background: none !important;
    border: none !important;
    color: #b0b3b8 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: 0.15s;
}

.comment-action-btn:hover {
    color: #e4e6eb !important;
    text-decoration: underline !important;
}

.comment-action-btn.liked {
    color: #ff5000 !important;
}

.comment-like-count {
    color: #b0b3b8 !important;
}

/* Menu de 3 pontinhos - colado ao balão */
.comment-menu-wrapper {
    position: relative !important;
    display: inline-flex !important;
    align-items: flex-start !important;
    margin-top: 4px !important;
}

.comment-menu-btn {
    background: none !important;
    border: none !important;
    color: #444 !important;
    cursor: pointer !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    opacity: 0.4 !important;
    transition: 0.15s !important;
    line-height: 1 !important;
}

.comment-item:hover .comment-menu-btn {
    opacity: 0.7 !important;
}

.comment-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #b0b3b8 !important;
}

.comment-menu-dropdown {
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    background: #242526 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5) !important;
    min-width: 100px !important;
    z-index: 100 !important;
    display: none !important;
    overflow: hidden !important;
}

.comment-menu-dropdown.show {
    display: block !important;
}

.comment-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px 12px !important;
    background: none !important;
    border: none !important;
    color: #e4e6eb !important;
    font-size: 14px !important;
    text-align: left !important;
    cursor: pointer !important;
}

.comment-menu-item:hover {
    background: #3a3b3c !important;
}

.comment-menu-item.danger {
    color: #f02849 !important;
}

/* Respostas */
.replies-container {
    margin-left: 40px !important;
    margin-top: 4px !important;
}

.replies-container .comment-avatar {
    width: 24px !important;
    height: 24px !important;
}

.replies-container .comment-bubble {
    padding: 6px 10px !important;
}

.replies-container .comment-author {
    font-size: 12px !important;
}

.replies-container .comment-text {
    font-size: 14px !important;
}

.replies-container .comment-time {
    font-size: 11px !important;
}

/* Reply box inline */
.reply-box {
    display: none !important;
    gap: 8px !important;
    margin-top: 6px !important;
    margin-left: 40px !important;
    align-items: center !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

.reply-box.show {
    display: flex !important;
}

.reply-box textarea {
    flex: 1 !important;
    background: #3a3b3c !important;
    border: none !important;
    color: #e4e6eb !important;
    padding: 6px 12px !important;
    border-radius: 18px !important;
    resize: none !important;
    font-size: 13px !important;
    height: 32px !important;
    min-height: 32px !important;
    font-family: inherit;
}

.reply-box textarea:focus {
    outline: none !important;
}

.reply-box button {
    background: none !important;
    color: #ff5000 !important;
    border: none !important;
    padding: 6px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.reply-box button:hover {
    color: #ff6520 !important;
}

/* Edit box */
.edit-box {
    display: none;
    margin-top: 8px;
}

.edit-box.show {
    display: block;
}

.edit-box textarea,
.edit-box .edit-textarea {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #e4e6eb;
    padding: 8px 12px;
    border-radius: 12px;
    resize: none;
    font-size: 14px;
    min-height: 60px;
    font-family: inherit;
}

.edit-box textarea:focus,
.edit-box .edit-textarea:focus {
    outline: none;
    border-color: #ff5000;
}

.edit-box-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.edit-box-actions button {
    background: none;
    border: none;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    transition: 0.15s;
}

.edit-box-actions .btn-save {
    background: #ff5000;
    color: white;
}

.edit-box-actions .btn-save:hover {
    background: #ff6520;
}

.edit-box-actions .btn-cancel {
    color: #b0b3b8;
    border: 1px solid #444;
}

.edit-box-actions .btn-cancel:hover {
    background: #333;
    color: #fff;
}

/* ========================================
   ANIMAÇÕES
   ======================================== */

@keyframes highlightFade {
    0% {
        background-color: rgba(255, 80, 0, 0.2);
        border-color: #ff5000;
        box-shadow: 0 0 15px rgba(255,80,0,0.2);
    }
    100% {
        background-color: transparent;
        border-color: transparent;
        box-shadow: none;
    }
}

.target-highlight {
    animation: highlightFade 3s ease-out forwards;
    border-radius: 18px;
    padding: 4px;
}

/* ========================================
   PADRÃO GLOBAL DE AVATARES
   TODOS os avatares: 30% border-radius, borda 2px #ff5000
   ======================================== */

/* Regra universal para avatares */
img[class*="avatar"],
.avatar,
.avatar img,
.user-avatar,
.user-avatar img,
.player-avatar,
.player-avatar img,
.profile-avatar,
.profile-avatar img,
.comment-avatar,
.notif-avatar img,
.post-avatar img,
.author-avatar img,
.podium-avatar img,
.search-user-avatar img,
.likes-modal-item img {
    /*border-radius: 30% !important;
    border: 2px solid #ff5000 !important;
    object-fit: cover !important;*/
}

/* Exceções para avatares menores (manter proporção) */
.likes-tooltip-item img {
    border-radius: 30% !important;
    border: 1px solid #ff5000 !important;
}

/* ========================================
   UTILITÁRIOS GLOBAIS
   ======================================== */

.text-orange { color: #ff5000 !important; }
.text-muted { color: #b0b3b8 !important; }
.text-danger { color: #f02849 !important; }

/* Scrollbar customizada */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #1a1a1a; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #ff5000; border-radius: 3px; }

/* ========================================
   RESPONSIVO
   ======================================== */

@media (max-width: 600px) {
    .comment-input-area {
        flex-direction: column;
        gap: 10px;
    }
    
    .comment-input-area textarea {
        width: 100%;
    }
    
    .comment-input-area button {
        align-self: flex-end;
    }
    
    .replies-container {
        margin-left: 24px !important;
    }
    
    .reply-box {
        margin-left: 24px !important;
    }
}