/* Estilos para la vista Solicitud de Servicios IMT */

/* Variables y configuración base */
:root {
  --gob-rojo: #611232;
  --gob-dorado: #a57f2c;
  --gob-azul: #1E88E5; /* Azul de enfoque accesible */
  --color-error: #a94442;
  --color-texto-secundario: #666;
}

/* Container responsive */
.container-fluid { 
  padding: 15px; 
}

/* Breadcrumb responsive */
.breadcrumb {
  background: transparent;
  padding: 8px 0;
  margin-bottom: 20px;
  margin-top: 10px;
}

.breadcrumb a {
  color: var(--gob-rojo);
  text-decoration: none;
}

.crumb-link,
.crumb-link:focus,
.crumb-link:active,
.crumb-link:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
.crumb-link::-moz-focus-inner { border: 0; }
.crumb-link { -webkit-tap-highlight-color: transparent; }

/* Títulos */
h1 {
  font-size: 3.5rem;
  margin: 10px 0 6px !important;
  font-weight: bold;
  text-align: center;
}

h3 {
  font-size: 2rem;
  margin-top: 0 !important;
  font-weight: bold;
}

.title-underline {
  height: 4px;
  width: 48px;
  background: var(--gob-dorado);
  margin: 6px 0 18px;
}

/* Form groups */
.form-group {
  margin-bottom: 20px;
}

/* Forzar visualmente mayúsculas en campos configurados */
.to-uppercase {
  text-transform: uppercase;
}
/* Mantener los placeholders con su capitalización original */
.to-uppercase::placeholder {
  text-transform: none;
}

label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

label .required {
  color: #a00;
}

/* Inputs y selects - Tamaño GRANDE */
.form-control {
  font-size: 16px !important;
  padding: 12px 15px !important;
  border-radius: 4px !important;
  width: 100%;
  border: 1px solid #ccc;
  height: auto;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

/* Enfoque azul clásico Bootstrap 3 (efecto idéntico al CDN) */
.form-control:focus,
.form-control:focus-visible {
  border-color: #66afe9;
  outline: 0;
  box-shadow:
    inset 0 1px 1px rgba(0,0,0,.075),
    0 0 8px rgba(102,175,233,.6);
}

/* Aplicar el mismo efecto a selects */
select.form-control:focus,
select.form-control:focus-visible {
  border-color: #66afe9;
  outline: 0;
  box-shadow:
    inset 0 1px 1px rgba(0,0,0,.075),
    0 0 8px rgba(102,175,233,.6);
}

.form-control::placeholder {
  color: #999;
}

/* Textarea */
textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Select wrapper */
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

select.form-control {
  height: 50px !important;
  padding: 12px 15px !important;
  padding-right: 45px !important;
  line-height: 1.5 !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.select-wrapper svg {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #333;
  pointer-events: none;
}

/* Error messages */
.error-message {
  display: none;
  color: var(--color-error);
  margin-top: 5px;
  font-size: 14px;
}

/* Alert styles */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.alert-success {
  background-color: #dff0d8;
  border-color: #d6e9c6;
  color: #3c763d;
}

.alert-danger {
  background-color: #f2dede;
  border-color: #ebccd1;
  color: #a94442;
}

/* Separador horizontal */
hr {
  border: 0;
  border-top: 1px solid #000 !important;
  margin: 20px 0;
}

/* Button */
.btn-gob-outline { 
  background: #fff !important; 
  color: var(--gob-rojo) !important; 
  border: 2px solid var(--gob-rojo) !important; 
  box-shadow: none !important; 
  text-decoration: none !important; 
  padding: 12px 30px !important;
  font-size: 16px !important;
  min-width: 120px !important;
  border-radius: 4px !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-gob-outline:hover,
.btn-gob-outline:focus { 
  background: var(--gob-rojo) !important; 
  color: #fff !important; 
  border-color: var(--gob-rojo) !important; 
}

.btn-gob-outline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Centrar contenido (spinner/texto) dentro del botón Enviar */
#btn-enviar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--gob-rojo);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 0; /* centrado cuando no hay texto */
}
.spinner.with-text { margin-left: 10px; }

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navegación */
.nav-actions {
  margin-top: 10px;
}

/* Nota de campos obligatorios */
.required-note {
  margin-top: 15px;
  color: #777;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h3 { font-size: 1.7rem; }
}

@media (max-width: 576px) {
  h1 { font-size: 2rem; }
  h3 { font-size: 1.8rem; }
}