/* Aakram Login 1.1.0 — login page surface.
 * Loaded only on the authentication page.
 * Layout is pure CSS: no JavaScript sizing, no transforms, no page-wide rules. */

/* ---------- host page ---------------------------------------------------- */

body.aalg-on .page-header,
body.aalg-on #main > h1,
body.aalg-on .page-title,
body.aalg-on .page-heading { display: none; }

/* The classic theme caps #content at 640px for customer pages, which would
   squeeze this two-column surface into a narrow strip. Only on this page. */
body.aalg-on #content.page-content,
body.aalg-on #content.card,
body.aalg-on .page-content.card {
  max-width: none;
  width: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

body.aalg-on #main,
body.aalg-on #content-wrapper {
  max-width: none;
  width: auto;
}

body.aalg-on .no-account { display: none; }
body.aalg-on #main { padding-top: 0; }

/* An empty native card can be left behind once the form is moved out. */
body.aalg-on .card-block:empty,
body.aalg-on section.login-form:empty { display: none; }

/* ---------- tokens and shell -------------------------------------------- */

.aalg {
  --aalg-radius: 18px;
  --aalg-gap: 0px;
  --aalg-pad: 48px;
  --aalg-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 52px rgba(18, 41, 48, .085);

  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  width: 100%;
  max-width: 1160px;
  margin: 8px auto 48px;
  background: var(--aalg-surface);
  border: 1px solid var(--aalg-border);
  border-radius: var(--aalg-radius);
  box-shadow: var(--aalg-shadow);
  overflow: hidden;
  color: var(--aalg-text);
  box-sizing: border-box;
}

.aalg *,
.aalg *::before,
.aalg *::after { box-sizing: border-box; }

.aalg-left,
.aalg-right {
  min-width: 0;
  padding: var(--aalg-pad);
}

.aalg-left { background: var(--aalg-surface); }

.aalg-right {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 60%),
    var(--aalg-panel);
  border-left: 1px solid var(--aalg-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- left column head -------------------------------------------- */

.aalg-head { text-align: center; margin-bottom: 26px; }

.aalg-kicker {
  margin: 0 0 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--aalg-accent);
}

.aalg-title {
  margin: 0 0 9px;
  font-size: 35px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--aalg-accent);
}

.aalg-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--aalg-muted);
}

.aalg-alert {
  max-width: 420px;
  margin: 0 auto 20px;
  padding: 12px 15px;
  border: 1px solid #f3c7c2;
  border-left: 3px solid #b42318;
  border-radius: 10px;
  background: #fdf3f2;
  color: #912018;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

/* "You already have an account, sign in once with your password" is guidance,
   not an error, so it must not look like a failure. */
.aalg-alert--info {
  border-color: rgba(11, 138, 163, .3);
  border-left-color: var(--aalg-accent);
  background: var(--aalg-panel);
  color: var(--aalg-text);
}

/* ---------- the native PrestaShop form ----------------------------------- */

.aalg-form-slot { max-width: 420px; margin: 0 auto; }

.aalg-form-slot .form-group,
.aalg-form-slot .form-group.row { display: block; margin: 0 0 16px; }

.aalg-form-slot [class*="col-md-"],
.aalg-form-slot [class*="col-sm-"],
.aalg-form-slot [class*="col-lg-"] {
  width: 100%;
  max-width: none;
  flex: none;
  padding-left: 0;
  padding-right: 0;
}

.aalg-form-slot label,
.aalg-form-slot .form-control-label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--aalg-text);
}

.aalg-form-slot input[type="text"],
.aalg-form-slot input[type="email"],
.aalg-form-slot input[type="password"],
.aalg-form-slot input.form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--aalg-border);
  border-radius: 10px;
  background: var(--aalg-surface);
  color: var(--aalg-text);
  /* 16px, so iOS Safari does not zoom the page when the field is tapped. */
  font-size: 16px;
  line-height: 46px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.aalg-form-slot input:focus,
.aalg-form-slot input.form-control:focus {
  outline: 0;
  border-color: var(--aalg-accent);
  box-shadow: 0 0 0 3px rgba(11, 138, 163, .12);
}

.aalg-form-slot .input-group { display: flex; width: 100%; align-items: stretch; }

.aalg-form-slot .input-group-append,
.aalg-form-slot .input-group-btn { display: flex; width: auto; }

.aalg-form-slot .input-group input,
.aalg-form-slot .input-group input.form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
}

/* "Show" next to the password field: part of the input, not a grey slab.
   The last selector matches the classic theme's own high-specificity rule
   (.input-group .input-group-btn > .btn[data-action="show-password"]) so this
   wins on specificity instead of with !important. */
