/* ==========================================================
   Redge HVAC — Estilos compactos optimizados para móvil
   ========================================================== */

:root {
  --redge-red: #d92323;
  --text-color: #222;
  --border-light: #ddd;
}

/* --- Fondo corporativo Redge HVAC --- */
body {
  background-image: url('../img/fondo.png');
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top left;
  background-color: var(--redge-red);
}

/* ---- General ---- */
body {
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--redge-red);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0.5rem;
}

/* ---- Cards compactas ---- */
.card {
  border: none !important;
  box-shadow: none !important;
  background: #fafafa;
  margin-bottom: 0.6rem;
}

.card-body {
  padding: 0.6rem 0.7rem;
}

/* ---- Formularios ---- */
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  color: #444;
}

input[type="text"],
input[type="email"],
input[type="datetime-local"],
input[type="file"],
textarea,
select {
  font-size: 0.9rem;
  padding: 0.35rem 0.4rem !important;
  border-radius: 0.35rem;
  border: 1px solid var(--border-light);
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

/* ---- Radio buttons ---- */
input[type="radio"] {
  accent-color: var(--redge-red);
  transform: scale(1.1);
  margin-right: 0.25rem;
}

/* ---- Secciones ---- */
.section-title {
  font-size: 0.95rem;
  color: var(--redge-red);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

/* ---- Botón principal ---- */
.btn-redge {
  background: linear-gradient(180deg, #1e88e5 0%, #1565c0 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.6rem;
  font-size: 1rem;
  width: 100%;
  border-radius: 0.4rem;
  transition: background 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-redge:hover {
  filter: brightness(1.1);
}
.btn-redge:active {
  background-color: #b91f1f;
}

/* ---- Responsividad ---- */
@media (max-width: 480px) {
  .form-container {
    padding: 0.4rem;
  }

  .row {
    --bs-gutter-x: 0.4rem;
  }

  input, textarea, select {
    font-size: 0.85rem !important;
  }

  .btn-redge {
    padding: 0.55rem;
    font-size: 0.95rem;
  }
}

/* ---- Ajustes visuales menores ---- */
label small {
  display: block;
  font-size: 0.75rem;
  color: #777;
}

::placeholder {
  color: #999;
  opacity: 0.9;
}

/* ---- Compactar espaciado de secciones ---- */
.mb-2, .mb-3, .mb-4 {
  margin-bottom: 0.4rem !important;
}

.mt-2 {
  margin-top: 0.4rem !important;
}

.g-2, .g-3 {
  --bs-gutter-x: 0.5rem !important;
}


/* ---- Animaciones suaves de despliegue ---- */
.fade-slide {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.25s ease-in-out;
}

.fade-slide.show {
  max-height: 400px; /* suficiente para textarea + labels */
  opacity: 1;
  overflow: visible;
}

.text-tech {
  color: #1e88e5 !important; /* mismo azul que el botón técnico */
}

input[type="date"].form-control {
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.9rem; /* igual que el resto de inputs */
  line-height: 1.2;
}
.error-tag {
  color: #d92323;
  font-size: 0.8rem;
}

.is-invalid {
  border-color: #d92323 !important;
  box-shadow: 0 0 0 0.1rem rgba(217,35,35,0.25);
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.3s ease-in-out;
}
.is-warning {
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 0.15rem rgba(255, 193, 7, 0.25);
}
