:root {
  --primary-color: #26b3b4;
  --primary-hover: #1c8a8b;
  --dark-teal: #0b7e7f;
  --secondary-color: #ffffff;
  --text-color: #333333;
  --light-bg: #f5f9fa;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(38, 179, 180, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: Arial, sans-serif;
  padding: 0px;
  max-width: 450px;
  margin: 0 auto;
}

.container {
  max-width: 450px;
  width: 100%;
  background-color: var(--secondary-color);
  padding: 10px;
}

h1 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  font-size: 24px;
}

.step {
  margin-bottom: 15px;
}

.form-label {
  color: var(--text-color);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 5px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.action-buttons button {
  flex: 1;
  padding: 5px 12px;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 32px;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  color: white !important;
  box-shadow: 0 0 0 0.25rem rgba(38, 179, 180, 0.5) !important;
}

.btn-primary:active {
  background-color: var(--dark-teal) !important;
  border-color: var(--dark-teal) !important;
}

.btn-primary:disabled {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  opacity: 0.65;
  cursor: not-allowed;
  color: white;
}

.btn-finalizada {
  background-color: #6c757d !important;
  cursor: not-allowed !important;
}

.btn-outline-secondary {
  background-color: #6c757d;
  border-color: #5a6268;
  color: #ffffff;
}

.btn-outline-secondary:hover {
  background-color: #5a6268;
  border-color: #495057;
  color: #ffffff;
}

.btn-outline-secondary:disabled {
  background-color: #6c757d !important;
  border-color: #5a6268 !important;
  color: #e9ecef !important;
  opacity: 0.65 !important;
  cursor: not-allowed;
}

.btn i {
  margin-right: 5px;
}

.hidden {
  display: none;
}

#tipoDocumento {
  height: 40px;
  padding-left: 15px;
  font-size: 14px;
  text-transform: uppercase;
}

#apellidos,
#nombres,
#email {
  text-transform: uppercase;
}

::placeholder {
  text-transform: none !important;
}

.input-group-text {
  height: 40px;
  width: 45px;
  background-color: var(--light-bg);
  padding: 0.375rem 0.5rem;
  min-width: 40px;
  justify-content: center;
  text-align: center;
}

.input-group-text i {
  width: 16px;
  text-align: center;
  font-size: 16px;
}

.input-group {
  width: 100%;
}

.form-control,
.form-select {
  padding: 0.375rem 0.5rem;
  font-size: 14px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.form-control:disabled,
.form-select:disabled {
  background-color: #e9ecef !important;
  border-color: #ced4da !important;
  color: #495057 !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

.form-control:enabled,
.form-select:enabled {
  background-color: #ffffff !important;
  color: #212529 !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(38, 179, 180, 0.25) !important;
}

.form-container.locked {
  position: relative;
}

.form-container.locked::after {
  content: "\f023";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 14px;
  z-index: 5;
}

.form-container.locked .input-group-text,
.form-container.locked input,
.form-container.locked select {
  position: relative;
  z-index: 1;
}

.form-container.locked .form-control,
.form-container.locked .form-select {
  padding-right: 30px;
}

.form-container.locked select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none !important;
}

.form-container.locked .form-select::-ms-expand {
  display: none;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.captcha-image {
  border: 1px solid #ddd;
  padding: 5px;
  border-radius: var(--border-radius);
  background-color: var(--light-bg);
  letter-spacing: 1px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: var(--text-color);
  font-size: 18px;
  text-align: center;
  width: 120px;
  height: 46px;
  line-height: 36px;
  flex-shrink: 0;
}

.captcha-input-container {
  flex: 1;
  max-width: 200px;
}

.captcha-input-container .input-group-text {
  width: 36px;
  height: 36px;
}

#captchaText {
  height: 36px;
  font-size: 14px;
  padding: 0.375rem 0.75rem;
}

.captcha-refresh-container {
  width: 100%;
  text-align: left;
  margin-top: 5px;
}

.captcha-refresh {
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}

.captcha-refresh:hover {
  color: var(--primary-hover);
}

.error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 3px;
}

.row > * {
  padding-left: 5px;
  padding-right: 5px;
}

.row {
  margin-left: -5px;
  margin-right: -5px;
}

.mb-3 {
  margin-bottom: 10px !important;
}

@media (max-width: 450px) {
  .col-md-6,
  .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 10px;
  }

  .prefijo-container {
    flex: 0 0 25%;
    max-width: 25%;
    padding-right: 0;
  }

  .celular-container {
    flex: 0 0 75%;
    max-width: 75%;
  }

  #prefijo {
    padding-left: 8px;
    padding-right: 4px;
    font-size: 13px;
  }

  .captcha-input-container {
    flex: 0 0 120px;
    max-width: 120px;
  }
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow);
  outline: 0;
}

.input-group {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.input-group-text {
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
}

.form-control,
.form-select {
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.form-container {
  position: relative;
  margin-bottom: 10px;
}

#captchaText {
  padding: 0.25rem 0.5rem;
  font-size: 13px;
  height: 36px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(38, 179, 180, 0.3);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  animation: spin 1s linear infinite;
}

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

.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading:after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-right-color: transparent;
  margin-left: 0.5em;
  animation: spin 1s linear infinite;
}

#flagIcon {
  font-size: 14px;
  line-height: 1;
}