.aalg-form-slot .input-group-append button,
.aalg-form-slot .input-group-btn button,
.aalg-form-slot [data-action="show-password"],
.aalg-form-slot .input-group .input-group-btn > .btn[data-action="show-password"] {
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--aalg-border);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: var(--aalg-surface);
  color: var(--aalg-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.aalg-form-slot .input-group-append button:hover,
.aalg-form-slot .input-group-btn button:hover,
.aalg-form-slot [data-action="show-password"]:hover,
.aalg-form-slot .input-group .input-group-btn > .btn[data-action="show-password"]:hover {
  background: var(--aalg-panel);
  color: var(--aalg-accent);
}

.aalg-form-slot .forgot-password {
  margin: -2px 0 20px;
  padding: 0;
  border: 0;
  text-align: center;
  font-size: 13px;
}

.aalg-form-slot .forgot-password::before,
.aalg-form-slot .forgot-password::after { content: none; }

.aalg-form-slot .forgot-password a {
  color: var(--aalg-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.aalg-form-slot .forgot-password a:hover { color: var(--aalg-accent); }

.aalg-form-slot .form-footer { margin: 0; padding: 0; text-align: center; }

.aalg-form-slot .form-footer button,
.aalg-form-slot [data-link-action="sign-in"],
.aalg-form-slot .form-footer .btn-primary {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--aalg-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11, 138, 163, .22);
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
}

.aalg-form-slot .form-footer button:hover,
.aalg-form-slot [data-link-action="sign-in"]:hover { background: var(--aalg-accent-hover); }

.aalg-form-slot .form-footer button:active,
.aalg-form-slot [data-link-action="sign-in"]:active { transform: translateY(1px); }

/* ---------- captcha ------------------------------------------------------ */

.aalg-captcha {
  display: flex;
  justify-content: center;
  margin: 0 auto 18px;
  max-width: 420px;
  min-height: 0;
}

.aalg-captcha.is-ready { min-height: 78px; }

.aalg-captcha > div { max-width: 100%; }

/* ---------- social ------------------------------------------------------- */

.aalg-social { display: none; max-width: 420px; margin: 22px auto 0; }
.aalg-social.is-ready { display: block; }

.aalg-divider {
  position: relative;
  margin: 0 0 16px;
  text-align: center;
}

.aalg-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--aalg-border);
}

.aalg-divider span {
  position: relative;
  padding: 0 12px;
  background: var(--aalg-surface);
  font-size: 12px;
  color: var(--aalg-muted);
}

.aalg-social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aalg-social-grid.is-single { grid-template-columns: 1fr; }

.aalg-sbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--aalg-border);
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, opacity .15s ease;
}

.aalg-sbtn:hover { border-color: #c6ced3; box-shadow: 0 1px 4px rgba(16, 24, 40, .08); }
.aalg-sbtn[disabled] { opacity: .55; cursor: default; }

.aalg-facebook { background: #1877F2; border-color: #1877F2; color: #fff; }
.aalg-facebook:hover { background: #1568d8; border-color: #1568d8; }

.aalg-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

.aalg-mark-g { background: #fff; border: 1px solid #e3e8ec; color: #4285F4; }
.aalg-mark-f { background: #fff; color: #1877F2; }

/* ---------- right panel -------------------------------------------------- */

.aalg-right-inner { text-align: center; }

.aalg-right-inner .aalg-kicker { margin-bottom: 12px; font-size: 13px; }

.aalg-right-inner h2,
.aalg-right-inner .aalg-edit-title {
  margin: 0 0 10px;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--aalg-text);
}

.aalg-right-inner p { margin: 0 0 22px; font-size: 14px; line-height: 1.55; color: var(--aalg-muted); }

.aalg-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 220px;
  height: 52px;
  padding: 0 24px;
  border-radius: 11px;
  background: var(--aalg-create-bg, var(--aalg-text));
  color: var(--aalg-create-fg, #fff) !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(11, 138, 163, .22);
  transition: filter .15s ease, transform .06s ease, box-shadow .15s ease;
}

.aalg-create:hover { filter: brightness(.93); box-shadow: 0 10px 24px rgba(11, 138, 163, .3); }
.aalg-create:active { transform: translateY(1px); box-shadow: 0 5px 14px rgba(11, 138, 163, .24); }

.aalg-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.aalg-right-inner .aalg-benefits li { list-style: none; }

.aalg-benefit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 13px;
  border: 1px solid var(--aalg-border);
  border-radius: 13px;
  background: var(--aalg-surface);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.aalg-benefit:hover {
  border-color: rgba(11, 138, 163, .4);
  box-shadow: 0 6px 18px rgba(18, 41, 48, .07);
  transform: translateY(-1px);
}

.aalg-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--aalg-panel);
  box-shadow: 0 0 0 1px rgba(11, 138, 163, .16) inset;
  color: var(--aalg-accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.aalg-benefit strong { display: block; font-size: 13px; font-weight: 600; color: var(--aalg-text); }
.aalg-benefit small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--aalg-muted); }

.aalg-business {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px dashed rgba(11, 138, 163, .35);
  border-radius: 13px;
  background: rgba(255, 255, 255, .5);
  text-align: center;
}

.aalg-business strong { display: block; font-size: 13px; color: var(--aalg-accent); }
.aalg-business span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--aalg-muted); }

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 991px) {
  .aalg {
    grid-template-columns: minmax(0, 1fr);
    margin: 4px auto 32px;
    --aalg-pad: 30px;
  }
  .aalg-right { border-left: 0; border-top: 1px solid var(--aalg-border); }
  .aalg-title { font-size: 29px; }
}

@media (max-width: 575px) {
  .aalg {
    --aalg-pad: 22px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .aalg-title { font-size: 25px; }
  .aalg-benefits { grid-template-columns: 1fr; }
  .aalg-social-grid { grid-template-columns: 1fr; }
  .aalg-create { width: 100%; min-width: 0; }
  /* reCAPTCHA's iframe is a fixed 304px; shrink it rather than let it overflow. */
  .aalg-captcha { transform-origin: top center; }
}

@media (max-width: 349px) {
  .aalg-captcha { transform: scale(.88); margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .aalg * { transition: none !important; }
}
