/*
 * Login first-paint fallback for the VPS Hi.Events bundle.
 *
 * The branded auth chunks can render before the shared Mantine stylesheet has
 * finished loading.  Keep these rules scoped to pages that render a password
 * input so the public event and embedded widget surfaces are untouched.
 */
body:has(.mantine-PasswordInput-innerInput) {
  --byk-login-text: #40296c;
  --byk-login-muted: #838383;
  --byk-login-line: #e2e2e2;
  --byk-login-surface: #ffffff;
  --byk-login-field: #f7f6f8;
  --byk-login-action: #c641d9;
  --byk-login-action-hover: #b832c7;
  background: var(--byk-login-field) !important;
  color: var(--byk-login-text) !important;
  font-family: Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body:has(.mantine-PasswordInput-innerInput) input,
body:has(.mantine-PasswordInput-innerInput) button {
  font-family: inherit;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-InputWrapper-label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--byk-login-text);
  font-size: 0.875rem;
  font-weight: 600;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-InputWrapper-root {
  margin-bottom: 1.25rem;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-TextInput-input,
body:has(.mantine-PasswordInput-innerInput) .mantine-PasswordInput-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--byk-login-line) !important;
  border-radius: 10px !important;
  background: var(--byk-login-field) !important;
  color: var(--byk-login-text) !important;
  font-size: 0.9375rem;
  line-height: 1.4;
  padding: 0.75rem 1rem;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-TextInput-input:focus,
body:has(.mantine-PasswordInput-innerInput) .mantine-PasswordInput-input:focus-within {
  border-color: var(--byk-login-action) !important;
  box-shadow: 0 0 0 3px rgb(198 65 217 / 15%);
  outline: none;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-PasswordInput-input {
  display: flex;
  align-items: center;
  padding: 0 0.75rem 0 1rem;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-PasswordInput-innerInput {
  box-sizing: border-box;
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: inherit;
  font: inherit;
  padding: 0;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-PasswordInput-visibilityToggle {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
  color: var(--byk-login-muted);
  cursor: pointer;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-PasswordInput-visibilityToggle:hover {
  background: rgb(64 41 108 / 8%) !important;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-Button-root {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--byk-login-action) !important;
  color: #ffffff !important;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.75rem 1rem;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body:has(.mantine-PasswordInput-innerInput) .mantine-Button-root:hover:not(:disabled) {
  background: var(--byk-login-action-hover) !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  transform: translateY(-1px);
}

body:has(.mantine-PasswordInput-innerInput) .mantine-Button-root:disabled {
  cursor: wait;
  opacity: 0.7;
}

body:has(.mantine-PasswordInput-innerInput) input::placeholder {
  color: var(--byk-login-muted);
  opacity: 0.8;
}
