/* Integration feedback only. Page layout is defined by the original theme. */
:root {

  --form-primary: #1fa038;
  --form-primary-dark: #008018;
  --form-success: #28a745;
  --form-danger: #dc3545;
  --form-warning: #ffc107;
  --form-info: #17a2b8;
  --form-white: #ffffff;
  --form-black: #111111;
  --form-gray-light: #f8f9fa;
  --form-gray: #6c757d;
  

  --form-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --form-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.25);
  --form-radius: 20px;
  --form-radius-small: 10px;
  

  --form-anim-fast: 200ms ease;
  --form-anim-medium: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  

  --form-focus-ring: 0 0 0 3px rgba(31, 160, 56, 0.35);
  --form-focus-gray: 0 0 0 3px rgba(108, 117, 125, 0.25);
  --form-focus-success: 0 0 0 3px rgba(40, 167, 69, 0.25);
  --form-focus-danger: 0 0 0 3px rgba(220, 53, 69, 0.25);
  --form-focus-warning: 0 0 0 3px rgba(255, 193, 7, 0.25);
  


}

input.valid,
textarea.valid,
select.valid,
.form-field.valid {
  background: #ecfdf5 !important;
  border-color: var(--form-success) !important;
  box-shadow: var(--form-focus-success) !important;
}

input.invalid,
textarea.invalid,
select.invalid,
.form-field.invalid {
  background: #fef2f2 !important;
  border-color: var(--form-danger) !important;
  box-shadow: var(--form-focus-danger) !important;
}

input[type="tel"][style*="border-color: #ffc107"],
input[type="tel"][style*="border-color: rgb(255, 193, 7)"],
.phone-checking {
  background: #fffef0 !important;
  border-color: var(--form-warning) !important;
  box-shadow: var(--form-focus-warning) !important;
}

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

/* Индикатор проверки телефона из script.js */
input[type="tel"][style*="background-image"] {
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 20px 20px !important;
  animation: phone-validation-spin 1s linear infinite;
}

.pageloader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(249, 249, 249, 0.8);
  display: none;
}

.pageloader::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--form-primary, #1fa038);
  border-radius: 50%;
  animation: pageloader-spin 0.8s linear infinite;
}

@keyframes pageloader-spin {
  to { transform: rotate(360deg); }
}

@keyframes onAutoFillStart {
  from {} 
  to {}
}

input:-webkit-autofill {
  animation-name: onAutoFillStart;
}

.integra-toasts {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.integra-toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  background: #374151;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  word-break: break-word;
  animation: integra-toast-in 180ms ease-out;
}

.integra-toast--success { background: #16a34a; }
.integra-toast--error   { background: #dc2626; }
.integra-toast--warning { background: #d97706; }
.integra-toast--info    { background: #2563eb; }

.integra-toast--out { opacity: 0; transition: opacity 200ms ease; }

@keyframes integra-toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .integra-toasts { top: auto; bottom: 12px; left: 12px; right: 12px; max-width: none; }
}

.suggestion {
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all var(--form-anim-fast);
  font-weight: 500;
}

.suggestion:hover,
.suggestion:focus-visible {
  background-color: #dbeafe;
  text-decoration: none;
  color: #1d4ed8;
}



.registration-form .iti { width: 100%; }
.registration-form button[type="submit"]:disabled { cursor: progress; }
