/* Modal de Plantilla de Contacto */
#modal-plantilla {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#modal-plantilla > div {
    background: white;
    max-width: 550px;
    margin: 50px auto;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Header del modal */
#modal-plantilla h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
    font-size: 1.5rem;
    font-weight: 600;
}

#modal-plantilla h3 i {
    margin-right: 12px;
    font-size: 1.4rem;
}

/* Contenido interno (simulando el padding original) */
#modal-plantilla h3 + div {
    padding: 25px;
}

/* Grupos de formulario */
#modal-plantilla .form-group {
    margin-bottom: 20px;
}

#modal-plantilla label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

#modal-plantilla label i {
    margin-right: 8px;
    color: #667eea;
}

/* Campos de entrada */
#modal-plantilla .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

#modal-plantilla .form-control:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Selects específicos */
#modal-plantilla select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* Botones */
#modal-plantilla .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#modal-plantilla .btn i {
    font-size: 1rem;
}

/* Botón Eliminar */
#modal-plantilla .btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

#modal-plantilla .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.3);
}

/* Botón Secundario (Cerrar) */
#modal-plantilla .btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

#modal-plantilla .btn-secondary:hover {
    background-color: #cbd5e0;
    transform: translateY(-1px);
}

/* Botón Primario (Guardar) */
#modal-plantilla .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#modal-plantilla .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Efecto de clic en botones */
#modal-plantilla .btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
    #modal-plantilla > div {
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    #modal-plantilla h3 {
        font-size: 1.3rem;
        padding: 15px 20px;
    }
    
    #modal-plantilla h3 + div {
        padding: 20px;
    }
    
    #modal-plantilla .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    #modal-plantilla div[style*="justify-content: space-between"] {
        flex-direction: column;
        gap: 12px;
    }
    
    #modal-plantilla div[style*="justify-content: space-between"] > div {
        display: flex;
        gap: 10px;
        justify-content: flex-end;
    }
    
    #modal-plantilla .btn-danger {
        order: 2;
    }
}

/* Animación de carga (opcional) */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#modal-plantilla.loading .btn-primary i {
    animation: pulse 1s ease-in-out infinite;
}
