/* Jackson Digital Managed Login (2.0.0, from Branded Login 1.1.0)
   Restyles the standard WordPress login markup. Colours, gradient, corner radius and logo sizes arrive as custom
   properties from the client configuration / settings. Only loaded on administrative sign-in requests. */

@font-face { font-family: 'JDML Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url('fonts/archivo-latin-wdth-normal.woff2') format('woff2'); }
@font-face { font-family: 'JDML DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url('fonts/dm-sans-latin-opsz-normal.woff2') format('woff2'); }
@font-face { font-family: 'JDML Jakarta'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2'); }

body.jdml {
  --jdml-body: 'JDML DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --jdml-display: 'JDML Archivo', 'JDML DM Sans', system-ui, sans-serif;
  --jdml-field: color-mix(in srgb, var(--jdml-c-text) 7%, var(--jdml-c-bg));
  --jdml-line: color-mix(in srgb, var(--jdml-c-text) 30%, var(--jdml-c-bg));
  --jdml-mute: color-mix(in srgb, var(--jdml-c-text) 70%, var(--jdml-c-bg));
  --jdml-ring: color-mix(in srgb, var(--jdml-c-accent) 40%, transparent);
  --jdml-r: var(--jdml-radius, 8px); --jdml-r-sm: min(var(--jdml-radius, 8px), 6px);
  height: auto; min-height: 100vh; margin: 0; color: var(--jdml-c-text);
  background: linear-gradient(var(--jdml-c-angle, 160deg), var(--jdml-c-bg), var(--jdml-c-bg-2, var(--jdml-c-bg))) fixed, var(--jdml-c-bg);
  font-family: var(--jdml-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
html:has(body.jdml) { background: var(--jdml-c-bg-2, var(--jdml-c-bg)); }
body.jdml *, body.jdml *::before, body.jdml *::after { box-sizing: border-box; }

/* 1. Client panel: logo, heading, form */
.jdml #login { width: 100%; max-width: 464px; margin: 0 auto; padding: 44px 32px 36px; }
.jdml #login h1 { margin: 0; text-align: left; }
.jdml #login h1 a {
  display: block; width: min(var(--jdml-c-logo-w, 220px), 100%); height: auto; aspect-ratio: var(--jdml-c-logo-ratio, 5 / 2); margin: 0 0 30px; padding: 0;
  background: var(--jdml-c-logo) left center / contain no-repeat; overflow: hidden; text-indent: -9999px; border-radius: 4px; box-shadow: none; outline: 0;
}
.jdml.jdml-no-logo #login h1 a { width: auto; aspect-ratio: auto; background: none; overflow: visible; text-indent: 0; color: var(--jdml-c-text);
  font: 700 28px/1.15 var(--jdml-display); letter-spacing: -0.01em; text-decoration: none; }
.jdml #login h1 a:focus-visible { outline: 2px solid var(--jdml-c-accent); outline-offset: 6px; }

.jdml .jdml-heading { margin: 0; color: var(--jdml-c-text); font: 600 clamp(30px, 2.6vw, 38px)/1.1 var(--jdml-display); letter-spacing: -0.02em; }
.jdml .jdml-sub { margin: 10px 0 0; color: var(--jdml-mute); font-size: 16px; }

.jdml #login form { margin: 26px 0 0; padding: 0; overflow: visible; background: none; border: 0; box-shadow: none; font-weight: 400; }
.jdml #login form p { margin: 0; }
.jdml #login label { display: inline-block; margin: 0 0 7px; color: var(--jdml-c-text); font-size: 14px; font-weight: 500; line-height: 1.4; }
.jdml #login .description, .jdml #login .indicator-hint, .jdml #login form p.description { color: var(--jdml-mute); font-size: 14px; }

.jdml #login input[type="text"], .jdml #login input[type="password"], .jdml #login input[type="email"], .jdml #login input[type="tel"],
.jdml #login input[type="number"], .jdml #login input[type="url"], .jdml #login select, .jdml #login textarea {
  width: 100%; min-height: 50px; margin: 0 0 18px; padding: 10px 14px; background: var(--jdml-field); color: var(--jdml-c-text); caret-color: var(--jdml-c-accent);
  border: 1px solid var(--jdml-line); border-radius: var(--jdml-r); box-shadow: none; font: 400 16px/1.4 var(--jdml-body); letter-spacing: 0; transition: border-color 120ms ease, box-shadow 120ms ease;
}
.jdml #login input:focus, .jdml #login select:focus, .jdml #login textarea:focus { border-color: var(--jdml-c-accent); box-shadow: 0 0 0 3px var(--jdml-ring); outline: 2px solid transparent; }
.jdml #login input::placeholder { color: var(--jdml-mute); opacity: 1; }
/* Browser and password-manager autofill keeps the panel's colours instead of a pale yellow or white box. */
.jdml #login input:-webkit-autofill, .jdml #login input:-webkit-autofill:hover, .jdml #login input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--jdml-c-text); caret-color: var(--jdml-c-accent); -webkit-box-shadow: 0 0 0 1000px var(--jdml-field) inset; transition: background-color 9999s ease-out 0s;
}
.jdml #login input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px var(--jdml-field) inset, 0 0 0 3px var(--jdml-ring); }

/* Password field and its show/hide button */
.jdml #login .wp-pwd { position: relative; }
.jdml #login .wp-pwd input[type="password"], .jdml #login .wp-pwd input[type="text"] { padding-right: 54px; }
.jdml #login .button.wp-hide-pw { position: absolute; top: 0; right: 0; width: 50px; height: 50px; min-height: 50px; margin: 0; padding: 0; display: grid; place-items: center;
  background: none; border: 0; border-radius: 0 var(--jdml-r) var(--jdml-r) 0; box-shadow: none; color: var(--jdml-mute); }
