.cotin-altcha {
  width: 100%;
  max-width: var(--altcha-max-width, 360px);
  box-sizing: border-box;
}

.cotin-altcha__box {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 52px;
  background: var(--altcha-color-base, transparent);
  border: var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);
  border-radius: var(--altcha-border-radius, 3px);
  overflow: visible;
  color: var(--altcha-color-text, currentColor);
}

.cotin-altcha__box:focus-within {
  border-color: var(--altcha-color-border-focus, currentColor);
}

.cotin-altcha__widget {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.cotin-altcha__widget altcha-widget {
  width: 100%;
  min-width: 0;
  display: flex;
}

.cotin-altcha__widget .altcha {
  border: none !important;
  border-radius: 0 !important;
  max-width: none !important;
  min-height: 50px;
}

.cotin-altcha__widget .altcha-main {
  flex: 1;
}

.cotin-altcha__logo {
  flex-shrink: 0;
  display: flex;
  align-self: flex-start;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 10px 6px 4px;
  margin-top: 4px;
  box-sizing: border-box;
}

.cotin-altcha__logo-img {
  max-height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.cotin-altcha__codigo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  width: 100%;
  padding: 0 0.75rem 0.75rem;
  box-sizing: border-box;
}

.cotin-altcha__codigo-label {
  font-size: 0.85rem;
  color: #5b6b86;
  text-align: center;
  width: 100%;
}

.cotin-altcha__codigo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 280px;
}

.cotin-altcha__img {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid #d3dae8;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.cotin-altcha__reload {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d3dae8;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #5b6b86;
  font-size: 1.15rem;
  line-height: 1;
}

.cotin-altcha__reload:hover {
  background: #f8fafc;
}

.cotin-altcha__input {
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d3dae8;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}

.cotin-altcha__input--error {
  border-color: #dc2626;
  background: #fef2f2;
}

.cotin-altcha__input--success {
  border-color: #059669;
  background: #ecfdf5;
}

.cotin-altcha__feedback {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.cotin-altcha__feedback--error {
  color: #991b1b;
}

.cotin-altcha__feedback--success {
  color: #065f46;
}

.field--altcha .field-validation-error {
  display: block;
}
