/* === CSS BOTÕES EM LINHA - SÓ ÍCONES - TODOS NA MESMA LINHA === */

/* Organização dos botões de ação - LINHA ÚNICA */
.actions-cell {
    min-width: 280px !important;
    padding: 8px !important;
    text-align: center;
    vertical-align: middle;
}

.actions-group {
    display: flex;
    flex-direction: row; /* MUDANÇA: todos na mesma linha */
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Botão de status - agora na mesma linha */
.status-badge {
    order: 1;
    margin-bottom: 0; /* MUDANÇA: removido margin-bottom */
    margin-right: 8px; /* MUDANÇA: margem à direita para separar dos botões */
    min-width: 80px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
    padding: 4px 6px;
    flex-shrink: 0;
    height: 36px; /* MUDANÇA: altura igual aos botões */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container para botões de ação - agora na mesma linha */
.actions-buttons {
    order: 2;
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* === BOTÕES DE AÇÃO - COMPACTOS === */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* === BOTÃO PÚBLICO/PRIVADO - GEOMETRIA IDÊNTICA AOS OUTROS === */

/* Estado Público (ON) - Verde com mesma estrutura dos outros botões */
.btn-publico-on {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    width: 36px;
}

.btn-publico-on:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Estado Privado (OFF) - Cinza com mesma estrutura dos outros botões */
.btn-publico-off {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(107, 114, 128, 0.3);
    border-radius: 8px;
    width: 36px;
}

.btn-publico-off:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 50%, #1f2937 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 114, 128, 0.4);
}

/* Botão editar - Azul */
.btn-edit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
    border-radius: 8px;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* Botão deletar - Vermelho */
.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
    border-radius: 8px;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

/* Ícones dos botões */
.btn-action i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn-action:hover i {
    transform: scale(1.1);
}

/* Efeito de brilho */
.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    transition: left 0.6s ease;
}

.btn-action:hover::before {
    left: 100%;
}

/* Estados especiais */
.btn-action:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-action:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

.btn-publico-on:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4);
}

.btn-publico-off:focus {
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.4);
}

/* Estado de loading */
.btn-action.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-action.loading i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

/* Animação de mudança */
.btn-action.changing {
    animation: colorShift 0.6s ease-in-out;
}

@keyframes colorShift {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

/* === RESPONSIVIDADE - MANTENDO LINHA ÚNICA === */
@media (max-width: 768px) {
    .actions-cell {
        min-width: 300px !important; /* MUDANÇA: aumentado para acomodar linha única */
        padding: 6px !important;
    }
    
    .actions-group {
        flex-direction: row; /* MUDANÇA: mantém na mesma linha */
        gap: 3px; /* MUDANÇA: gap menor para economizar espaço */
        justify-content: center;
    }
    
    .status-badge {
        width: auto; /* MUDANÇA: largura automática */
        min-width: 60px; /* MUDANÇA: menor */
        margin-bottom: 0; /* MUDANÇA: mantém zero */
        margin-right: 6px; /* MUDANÇA: margem à direita menor */
        font-size: 9px;
        padding: 3px 5px;
        height: 30px; /* MUDANÇA: altura ajustada para mobile */
    }
    
    .actions-buttons {
        justify-content: center;
        gap: 3px;
    }
    
    .btn-action {
        width: 30px; /* MUDANÇA: menor para caber na linha */
        height: 30px;
        font-size: 12px;
    }
    
    .btn-action i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .actions-cell {
        min-width: 280px !important; /* MUDANÇA: ainda menor para telas pequenas */
    }
    
    .actions-group {
        gap: 2px; /* MUDANÇA: gap mínimo */
    }
    
    .status-badge {
        min-width: 50px; /* MUDANÇA: ainda menor */
        margin-right: 4px;
        font-size: 8px;
        padding: 2px 4px;
        height: 28px;
    }
    
    .actions-buttons {
        gap: 2px;
    }
    
    .btn-action {
        width: 28px; /* MUDANÇA: menor ainda */
        height: 28px;
        font-size: 11px;
    }
    
    .btn-action i {
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .actions-cell {
        min-width: 260px !important; /* MUDANÇA: mínimo para telas muito pequenas */
    }
    
    .status-badge {
        min-width: 45px;
        margin-right: 3px;
        font-size: 7px;
        padding: 2px 3px;
        height: 26px;
    }
    
    .actions-group {
        gap: 1px;
    }
    
    .actions-buttons {
        gap: 1px;
    }
    
    .btn-action {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
    
    .btn-action i {
        font-size: 10px;
    }
}

/* Tooltip personalizado para ícones */
.btn-action[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.btn-action[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    margin-bottom: 1px;
}

/* Melhorar exibição na expansão */
.author-info {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    border-left: 4px solid #e5e7eb;
}

.author-info i {
    color: #6b7280;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* === GARANTIR VISIBILIDADE DOS BOTÕES === */
.actions-group,
.actions-buttons,
.btn-action,
.btn-publico-on,
.btn-publico-off,
.status-badge {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* === AJUSTES PARA TABELA RESPONSIVA === */
@media (max-width: 768px) {
    .activities-table {
        min-width: 850px !important; /* MUDANÇA: aumentado para acomodar botões em linha */
    }
    
    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 300px !important; /* MUDANÇA: coluna mais larga */
        min-width: 300px !important;
    }
}

@media (max-width: 480px) {
    .activities-table {
        min-width: 800px !important;
    }
    
    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 280px !important;
        min-width: 280px !important;
    }
}

@media (max-width: 320px) {
    .activities-table {
        min-width: 750px !important;
    }
    
    .activities-table th:nth-child(5),
    .activities-table td:nth-child(5) {
        width: 260px !important;
        min-width: 260px !important;
    }
}