.jdml #login .button.wp-hide-pw:hover { color: var(--jdml-c-text); background: none; }
.jdml #login .button.wp-hide-pw:focus-visible { color: var(--jdml-c-text); outline: 2px solid var(--jdml-c-accent); outline-offset: -4px; box-shadow: none; }
.jdml #login .button.wp-hide-pw .dashicons { position: static; width: 20px; height: 20px; font-size: 20px; color: inherit; }

/* Remember Me */
.jdml #login .forgetmenot { float: none; display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.jdml #login .forgetmenot label { margin: 0; color: var(--jdml-mute); font-weight: 400; font-size: 15px; }
.jdml #login input[type="checkbox"] { -webkit-appearance: none; appearance: none; display: inline-grid; place-content: center; flex: none; width: 22px; height: 22px; min-width: 22px; margin: 0;
  background: var(--jdml-field); border: 1px solid var(--jdml-line); border-radius: var(--jdml-r-sm); box-shadow: none; cursor: pointer; }
.jdml #login input[type="checkbox"]:checked { background: var(--jdml-c-btn); border-color: var(--jdml-c-btn); }
.jdml #login input[type="checkbox"]:checked::before { content: ""; position: static; float: none; display: block; width: 6px; height: 11px; margin: -2px 0 0;
  border: solid var(--jdml-c-btn-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.jdml #login input[type="checkbox"]:focus-visible { border-color: var(--jdml-c-accent); box-shadow: 0 0 0 3px var(--jdml-ring); outline: 2px solid transparent; }

/* Buttons */
.jdml #login p.submit, .jdml #login .submit { float: none; margin: 0; }
.jdml #login .button { min-height: 44px; padding: 8px 18px; background: transparent; color: var(--jdml-c-text); border: 1px solid var(--jdml-line); border-radius: var(--jdml-r); box-shadow: none; text-shadow: none;
  font: 600 15px/1.3 var(--jdml-body); cursor: pointer; transition: filter 120ms ease, border-color 120ms ease; }
.jdml #login .button:hover { border-color: var(--jdml-c-text); }
.jdml #login .button-primary { float: none; display: block; width: 100%; min-height: 50px; margin: 0; background: var(--jdml-c-btn); border-color: var(--jdml-c-btn); color: var(--jdml-c-btn-text); font-size: 16px; }
.jdml #login .button-primary:hover { filter: brightness(1.1); border-color: var(--jdml-c-btn); }
.jdml #login .button:focus-visible { outline: 2px solid var(--jdml-c-text); outline-offset: 3px; box-shadow: none; }
.jdml #login .button[disabled], .jdml #login .button.disabled { opacity: 0.55; cursor: default; }

