/*
 * GD Print Auth UI hotfix
 * Include this AFTER style.css and auth-ui.css.
 * Fixes Font Awesome glyphs and prevents global input/select rules from breaking the auth layout.
 */

html body.auth-page,
html body.auth-page * {
  box-sizing: border-box;
}

html body.auth-page {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

html body.auth-page .auth-card,
html body.auth-page .auth-card h1,
html body.auth-page .auth-card p,
html body.auth-page .auth-card label,
html body.auth-page .auth-card input,
html body.auth-page .auth-card select,
html body.auth-page .auth-card button,
html body.auth-page .auth-card a {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
}

html body.auth-page .auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

html body.auth-page .auth-field {
  min-width: 0;
  width: 100%;
}

html body.auth-page .auth-field.full,
html body.auth-page .auth-field.auth-field-full,
html body.auth-page .auth-form-grid > .auth-field:has(select[name="plan"]) {
  grid-column: 1 / -1;
}

html body.auth-page .auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
}

html body.auth-page .auth-input-wrap > i.fa-solid,
html body.auth-page .auth-input-wrap > i.fa-regular,
html body.auth-page .auth-input-wrap > i.fa-brands {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 18px;
  margin: 0 !important;
  padding: 0 !important;
  color: #8b9bb2;
  font-family: "Font Awesome 6 Free" !important;
  font-style: normal !important;
  font-variant: normal !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-indent: 0 !important;
  speak: never;
  -webkit-font-smoothing: antialiased;
}

html body.auth-page .auth-input-wrap input,
html body.auth-page .auth-input-wrap select {
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 42px 0 42px !important;
  border: 1px solid #d8e2f0 !important;
  border-radius: 13px !important;
  background: #f6f8fb !important;
  color: #172b49 !important;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: normal !important;
  text-indent: 0 !important;
  box-shadow: none !important;
  appearance: auto;
  -webkit-appearance: auto;
}

html body.auth-page .auth-input-wrap input::placeholder {
  color: #91a3bd !important;
  opacity: 1;
}

html body.auth-page .auth-input-wrap input:focus,
html body.auth-page .auth-input-wrap select:focus {
  outline: none !important;
  border-color: #24449a !important;
  box-shadow: 0 0 0 3px rgba(36, 68, 154, .12) !important;
}

html body.auth-page .auth-password-wrap input {
  padding-right: 48px !important;
}

html body.auth-page .auth-input-wrap .password-toggle {
  position: absolute;
  z-index: 3;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #8b9bb2 !important;
  box-shadow: none !important;
  cursor: pointer;
}

html body.auth-page .auth-input-wrap .password-toggle i {
  position: static !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-size: 15px !important;
}

html body.auth-page .auth-card .auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 16px;
  font-weight: 650;
}

html body.auth-page .auth-submit > i,
html body.auth-page .auth-logo-fallback > i {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

html body.auth-page .auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

html body.auth-page .auth-check input[type="checkbox"] {
  flex: 0 0 18px !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  accent-color: #24449a;
}

@media (max-width: 640px) {
  html body.auth-page .auth-shell {
    width: 100%;
    padding: 18px 12px !important;
  }

  html body.auth-page .auth-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
  }

  html body.auth-page .auth-inner {
    padding: 26px 20px !important;
  }

  html body.auth-page .auth-form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  html body.auth-page .auth-field.full,
  html body.auth-page .auth-field.auth-field-full {
    grid-column: auto;
  }
}
