/* ============================================
   SHORTCODE: Direcciones y Escuelas
   Dos columnas con listas scrolleables
   ============================================ */

/* Contenedor principal */
.revisor-direcciones-escuelas {
    width: 100%;
    padding: 20px;
}

/* Grid de dos columnas */
.direcciones-escuelas-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Panel individual */
.de-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Título del panel */
.de-panel-titulo {
    margin: 0 0 15px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 16px;
    font-weight: 600;
    color: #424242;
    display: flex;
    align-items: center;
    gap: 10px;
}

.de-panel-titulo i {
    color: #1e88e5;
    font-size: 18px;
}

/* Badge con contador */
.de-badge {
    background: #1e88e5;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
}

/* Lista scrolleable */
.de-lista {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    margin-bottom: 15px;
}

/* Scrollbar personalizado */
.de-lista::-webkit-scrollbar {
    width: 6px;
}

.de-lista::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 3px;
}

.de-lista::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 3px;
}

.de-lista::-webkit-scrollbar-thumb:hover {
    background: #9e9e9e;
}

/* Item de la lista */
.de-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.de-item:hover {
    background: #e3f2fd;
    border-color: #1e88e5;
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(30, 136, 229, 0.2);
}

.de-item i {
    color: #1e88e5;
    font-size: 18px;
    flex-shrink: 0;
}

.de-item-content {
    flex: 1;
}

.de-item-titulo {
    font-weight: 600;
    color: #212121;
    font-size: 14px;
    margin-bottom: 3px;
}

.de-item-subtitulo {
    font-size: 12px;
    color: #757575;
}

.de-item-fecha {
    font-size: 11px;
    color: #9e9e9e;
    flex-shrink: 0;
}

/* Estados de carga y vacío */
.de-loading,
.de-empty {
    text-align: center;
    padding: 60px 20px;
    color: #757575;
}

.de-loading i,
.de-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #bdbdbd;
}

.de-empty i {
    color: #4caf50;
}

.de-loading p,
.de-empty p {
    font-size: 14px;
    margin: 0;
}

/* ============================================
   MODALES
   ============================================ */

.de-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease;
}

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

.de-modal-contenido {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

/* Header del modal */
.de-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.de-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #212121;
}

.de-modal-cerrar {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #757575;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.de-modal-cerrar:hover {
    background: #f5f5f5;
    color: #212121;
}

/* Body del modal */
.de-modal-body {
    padding: 20px;
}

/* Campos del formulario */
.de-form-field {
    margin-bottom: 15px;
}

.de-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #424242;
    font-size: 13px;
}

.de-form-field input,
.de-form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.de-form-field input:focus,
.de-form-field select:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Fila de campos (2 columnas) */
.de-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

/* Info de cuándo se agregó */
.de-info-agregado {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.de-info-agregado i {
    color: #f57c00;
    font-size: 16px;
}

.de-info-agregado span {
    color: #e65100;
    font-size: 13px;
}

/* Footer del modal */
.de-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Botones */
.de-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.de-btn-primary {
    background: #1e88e5;
    color: white;
}

.de-btn-primary:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.de-btn-secondary {
    background: #f5f5f5;
    color: #616161;
}

.de-btn-secondary:hover {
    background: #e0e0e0;
}

.de-btn:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner en botones */
.de-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* ============================================
   MODAL DE SELECCIÓN
   ============================================ */

.de-seleccion-lista {
    max-height: 400px;
    overflow-y: auto;
}

.de-seleccion-item {
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.de-seleccion-item:hover {
    background: #e3f2fd;
    border-color: #1e88e5;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.2);
}

.de-seleccion-content {
    flex: 1;
}

.de-seleccion-titulo {
    font-weight: 600;
    color: #212121;
    font-size: 15px;
    margin-bottom: 4px;
}

.de-seleccion-subtitulo {
    font-size: 13px;
    color: #757575;
}

.de-seleccion-item i {
    color: #1e88e5;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.de-seleccion-item:hover i {
    opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .direcciones-escuelas-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .revisor-direcciones-escuelas {
        padding: 15px;
    }
    
    .de-panel {
        padding: 15px;
    }
    
    .de-lista {
        max-height: 400px;
    }
    
    .de-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .de-modal-contenido {
        width: 95%;
    }
}