/* Messages: errors, notices, confirmations */
.jdml #login .message, .jdml #login .notice, .jdml #login #login_error, .jdml #login .success {
  margin: 22px 0 0; padding: 13px 16px; background: color-mix(in srgb, var(--jdml-c-accent) 12%, var(--jdml-c-bg)); color: var(--jdml-c-text);
  border: 0; border-left: 3px solid var(--jdml-c-accent); border-radius: var(--jdml-r-sm); box-shadow: none; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere;
}
.jdml #login .notice p, .jdml #login .message p { margin: 0; font-size: inherit; }
.jdml #login #login_error, .jdml #login .notice-error { background: color-mix(in srgb, #E5484D 16%, var(--jdml-c-bg)); border-left-color: #F2777B; }
.jdml #login .success, .jdml #login .notice-success { background: color-mix(in srgb, #3DBE7B 14%, var(--jdml-c-bg)); border-left-color: #55C98C; }
.jdml #login .message a, .jdml #login .notice a, .jdml #login #login_error a { color: var(--jdml-c-text); text-decoration: underline; text-underline-offset: 3px; }
.jdml #login .jdml-intro + .message, .jdml #login .jdml-intro + .notice, .jdml #login .jdml-intro + #login_error { margin-top: 22px; }

/* Links under the form */
.jdml #login #nav, .jdml #login #backtoblog { margin: 18px 0 0; padding: 0; color: var(--jdml-mute); font-size: 15px; text-align: left; }
.jdml #login #backtoblog { margin-top: 10px; }
.jdml #login #nav a, .jdml #login #backtoblog a, .jdml .privacy-policy-page-link a { color: var(--jdml-mute); text-decoration: underline; text-decoration-color: var(--jdml-line); text-underline-offset: 4px; transition: color 120ms ease; }
.jdml #login #nav a { color: var(--jdml-c-link, var(--jdml-c-accent)); text-decoration-color: color-mix(in srgb, var(--jdml-c-link, var(--jdml-c-accent)) 45%, transparent); }
.jdml #login #nav a:hover, .jdml #login #backtoblog a:hover, .jdml .privacy-policy-page-link a:hover { color: var(--jdml-c-text); }
.jdml #login a:focus-visible, .jdml .privacy-policy-page-link a:focus-visible { outline: 2px solid var(--jdml-c-accent); outline-offset: 3px; border-radius: 2px; box-shadow: none; }
.jdml .privacy-policy-page-link { width: auto; margin: 22px 0 0; text-align: left; font-size: 14px; }

/* Password reset and language switcher */
.jdml #login #pass-strength-result { margin: -8px 0 16px; border-radius: var(--jdml-r-sm); color: #1d2327; font-size: 14px; }
.jdml #login .indicator-hint { margin: 0 0 20px; }
.jdml #login .reset-pass-submit { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.jdml #login .reset-pass-submit .button { flex: 1 1 160px; width: auto; min-height: 50px; margin: 0; }
.jdml #login .pw-weak { margin: 0 0 16px; }
.jdml .language-switcher { width: 100%; max-width: 464px; margin: 0 auto; padding: 0 32px 32px; text-align: left; }
.jdml .language-switcher form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jdml .language-switcher label { color: var(--jdml-mute); }
.jdml .language-switcher select { min-height: 40px; background-color: var(--jdml-field); color: var(--jdml-c-text); border: 1px solid var(--jdml-line); border-radius: var(--jdml-r); }
.jdml .language-switcher .button { min-height: 40px; margin: 0; background: transparent; color: var(--jdml-c-text); border: 1px solid var(--jdml-line); border-radius: var(--jdml-r); }

/* 2. Agency panel */
.jdml-agency { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding: 30px 32px 28px;
  background: linear-gradient(165deg, var(--jdml-a-1), var(--jdml-a-2)); color: var(--jdml-a-text); font-family: var(--jdml-body); }
/* Quiet geometry: two arcs rising from the lower corner and a faint grid that fades out toward the top. */
.jdml-agency::before { content: ""; position: absolute; z-index: -1; right: -18vmax; bottom: -30vmax; width: 62vmax; height: 62vmax; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--jdml-a-text) 20%, transparent);
  background: radial-gradient(closest-side, transparent 61.8%, color-mix(in srgb, var(--jdml-a-text) 16%, transparent) 62%, transparent 62.3%), radial-gradient(closest-side, color-mix(in srgb, var(--jdml-a-text) 6%, transparent) 62%, transparent 100%); }
