/**
 * Dashboard Custom Styles
 * Estilos complementarios a Tailwind CSS para el plugin
 */

/* Variables globales */
:root {
    --color-brand-purple: #8b5cf6;
    --color-brand-blue: #3b82f6;
    --sidebar-width: 16rem;
}

/* Font base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ocultar admin bar de WordPress */
#wpadminbar {
    display: none !important;
}

body.admin-bar {
    margin-top: 0 !important;
}

/* Animaciones suaves */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
}

/* Glassmorphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient backgrounds */
.gradient-purple-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-brand {
    background: linear-gradient(135deg, var(--color-brand-purple) 0%, var(--color-brand-blue) 100%);
}

/* Tabla hover mejorado */
.table-row-hover {
    transition: background-color 0.15s ease;
}

.table-row-hover:hover {
    background-color: #f9fafb;
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Pulse animation para indicadores activos */
.pulse-indicator {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Badge de estado */
.badge-pending {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #fef3c7;
    color: #92400e;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Radio button personalizado */
input[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
}

/* Responsive sidebar */
@media (max-width: 640px) {
    :root {
        --sidebar-width: 0;
    }
}

/* Focus visible para accesibilidad */
*:focus-visible {
    outline: 2px solid var(--color-brand-purple);
    outline-offset: 2px;
}

/* Estilos para botones con gradiente que conservan hover */
.btn-gradient {
    background: linear-gradient(135deg, var(--color-brand-purple) 0%, var(--color-brand-blue) 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* Stats cards con efecto de brillo */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

/* Tabla responsive mejorada */
@media (max-width: 768px) {
    .responsive-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .responsive-table table {
        min-width: 600px;
    }
}

/* Empty state ilustraciones */
.empty-state-icon {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.empty-state-icon:hover {
    opacity: 0.7;
}

/* Toast notifications (si las usas) */
.toast {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Compatibilidad con WordPress */
.wp-core-ui .button-primary {
    background: var(--color-brand-purple) !important;
    border-color: var(--color-brand-purple) !important;
    box-shadow: none !important;
}

.wp-core-ui .button-primary:hover {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
}

/* Print styles */
@media print {
    .no-print,
    nav,
    button,
    .sidebar {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}