/* DPay palette on Frappe's own web pages (sign-in, password reset, portal pages), added through
   web_include_css in hooks.py. Plain CSS served as is: no build step. The helpdesk app itself
   (/helpdesk) carries the same colours in desk/src/index.css. */
:root:not([data-theme="dark"]) {
  --btn-primary: #1e8432;
  --primary: #1e8432;
  --primary-color: #1e8432;
}

/* Frappe's buttons: the Bootstrap .btn-primary and the newer .es-button (Continue on the
   sign-in page), whose solid variant reads these variables. */
:root:not([data-theme="dark"]) .btn.btn-primary {
  color: #ffffff;
  background-color: #1e8432;
  border-color: #1e8432;
}

:root:not([data-theme="dark"]) .btn.btn-primary:hover {
  background-color: #176b28;
  border-color: #176b28;
}

:root:not([data-theme="dark"]) .btn.btn-primary:active {
  color: #ffffff !important;
  background-color: #0a4a2b !important;
}

:root:not([data-theme="dark"]) .es-button:not([data-theme]) {
  --bt-solid-bg: #1e8432;
  --bt-solid-bg-hover: #176b28;
  --bt-solid-bg-active: #0a4a2b;
  --bt-solid-fg: #ffffff;
  --bt-focus: 2px solid #cfe5b8;
}

:root:not([data-theme="dark"]) a:not(.btn):not(.es-button) {
  color: #1e8432;
}

:root:not([data-theme="dark"]) input:focus,
:root:not([data-theme="dark"]) .form-control:focus {
  border-color: #1e8432;
  box-shadow: 0 0 0 2px #cfe5b8;
}

/* The wordmark is a wide image: never let it render at its natural 707 px. */
img.app-logo {
  max-height: 48px;
  max-width: 100%;
  width: auto;
}

/* Only the sign-in form shows until its script switches to another one. login.bundle.css says
   the same; repeated here so a page whose bundle has not arrived yet shows one form and one logo. */
.for-forgot,
.for-login-with-email-link,
.for-signup,
.for-email-login {
  display: none;
}

/* The sign-in, reset and sign-up forms as a card on a light brand tint (wider screens only;
   on a phone the form fills the screen, as Frappe lays it out). */
@media (min-width: 576px) {
  :root:not([data-theme="dark"]) body[data-path="login"],
  :root:not([data-theme="dark"]) body[data-path="update-password"] {
    background-color: #eef6e6;
  }

  :root:not([data-theme="dark"]) body[data-path="login"] .page-card,
  :root:not([data-theme="dark"]) body[data-path="update-password"] .page-card {
    border: 1px solid #cfe5b8;
    box-shadow: 0 1px 2px rgba(10, 74, 43, 0.06),
      0 8px 24px rgba(10, 74, 43, 0.08);
  }
}