.jdml-agency::after { content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(color-mix(in srgb, var(--jdml-a-text) 5%, transparent) 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, color-mix(in srgb, var(--jdml-a-text) 5%, transparent) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 70%); mask-image: linear-gradient(to top, #000, transparent 70%); }
.jdml-agency p { margin: 0; }
.jdml-agency a { color: inherit; }
.jdml-agency a:focus-visible { outline: 2px solid var(--jdml-a-text); outline-offset: 5px; border-radius: 3px; }
.jdml-agency-logo { display: inline-block; }
.jdml-agency-logo img { display: block; width: min(150px, var(--jdml-a-logo-w, 190px)); max-width: 100%; height: auto; }
.jdml-agency-label { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.jdml-agency-label::before { content: ""; flex: none; width: 28px; height: 1px; background: currentColor; }
.jdml-agency-headline { margin-top: 12px !important; font: 700 24px/1.12 'JDML Jakarta', var(--jdml-body); letter-spacing: -0.025em; text-wrap: balance; }
.jdml-agency-copy { display: none; }
.jdml-agency-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.jdml-agency-support { font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.jdml-agency-support span { display: inline-block; transition: transform 160ms ease; }
.jdml-agency-support:hover span { transform: translateX(4px); }
.jdml-agency-credit { font-size: 13px; }

/* 3. Split screen from tablet-landscape up. The panel is printed after the form, then placed on the left. */
@media (min-width: 900px) {
  body.jdml:not(.interim-login) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr; grid-auto-rows: auto; }
  body.jdml:not(.interim-login) > * { grid-column: 2; }
  body.jdml:not(.interim-login) > #login { align-self: center; justify-self: center; padding: 48px 32px; }
  body.jdml:not(.interim-login) > .language-switcher { justify-self: center; }
  body.jdml > .jdml-agency { grid-column: 1; grid-row: 1 / span 12; min-height: 100vh; gap: 40px; padding: clamp(36px, 4.6vw, 72px); }
  .jdml-agency-logo img { width: var(--jdml-a-logo-w, 190px); }
  .jdml-agency-main { max-width: 560px; }
  .jdml-agency-headline { margin-top: 20px !important; font-size: clamp(34px, 3.5vw, 56px); line-height: 1.06; }
  .jdml-agency-copy { display: block; margin-top: 22px !important; max-width: 36ch; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; }
  .jdml-agency-foot { align-items: flex-end; }
}
/* Short laptop screens: tighten the vertical rhythm before anything has to scroll. */
@media (min-width: 900px) and (max-height: 760px) {
  body.jdml:not(.interim-login) > #login { padding-top: 28px; padding-bottom: 28px; }
  .jdml #login h1 a { width: min(calc(var(--jdml-c-logo-w, 220px) * 0.8), 100%); margin-bottom: 20px; }
  .jdml #login form { margin-top: 20px; }
  .jdml #login input[type="text"], .jdml #login input[type="password"], .jdml #login input[type="email"] { margin-bottom: 14px; }
  body.jdml > .jdml-agency { padding: 36px clamp(36px, 4.6vw, 72px); gap: 24px; }
  .jdml-agency-headline { font-size: clamp(30px, 3vw, 44px); }
}
@media (max-width: 899px) {
  .jdml #login h1 a { width: min(calc(var(--jdml-c-logo-w, 220px) * 0.8), 100%); margin-bottom: 24px; }
  .jdml #login { padding: 36px 24px 32px; }
  .jdml .language-switcher { padding: 0 24px 28px; }
  .jdml-agency { padding: 28px 24px 26px; }
}

/* 4. Session-expired sign-in (shown inside a small dialog over the dashboard): client colours and form only. */
.jdml.interim-login { min-height: 0; }
.jdml.interim-login #login { max-width: 400px; padding: 22px 24px 16px; }
.jdml.interim-login #login h1 a { width: min(170px, var(--jdml-c-logo-w, 220px)); margin-bottom: 16px; }
.jdml.interim-login .jdml-heading { font-size: 22px; }
.jdml.interim-login .jdml-sub { display: none; }
.jdml.interim-login #login form { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) { .jdml *, .jdml *::before, .jdml *::after { transition: none !important; } }
/* The bundled JD | Jackson Digital lockup (Brand Library, corrected alignment). Its wordmark part is drawn at the width set for the agency logo
   (0.596 of the lockup's width), so the wordmark keeps its old size and the JD and divider are added beside it. */
.jdml-agency-logo img.jdml-lockup { width: calc(min(150px, var(--jdml-a-logo-w, 190px)) * 1.678); }
@media (min-width: 900px) { .jdml-agency-logo img.jdml-lockup { width: calc(var(--jdml-a-logo-w, 190px) * 1.678); } }
