/* Estilos personalizados para badges de estados de edición de reseñas */

/* Badge base con mejoras visuales */
.review-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.review-status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.review-status-badge::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;
}

.review-status-badge:hover::before {
    left: 100%;
}

/* Badge para estado pendiente de edición */
.review-status-badge.pending-edit {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.review-status-badge.pending-edit:hover {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Badge para estado pendiente de eliminación */
.review-status-badge.pending-delete {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    min-width: 160px;
}

.review-status-badge.pending-delete:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Badge para estado editado */
.review-status-badge.edited {
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.review-status-badge.edited:hover {
    background: linear-gradient(135deg, #138496, #17a2b8);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

/* Badge para estado original */
.review-status-badge.original {
    background: linear-gradient(135deg, #28a745, #218838);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.review-status-badge.original:hover {
    background: linear-gradient(135deg, #218838, #28a745);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Badge para estado eliminado */
.review-status-badge.deleted {
    background: linear-gradient(135deg, #6c757d, #495057);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.review-status-badge.deleted:hover {
    background: linear-gradient(135deg, #495057, #6c757d);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* Iconos dentro de los badges */
.review-status-badge i {
    margin-right: 8px;
    font-size: 12px;
    opacity: 0.9;
}

/* Animación de pulso para badges pendientes */
.review-status-badge.pending-edit,
.review-status-badge.pending-delete {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
            0 0 20px rgba(255, 193, 7, 0.4);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

.review-status-badge.pending-delete {
    animation: pulse-glow-danger 2s infinite;
}

@keyframes pulse-glow-danger {
    0% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3),
            0 0 20px rgba(220, 53, 69, 0.4);
    }
    100% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .review-status-badge {
        font-size: 10px;
        padding: 6px 12px;
        min-width: 100px;
    }

    .review-status-badge.pending-delete {
        min-width: 140px;
    }
}

/* Mejoras para tablas de DataTables */
table.dataTable tbody td .review-status-badge {
    margin: 2px 0;
}

/* Estilos para el modal de comparación */
.modal-comparison-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 15px;
    color: #fff;
    margin: 4px 0;
}

.modal-comparison-badge.original {
    background: linear-gradient(135deg, #28a745, #218838);
}

.modal-comparison-badge.edited {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #333;
}

/* Indicador de estado en el header de la tabla */
.table-header-status {
    position: relative;
}

.table-header-status::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
}

.table-header-status.has-pending::after {
    background: #ffc107;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0.3;
    }
}

/* Estilos adicionales para el modal mejorado */
.modal-xl {
    max-width: 1200px;
}

.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.symbol.symbol-40 .symbol-label {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.symbol.symbol-50 .symbol-label {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.symbol.symbol-30 .symbol-label {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* Cards de calificaciones con hover effect */
.card.bg-light-primary:hover,
.card.bg-light-success:hover,
.card.bg-light-info:hover,
.card.bg-light-warning:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Mejoras en las tarjetas de comparación */
.card.border-success,
.card.border-warning {
    transition: all 0.3s ease;
}

.card.border-success:hover {
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
}

.card.border-warning:hover {
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.15);
}

/* Animación para los badges en el modal */
.modal .review-status-badge {
    animation: none;
}

.modal .review-status-badge:hover {
    transform: scale(1.05);
}

/* Mejoras en el footer del modal */
.modal-footer {
    padding: 1.5rem;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
        margin: 1rem auto;
    }

    .symbol.symbol-50 .symbol-label {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Estilos para encabezados ordenables de DataTables */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    position: relative;
    cursor: pointer;
    padding-right: 30px;
}

table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 12px;
    color: #007bff;
    opacity: 0.7;
}

table.dataTable thead th.sorting:after {
    content: "\f0dc"; /* fa-sort */
    opacity: 0.5;
}

table.dataTable thead th.sorting_asc:after {
    content: "\f0de"; /* fa-sort-up */
    opacity: 1;
}

table.dataTable thead th.sorting_desc:after {
    content: "\f0dd"; /* fa-sort-down */
    opacity: 1;
}

/* Hover effect para encabezados ordenables */
table.dataTable thead th.sorting:hover,
table.dataTable thead th.sorting_asc:hover,
table.dataTable thead th.sorting_desc:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Mejorar la apariencia de los encabezados */
table.dataTable thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

/* Indicador visual para columnas ordenables */
table.dataTable thead th.sorting:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #007bff, transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

table.dataTable thead th.sorting:hover:before {
    opacity: 1;
}

/* Estilos para filtros mejorados */
.filter-dropdown .dropdown-toggle {
    position: relative;
    transition: all 0.3s ease;
}

.filter-dropdown .dropdown-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filter-dropdown .dropdown-toggle .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 16px;
    border-radius: 50%;
    animation: pulse-filter 2s infinite;
}

@keyframes pulse-filter {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Estilos para la sección de filtros activos */
#filtrosActivos {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-left: 4px solid #2196f3;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badges de filtros activos */
#filtrosActivosList .badge {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#filtrosActivosList .badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#filtrosActivosList .badge button {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#filtrosActivosList .badge:hover button {
    opacity: 1;
}

/* Mejoras en los dropdowns de filtros */
.filter-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.filter-dropdown .dropdown-menu .navi-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    margin: -8px -12px 8px -12px;
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.filter-dropdown .dropdown-menu .navi-item .navi-link {
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 2px 4px;
}

.filter-dropdown .dropdown-menu .navi-item .navi-link:hover {
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
    transform: translateX(5px);
}

/* Botón limpiar filtros */
#limpiarFiltrosBtn {
    transition: all 0.3s ease;
}

#limpiarFiltrosBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .d-flex.align-items-center.mr-4 {
        flex-direction: column;
        align-items: stretch !important;
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }

    .filter-dropdown {
        margin-bottom: 0.5rem;
    }

    .filter-dropdown .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }

    #filtrosActivosList {
        flex-direction: column;
        align-items: stretch;
    }

    #filtrosActivosList .badge {
        margin-right: 0 !important;
        margin-bottom: 0.5rem !important;
        justify-content: center;
    }
}

/* Estilos para botón de exportación mejorado */
#exportBtn {
    transition: all 0.3s ease;
}

#exportBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

#exportBtn .dropdown-menu .navi-link {
    transition: all 0.3s ease;
}

#exportBtn .dropdown-menu .navi-link:hover {
    background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
    transform: translateX(5px);
}

#exportBtn .navi-text div {
    font-weight: 600;
    color: #2c3e50;
}

#exportBtn .navi-text small {
    font-size: 10px;
    opacity: 0.8;
}
