/* Estilos personalizados para la Plataforma de Preparación de Sala - Despacho 002 */

/* Variables CSS para colores institucionales */
:root {
    --judicial-green: #2d5016;
    --judicial-light-green: #4a7c59;
    --judicial-gray: #6b7280;
    --judicial-light-gray: #f3f4f6;
    --judicial-dark-gray: #374151;
    --judicial-success: #10b981;
    --judicial-warning: #f59e0b;
    --judicial-error: #ef4444;
    --judicial-info: #3b82f6;
}

/* Fuentes personalizadas */
body {
    font-family: 'Segoe UI', 'Inter', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
}

/* Altura personalizada para la vista de detalle */
.h-screen-minus-header {
    height: calc(100vh - 200px);
    min-height: 600px;
}

/* Estilos para los estados de asuntos */
.estado-aprobado {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.estado-en-estudio {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.estado-rechazado {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* Estado: Aprobado con Observaciones */
.estado-aprobado-con-observaciones {
    background-color: #ffedd5; /* orange-100 */
    color: #9a3412; /* orange-800 */
    border: 1px solid #fed7aa; /* orange-200 */
}

/* Alias para No Aprobado (si el backend usa "No Aprobado") */
.estado-no-aprobado {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Animaciones suaves */
.transition-all {
    transition: all 0.3s ease;
}

/* Hover effects para cards */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Estilos para los botones */
.btn-primary {
    background-color: var(--judicial-green);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--judicial-light-green);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--judicial-green);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid var(--judicial-green);
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--judicial-green);
    color: white;
}

/* Estilos para formularios */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--judicial-green);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

/* Estilos para el loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--judicial-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Estilos para las notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: var(--judicial-success);
}

.notification.error {
    background-color: var(--judicial-error);
}

.notification.warning {
    background-color: var(--judicial-warning);
}

.notification.info {
    background-color: var(--judicial-info);
}

/* Estilos para los iframes */
iframe {
    border: none;
    width: 100%;
    height: 100%;
}

/* Estilos para el embed de PDF */
embed {
    border: none;
    width: 100%;
    height: 100%;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .h-screen-minus-header {
        height: auto;
        min-height: 400px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* En móviles, los paneles se apilan verticalmente */
    .grid-cols-1.xl\\:grid-cols-10 {
        grid-template-columns: 1fr;
    }

    .xl\\:col-span-7,
    .xl\\:col-span-3 {
        grid-column: span 1;
        min-height: 300px;
    }
}

@media (max-width: 640px) {
    /* Ajustes para pantallas muy pequeñas */
    .text-2xl {
        font-size: 1.5rem;
    }

    .text-xl {
        font-size: 1.25rem;
    }

    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .py-6 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Estilos para mejorar la accesibilidad */
.focus\\:ring-2:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--judicial-green);
}

/* Estilos para el scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--judicial-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--judicial-dark-gray);
}

/* Estilos para las tablas (si se necesitan en el futuro) */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: var(--judicial-light-gray);
    font-weight: 600;
    color: var(--judicial-dark-gray);
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Estilos para badges y etiquetas */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Estilos para mejorar la impresión */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .bg-judicial-green {
        background: #2d5016 !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Estilos para dark mode (preparación futura) */
@media (prefers-color-scheme: dark) {
    /* Los estilos de dark mode se pueden agregar aquí en el futuro */
}

/* Utilidades adicionales */
.text-shadow {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(45deg, var(--judicial-green), var(--judicial-light-green)) 1;
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Estilos para elementos interactivos */
.interactive:hover {
    cursor: pointer;
    opacity: 0.8;
}

.interactive:active {
    transform: scale(0.98);
}

/* Estilos para el estado de carga */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mejoras de rendimiento */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}
