/**
 * Estilos para el módulo de Eventos (Agenda de Post-its)
 * Versión: 1.000
 * Namespaced bajo .eventos-root para evitar conflictos
 */

/* Estilos base para post-its */
.eventos-root .eventos-postit {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border: 1px solid #fdd835;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: rotate(0deg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.eventos-root .eventos-postit:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Variaciones de color por prioridad */
.eventos-root .eventos-postit.border-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
}

.eventos-root .eventos-postit.border-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ff9800;
}

.eventos-root .eventos-postit.border-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #4caf50;
}

/* Efecto de rotación aleatoria para variedad visual - DESHABILITADO */
.eventos-root .eventos-postit:nth-child(odd) {
    transform: rotate(0deg);
}

.eventos-root .eventos-postit:nth-child(even) {
    transform: rotate(0deg);
}

.eventos-root .eventos-postit:nth-child(3n) {
    transform: rotate(0deg);
}

/* Estilos para el contenido de las tarjetas */
.eventos-root .eventos-postit .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.eventos-root .eventos-postit .card-text {
    font-size: 0.8rem;
    line-height: 1.3;
    color: #666;
}

.eventos-root .eventos-postit .small {
    font-size: 0.75rem;
}

/* Botones de acción en post-its */
.eventos-root .eventos-postit .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.eventos-root .eventos-postit .btn-group-sm .btn i {
    font-size: 0.7rem;
}

/* Efecto de pegatina en la esquina */
.eventos-root .eventos-postit::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.1) 70%, transparent 70%);
    border-radius: 0 8px 0 0;
}

/* Animaciones */
@keyframes eventosSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(-1deg);
    }
}

.eventos-root .eventos-postit {
    animation: eventosSlideIn 0.5s ease-out;
}

/* Efecto de hover mejorado */
.eventos-root .eventos-postit:hover .card-title {
    color: #000;
}

.eventos-root .eventos-postit:hover .btn {
    transform: scale(1.1);
}

/* Estilos para contadores */
.badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
}

/* Estilos para filtros - Solo para eventos */
.eventos-root .card-header,
#eventos-container .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

/* Estilos para modales */
.modal-content {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

/* Estilos para formularios */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estilos para checklist */
.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.form-check-label {
    transition: all 0.3s ease;
}

.form-check-label.text-decoration-line-through {
    text-decoration: line-through !important;
    opacity: 0.7;
}

/* Estilos para adjuntos */
.border.rounded {
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.border.rounded:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* Estilos para adjuntos en vista principal */
.adjuntos-items {
    max-height: 120px;
    overflow-y: auto;
}

.adjuntos-items .d-flex {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.adjuntos-items .d-flex:hover {
    background-color: #e9ecef !important;
}

.adjuntos-items .fas {
    font-size: 0.8em;
}

.adjuntos-items .text-danger {
    color: #dc3545 !important;
}

.adjuntos-items .text-primary {
    color: #007bff !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .eventos-root .eventos-postit {
        transform: none;
        margin-bottom: 1rem;
    }

    .eventos-root .eventos-postit:hover {
        transform: scale(1.02);
    }

    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .eventos-root .eventos-postit .card-body {
        padding: 0.75rem;
    }

    .eventos-root .eventos-postit .card-title {
        font-size: 0.85rem;
    }

    .eventos-root .eventos-postit .card-text {
        font-size: 0.75rem;
    }
}

/* Estilos para estados de carga */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Estilos para mensajes de estado */
.text-muted {
    color: #6c757d !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

/* Estilos para iconos */
.fas, .far {
    margin-right: 0.25rem;
}

/* Estilos para el historial */
.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

.historial-entrada {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.historial-entrada:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.historial-valor {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 8px;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.historial-campo {
    color: #6c757d;
    font-size: 0.85em;
    margin-bottom: 3px;
}

.historial-valor .row {
    margin-bottom: 5px;
}

.historial-valor .row:last-child {
    margin-bottom: 0;
}

/* Estilos para el PDF */
@media print {
    .eventos-root .eventos-postit {
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Utilidades adicionales */
.eventos-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.eventos-slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Estilos para el selector de agrupación */
.btn-group .btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Estilos para los días colapsables */
.collapse {
    transition: height 0.3s ease;
}

/* Mejoras visuales para las tarjetas de día */
.card.shadow {
    transition: box-shadow 0.3s ease;
}

.card.shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Estilos para el contenedor principal */
.container-fluid {
    padding: 1rem;
}

/* Estilos para los botones de acción */
.btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-dark:hover {
    background-color: #343a40;
    border-color: #343a40;
}
