/* Field errors from features/lead-form/lead-rules.js, on both lead forms. */
.glomi-field-box[data-invalid="true"],
.glomi-field-box[data-invalid="true"]:hover,
.glomi-field-box[data-invalid="true"]:focus-within {
  border-color: var(--border-error);
  background: var(--feedback-error-bg);
}
.glomi-field-error {
  margin: 0;
  color: var(--text-error);
}
/* A message under the number must not push the country code down with it. */
.glomi-phone-row.glomi-phone-row { align-items: start; }
.glomi-field-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: var(--text-error);
  color: var(--surface-card);
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

/* The quick-call box sits on the dark inverse card. */
.glomi-quick-call + .glomi-field-error { margin-top: 8px; color: var(--color-palette-error-error-300); }
.glomi-quick-call + .glomi-field-error::before { background: var(--color-palette-error-error-300); color: var(--surface-inverse); }
.glomi-quick-call input[data-invalid="true"] { border-color: var(--color-palette-error-error-400); }

.glomi-call-code-host { position: relative; flex: 0 0 auto; }
.glomi-call-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-inverse);
  font: inherit;
  cursor: pointer;
}
.glomi-call-code:focus-visible { outline: 2px solid var(--text-on-inverse); outline-offset: 2px; }
.glomi-call-code .glomi-icon { font-size: 16px; }

/* On a narrow phone the code and the number share the first line, the button takes the second. */
@media (max-width: 480px) {
  .glomi-quick-call.glomi-quick-call > input { flex: 1 1 0% !important; }
  .glomi-quick-call.glomi-quick-call [data-g="call-btn"] { flex: 1 1 100%; }
}

/* Lead form toasts from site.js, drawn after the design system's GlomiToast (soft emphasis). */
.glomi-toasts {
  position: fixed;
  inset-inline: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.glomi-toast {
  --_bg: var(--surface-card);
  --_border: var(--border-hairline);
  --_mark: var(--text-brand);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: fit-content;
  min-width: min(260px, 100%);
  max-width: min(420px, 100%);
  padding: 14px 16px;
  border: 1px solid var(--_border);
  border-radius: var(--px-radius-12);
  background: var(--_bg);
  box-shadow: var(--elevation-02-raised);
  color: var(--text-primary);
  pointer-events: auto;
  animation: glomi-toast-in 0.24s ease-out both;
}
.glomi-toast[data-tone="success"] { --_bg: var(--feedback-success-bg); --_border: var(--feedback-success-border); --_mark: var(--feedback-success-fg); }
.glomi-toast[data-tone="error"] { --_bg: var(--feedback-error-bg); --_border: var(--feedback-error-border); --_mark: var(--feedback-error-fg); }
.glomi-toast-mark { flex: 0 0 auto; margin-top: 1px; color: var(--_mark); font-size: 18px; line-height: 1; }
.glomi-toast[data-tone="error"] .glomi-toast-mark::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--_mark);
  color: var(--surface-card);
  font-size: 12px;
  font-weight: 700;
}
.glomi-toast-text { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.glomi-toast-body { color: var(--text-secondary); }
.glomi-toast-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
}
[dir="rtl"] .glomi-toast-close { margin: -4px 0 0 -6px; }
.glomi-toast-close:hover { background: rgba(7, 2, 3, 0.06); }
.glomi-toast-close:focus-visible { outline: 2px solid var(--text-brand); outline-offset: 1px; }
@keyframes glomi-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 544px) { .glomi-toast { width: 100%; max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .glomi-toast { animation-duration: 0.01s; } }

/* The "other" industry box opens inside the industry column, right under the dropdown. */
[data-g="demo-other"] > * { margin-top: 10px; }
