/* ProUltimate — the public side: login, forgot password, pricing, blog.
 *
 * Loaded by one line in frontend/Stacklight/Views/index.php, after the
 * theme's own style.css. Separate from proultimate.css on purpose: the panel
 * and the public pages are different surfaces with different themes, and a
 * change to one should never be able to disturb the other.
 *
 * "/" redirects to /login, so the login page IS this product's homepage —
 * it is the first and often only public page anyone sees. It gets the care
 * a homepage gets.
 */

:root {
  --pug-green:      #128c4a;
  --pug-green-700:  #0f7a40;
  --pug-green-soft: #e8f5ee;
  --pug-ink:        #16202a;
  --pug-muted:      #5f6b76;
  --pug-line:       #e4e8ec;
}

/* ---------------------------------------------------------------
   The page itself
   --------------------------------------------------------------- */

body {
  background: linear-gradient(180deg, #f6f9f7 0%, #eef3f0 100%);
  min-height: 100vh;
}

/* The stock login sat under a 100px bottom margin and a top border, which
   pushed the card low and left a stray line across the page. */
.login.container {
  margin-bottom: 40px !important;
  border-top: 0 !important;
  padding-top: 24px;
}

/* The card: a real edge and a soft shadow instead of Bootstrap's flat
   .shadow, which at 1000px wide read as a grey slab. */
.login .mw-1000 {
  max-width: 460px !important;
  background: #fff;
  border: 1px solid var(--pug-line);
  border-radius: 16px !important;
  box-shadow: 0 10px 34px rgba(16, 32, 42, .08) !important;
  overflow: hidden;
}

/* 50px of padding on every side is generous on a laptop and cramped on a
   phone, because it leaves barely 250px for the form itself. */
.login .p-50 { padding: 34px 32px !important; }

.login .headline .fs-25 { font-size: 22px !important; color: var(--pug-ink); }
.login .text-uppercase  { letter-spacing: .6px; color: var(--pug-muted) !important; }

/* Fields you can actually hit, and that do not make iOS zoom. */
.login .form-control {
  height: 48px !important;
  font-size: 16px !important;
  border-radius: 10px !important;
  border: 1px solid #d8dee3 !important;
  padding-left: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login .form-control:focus {
  border-color: var(--pug-green) !important;
  box-shadow: 0 0 0 3px rgba(18, 140, 74, .14) !important;
}

.login .btn-primary,
.login button[type="submit"],
.login input[type="submit"] {
  background: var(--pug-green) !important;
  border-color: var(--pug-green) !important;
  height: 48px;
  border-radius: 10px !important;
  font-weight: 600;
  letter-spacing: .2px;
  width: 100%;
  transition: background-color .15s ease, transform .12s ease;
}
.login .btn-primary:hover { background: var(--pug-green-700) !important; }
.login .btn-primary:active { transform: translateY(1px); }

.login a { color: var(--pug-green); text-decoration: none; }
.login a:hover { text-decoration: underline; }

/* reCAPTCHA is 304px wide and overflowed the card on small phones. */
.g-recaptcha { transform-origin: 0 0; max-width: 100%; overflow: hidden; }

/* ---------------------------------------------------------------
   Shared public polish
   --------------------------------------------------------------- */

.btn-primary { background: var(--pug-green); border-color: var(--pug-green); }
.text-primary { color: var(--pug-green) !important; }

.card, .item.b-r-30, .item.b-r-40 {
  border: 1px solid var(--pug-line);
  box-shadow: none;
  transition: box-shadow .18s ease, transform .18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .item.b-r-30:hover,
  .item.b-r-40:hover {
    box-shadow: 0 6px 22px rgba(16,32,42,.07);
    transform: translateY(-2px);
  }
}

/* ---------------------------------------------------------------
   Phones — the login page is opened on one far more often than not
   --------------------------------------------------------------- */

@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100%; }

  .login.container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    margin-bottom: 24px !important;
  }
  .login .mw-1000 { max-width: 100% !important; border-radius: 14px !important; }
  .login .p-50 { padding: 24px 18px !important; }
  .login .headline .fs-25 { font-size: 20px !important; }

  /* 304px of reCAPTCHA does not fit a 360px screen once padding is taken
     off, so it is scaled down rather than allowed to clip. */
  .g-recaptcha { transform: scale(.88); }

  .container, .container-fluid {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* The theme's big marketing spacing on a handset. */
  .p-50 { padding: 22px !important; }
  .p-40 { padding: 20px !important; }
  .my-5 { margin-top: 20px !important; margin-bottom: 20px !important; }

  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  img { max-width: 100%; height: auto; }
}

@media (max-width: 400px) {
  .login .p-50 { padding: 20px 14px !important; }
  .g-recaptcha { transform: scale(.80); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
