/* 
 * WP Smart Tables Pro - Estilos Principais
 * Estes estilos são aplicados na interface (frontend) onde o shortcode é inserido.
 * Foco: Design Premium e Experiência do Usuário (UX)
 */

.wp-smart-table-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
    width: 100%;
}

/* Controles DataTables: Pesquisa e Quantidade à Direita com Espaçamento */
.wp-smart-table-wrapper .top-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px; /* Espaço entre a pesquisa/paginador e a tabela */
    gap: 20px; /* Espaço entre pesquisa e paginador */
}

.wp-smart-table-wrapper .dataTables_filter {
    float: none;
    text-align: right;
    margin-bottom: 0;
}

.wp-smart-table-wrapper .dataTables_length {
    float: none;
    text-align: right;
    margin-bottom: 0;
}

.wp-smart-table-wrapper .bottom-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px; /* Espaço entre a tabela e a paginação final */
}

.wp-smart-table-wrapper .dataTables_paginate {
    float: none;
    text-align: right;
    padding-top: 0 !important;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.wp-smart-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    text-align: left;
    white-space: normal !important;
    table-layout: auto;
}

.wp-smart-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    cursor: pointer;
    user-select: none;
    position: relative;
    font-size: 13px;
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: normal !important;
}

.wp-smart-table th:hover {
    background-color: #f1f5f9;
}

.wp-smart-table td {
    padding: 10px 32px 10px 12px !important; /* espaço extra na direita para o botão copiar flutuante */
    border-bottom: 1px solid #e2e8f0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    color: #334155;
    position: relative;
    vertical-align: middle;
    font-size: 13px;
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: normal !important;
}

/* A cor da linha zebra e cabeçalho agora são geradas dinamicamente via painel de administração */
.wp-smart-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Esconde o botão de copiar por padrão, mostra no hover. Sobrescreve estilos de temas (vermelho gigante) */
.wp-smart-table .copy-btn {
    position: absolute !important;
    right: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer;
    padding: 4px !important;
    transition: opacity 0.2s, color 0.2s;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px !important;
    box-shadow: none !important;
    width: 24px !important;
    height: 24px !important;
    min-width: unset !important;
    min-height: unset !important;
    line-height: 1 !important;
}

.wp-smart-table .copy-btn svg {
    width: 14px !important;
    height: 14px !important;
    fill: none;
    margin: 0 !important;
    padding: 0 !important;
}

.wp-smart-table td:hover .copy-btn {
    opacity: 1;
}

.wp-smart-table .copy-btn:hover {
    color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

.cell-content {
    vertical-align: middle;
}

/* Toast Notification (Feedback Visual) */
.wp-smart-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #10b981;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 9999;
}

.wp-smart-toast.show {
    opacity: 1;
    transform: translateY(0);
}
