/**
 * Estilos para Leads Manager Table
 */

/* Wrapper principal */
.leads-table-wrapper {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.leads-table-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.leads-table-header h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Roboto', Arial, Helvetica, sans-serif !important;
}

/* Filtros personalizados */
.leads-filters {
    margin-top: 15px;
}

.leads-filters label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    display: inline-block;
}

.status-filter-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    margin-left: 8px;
    min-width: 200px;
}

.status-filter-select:focus {
    outline: none;
    border-color: #495057;
    box-shadow: 0 0 0 0.2rem rgba(73, 80, 87, 0.25);
}

/* Estilos de la tabla */
#leads-datatable {
    font-size: 14px;
}

#leads-datatable thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    padding: 12px 8px;
    border-bottom: 2px solid #dee2e6;
}

#leads-datatable tbody td {
    padding: 12px 8px;
    vertical-align: middle;
}

#leads-datatable tbody tr:hover {
    background-color: #f8f9fa;
}

/* Links */
.lead-title-link,
.client-link,
.talent-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.lead-title-link:hover,
.client-link:hover,
.talent-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Text utilities */
.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* Detalles expandibles de talentos */
.talents-list {
    max-width: 100%;
}

.no-talents {
    color: #6c757d;
    font-style: italic;
}

.talent-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    line-height: 1.6;
}

.talent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.talent-item strong {
    color: #333;
    font-weight: 600;
}

.talent-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.talent-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.talent-details {
    display: inline-block;
    font-size: 13px;
    color: #6c757d;
    margin-left: 18px;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    margin-left: 4px;
}

.status-badge.status-confirmado,
.status-badge.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-pendiente,
.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-completado,
.status-badge.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.status-cancelado,
.status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-opción,
.status-badge.status-option {
    background: #e2e3e5;
    color: #383d41;
}

/* Old styles to remove or update */
.talents-details {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
}

.talent-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.talent-dates {
    color: #6c757d;
    font-size: 13px;
    margin: 5px 0;
}

.talent-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 5px;
}

.talent-status.status-active {
    background: #d4edda;
    color: #155724;
}

.talent-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.talent-status.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.talent-status.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Botones de acción */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-view {
    background: #495057;
    color: #fff !important;
}

.btn-view:hover {
    background: #212529;
    color: #fff !important;
}

.btn-edit {
    background: #343a40;
    color: #fff !important;
}

.btn-edit:hover {
    background: #212529;
    color: #fff !important;
}

/* ID Badge */
.lead-id-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #e9ecef;
    color: #495057;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Fecha de creación */
.created-date {
    color: #6c757d;
    font-size: 13px;
}

/* Usuario creador */
.author-name {
    font-weight: 500;
    color: #495057;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .leads-table-wrapper {
        padding: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
    }
}

/* Loading overlay */
.leads-table-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.leads-table-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* DataTables custom styles */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff;
    color: white !important;
    border-color: #007bff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #333 !important;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 15px;
    color: #6c757d;
}

/* Botones de exportación DataTables */
.dt-buttons {
    margin-bottom: 15px;
    display: inline-block;
}

.dt-button.btn-export {
    padding: 8px 16px;
    margin-right: 8px;
    background: #495057 !important;
    color: white !important;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.dt-button.btn-export:hover {
    background: #212529;
}

.dt-button.btn-export:active,
.dt-button.btn-export:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(73, 80, 87, 0.25);
}

/* Ajuste del layout con botones */
.dataTables_wrapper .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

