/* Страница заявки на клан (l2_public_base + html.light) */
.apply-l2-toast-host {
  position: fixed;
  z-index: 10050;
  top: calc(5rem + 0.5rem);
  right: 0.75rem;
  left: auto;
  max-width: min(92vw, 17.5rem);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.apply-l2-toast {
  pointer-events: auto;
  border-radius: 0.5rem;
  padding: 0.45rem 1.65rem 0.45rem 0.55rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  animation: apply-l2-toast-in 0.25s ease-out;
}
@keyframes apply-l2-toast-in {
  from { opacity: 0; transform: translateX(0.4rem); }
  to { opacity: 1; transform: translateX(0); }
}
.apply-l2-toast--error {
  background: #dc2626;
  border: 1px solid #b91c1c;
  color: #fff;
}
html.light .apply-l2-toast--error {
  background: #fee2e2;
  border-color: #f87171;
  color: #7f1d1d;
}
.apply-l2-field-error-flash {
  animation: apply-l2-field-flash 1.6s ease-out;
}
@keyframes apply-l2-field-flash {
  0%, 100% { box-shadow: none; }
  15%, 45% { box-shadow: 0 0 0 2px #ef4444, 0 0 12px rgba(239, 68, 68, 0.35); }
}

/* Не приняты документы — заметная рамка */
.apply-l2-consent.apply-l2-consent--required:not(.apply-l2-consent--ok) {
  border-width: 2px;
  border-color: hsl(var(--destructive) / 0.65);
  box-shadow:
    0 0 0 1px hsl(var(--destructive) / 0.25),
    0 0 20px hsl(var(--destructive) / 0.12);
  background: hsl(var(--destructive) / 0.08);
}
html.light .apply-l2-consent.apply-l2-consent--required:not(.apply-l2-consent--ok) {
  background: hsl(var(--destructive) / 0.06);
}

/* Плашка согласия: чуть крупнее, текст и иконка на одной линии по центру */
.apply-l2-consent.apply-l2-consent-row {
  min-height: 3.5rem;
  padding: 1rem 1.25rem;
  gap: 0.875rem;
  align-items: center;
}
.apply-l2-consent.apply-l2-consent-row .apply-l2-consent-cb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0;
}
.apply-l2-consent.apply-l2-consent-row .apply-l2-consent-text {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  padding-top: 0.05rem;
}
@media (min-width: 640px) {
  .apply-l2-consent.apply-l2-consent-row {
    padding: 1.125rem 1.375rem;
    min-height: 3.75rem;
  }
}

.apply-l2-verify-phrase {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 1.25rem 2.5rem;
  border-radius: 0.75rem;
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  width: 100%;
  max-width: 100%;
  font-family: var(--font-display);
}

.apply-l2-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.apply-l2-input:focus {
  outline: none;
  border-color: hsl(var(--primary) / 0.6);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}
.apply-l2-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  pointer-events: none;
  font-size: 0.9rem;
}

/* Кнопка отправки: как clan-forge btn-primary + круг с «+» */
.apply-l2-submit-plus-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: hsl(0 0% 100% / 0.22);
  color: hsl(var(--primary-foreground));
}
.apply-l2-submit-primary:not(:disabled) {
  box-shadow:
    0 4px 24px -4px hsl(var(--primary) / 0.55),
    0 0 36px -6px hsl(var(--primary) / 0.35);
}
.apply-l2-submit-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 12px -4px hsl(var(--primary) / 0.2);
}

.apply-l2-copy-phrase {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: var(--font-body);
}
.apply-l2-copy-phrase:hover {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.05);
  color: hsl(var(--foreground));
}

.apply-l2-toast-title {
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}
.apply-l2-toast-list {
  margin: 0;
  padding-left: 0.95rem;
  font-size: 0.6875rem;
  line-height: 1.4;
}
.apply-l2-toast-close {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  background: rgba(0, 0, 0, 0.12);
  color: #fff;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
html.light .apply-l2-toast--error .apply-l2-toast-close {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}
.apply-l2-toast {
  position: relative;
  padding: 0.45rem 1.65rem 0.45rem 0.55rem;
}
