/* ===========================================
   FleetOps Admin - Estilos personalizados
   =========================================== */

/* Corralón: ocultar filas de motivo (JS añade clase; refuerzo por si flex !important) */
.impound-yard-reason-row--hidden {
  display: none !important;
}

/* Encabezados de cards en formularios */
body.app-purchase_orders.model-purchaseorder.change-form .col-12.col-lg-9 .card-header {
  font-weight: 700;
}

/* ===========================================
   Botones de Transición FSM
   =========================================== */

/* Estilos base para todos los botones FSM de transición */
.submit-row input[type="submit"][class*="transition-"] {
  display: block;
  width: 100%;
  padding: 10px 15px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Botón de Aprobar - Verde */
.submit-row input.transition-approve {
  background-color: #28a745 !important;
  color: white !important;
}

.submit-row input.transition-approve:hover {
  background-color: #218838 !important;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.4);
}

/* Botón de Rechazar - Rojo */
.submit-row input.transition-reject,
.submit-row input.transition-mark_rejected {
  background-color: #dc3545 !important;
  color: white !important;
}

.submit-row input.transition-reject:hover,
.submit-row input.transition-mark_rejected:hover {
  background-color: #c82333 !important;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
}

/* Botón Marcar como Disponible - Azul */
.submit-row input.transition-mark_available {
  background-color: #17a2b8 !important;
  color: white !important;
}

.submit-row input.transition-mark_available:hover {
  background-color: #138496 !important;
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.4);
}

/* Otros botones de transición genéricos - Azul primario */
.submit-row input[type="submit"][class*="transition-"]:not(.transition-approve):not(.transition-reject):not(.transition-mark_rejected):not(.transition-mark_available) {
  background-color: #007bff !important;
  color: white !important;
}

.submit-row input[type="submit"][class*="transition-"]:not(.transition-approve):not(.transition-reject):not(.transition-mark_rejected):not(.transition-mark_available):hover {
  background-color: #0056b3 !important;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.4);
}

/* ===========================================
   Barra lateral de Jazzmin - Botones FSM
   =========================================== */

/* Contenedor de submit en Jazzmin */
.card .submit-row {
  padding: 10px;
  background: transparent;
  border: none;
}

/* Separador antes de los botones FSM */
.submit-row input[type="submit"][class*="transition-"]:first-of-type {
  margin-top: 15px;
  border-top: 1px solid #dee2e6;
  padding-top: 15px;
}

/* ===========================================
   Botones de Subprocesos (Vehículos)
   =========================================== */

/* Botones de transición de subprocesos */
.inline-group a.button,
.inline-related a.button {
  display: inline-block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-right: 5px;
  margin-bottom: 5px;
}

.inline-group a.button:hover,
.inline-related a.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ===========================================
   Estilos para hints de transiciones FSM
   =========================================== */

.fsm-transition-hints {
  margin-top: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid #17a2b8;
}

.fsm-transition-hints h4 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 14px;
}

.fsm-transition-hints ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fsm-transition-hints li {
  padding: 5px 0;
  font-size: 13px;
  color: #6c757d;
}

/* ===========================================
   Botón Imprimir PDF
   =========================================== */

.submit-row a.btn-info {
  display: block;
  width: 100%;
  padding: 10px 15px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  color: white;
  background-color: #17a2b8;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-row a.btn-info:hover {
  background-color: #138496;
  box-shadow: 0 2px 4px rgba(23, 162, 184, 0.4);
  color: white;
  text-decoration: none;
}

.submit-row a.btn-info i {
  margin-right: 5px;
}

/* Jazzmin: enlaces de acción con clase fleet-action-btn en campos readonly */
.card-body .readonly a.fleet-action-btn,
.form-row .readonly a.fleet-action-btn,
.aligned .form-row div.readonly a.fleet-action-btn,
div.readonly a.fleet-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  margin: 4px 8px 4px 0 !important;
  white-space: nowrap !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.card-body .readonly a.fleet-action-btn:hover,
.form-row .readonly a.fleet-action-btn:hover,
.aligned .form-row div.readonly a.fleet-action-btn:hover,
div.readonly a.fleet-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none !important;
  opacity: 0.95;
}

.card-body .readonly a.fleet-action-btn--info,
.form-row .readonly a.fleet-action-btn--info,
div.readonly a.fleet-action-btn--info {
  background-color: #17a2b8 !important;
  color: #fff !important;
}

.card-body .readonly a.fleet-action-btn--info:hover,
.form-row .readonly a.fleet-action-btn--info:hover,
div.readonly a.fleet-action-btn--info:hover {
  background-color: #138496 !important;
  color: #fff !important;
}

.card-body .readonly a.fleet-action-btn--success,
.form-row .readonly a.fleet-action-btn--success,
div.readonly a.fleet-action-btn--success {
  background-color: #28a745 !important;
  color: #fff !important;
}

.card-body .readonly a.fleet-action-btn--success:hover,
.form-row .readonly a.fleet-action-btn--success:hover,
div.readonly a.fleet-action-btn--success:hover {
  background-color: #218838 !important;
  color: #fff !important;
}

.card-body .readonly a.fleet-action-btn--warning,
.form-row .readonly a.fleet-action-btn--warning,
div.readonly a.fleet-action-btn--warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.card-body .readonly a.fleet-action-btn--warning:hover,
.form-row .readonly a.fleet-action-btn--warning:hover,
div.readonly a.fleet-action-btn--warning:hover {
  background-color: #e0a800 !important;
  color: #212529 !important;
}

.card-body .readonly a.fleet-action-btn--danger,
.form-row .readonly a.fleet-action-btn--danger,
div.readonly a.fleet-action-btn--danger {
  background-color: #dc3545 !important;
  color: #fff !important;
}

.card-body .readonly a.fleet-action-btn--danger:hover,
.form-row .readonly a.fleet-action-btn--danger:hover,
div.readonly a.fleet-action-btn--danger:hover {
  background-color: #c82333 !important;
  color: #fff !important;
}

.card-body .readonly a.fleet-action-btn--neutral,
.form-row .readonly a.fleet-action-btn--neutral,
div.readonly a.fleet-action-btn--neutral {
  background-color: #6c757d !important;
  color: #fff !important;
}

.card-body .readonly a.fleet-action-btn--neutral:hover,
.form-row .readonly a.fleet-action-btn--neutral:hover,
div.readonly a.fleet-action-btn--neutral:hover {
  background-color: #5a6268 !important;
  color: #fff !important;
}

/* Corralón — comentarios: enlace «Eliminar» (Jazzmin suele ocultar <button> en .readonly) */
.card-body .readonly .impound-yard-post-panel a.fleet-action-btn,
.form-row .readonly .impound-yard-post-panel a.fleet-action-btn,
div.readonly .impound-yard-post-panel a.fleet-action-btn,
.card-body .readonly .impound-yard-post-panel a.deletelink,
.form-row .readonly .impound-yard-post-panel a.deletelink,
div.readonly .impound-yard-post-panel a.deletelink {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-decoration: none !important;
}
