/**
 * MachForm admin login page theme: Vibrant.
 * Picked from the admin theme setting. Loaded after login-base.css on the login-style pages, and by
 * includes/header.php on the admin pages for the page background and #main frame (css/admin/admin-base.css).
 */
:root {
  /* shared with the admin pages: the page, the #main frame (the sign-in card has the same) and the footer */
  --page-bg: #eceef2;
  --card-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16), 0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.10); /* the 1px ring edges the card all round without taking room */
  --card-border: none; /* login card and #main frame */
  --main-fill: #ffffff; /* #main background of the matching admin theme, and the sign-in card's */
  --main-inset: 5px; /* added to #main's padding (css/admin/admin-base.css) */
  --muted: rgba(15, 23, 42, 0.6); /* the footer's text */
  --accent: #2563eb; /* the admin footer's link */

  /* the sign-in pages only */
  --panel: #333333; /* the admin header's colour: #header in css/themes/theme_vibrant.css */
  --panel-line: #ffc83d; /* the yellow under the admin header's current item */

  --text: #0f172a;
  --heading: #111111;
  --page-text: rgba(15, 23, 42, 0.68); /* the footer line on the page */
  --label: rgba(15, 23, 42, 0.6);
  --placeholder: rgba(15, 23, 42, 0.45);

  --chip: rgba(15, 23, 42, 0.05);
  --divider: rgba(15, 23, 42, 0.14);
  --field: #ffffff;
  --field-border: #858b81; /* the admin inputs' edge (--mf-panel-control-edge, css/main.css) */
  --autofill-bg: #ffffff;

  --link: #3661a1; /* the admin's link blue (--mf-action-blue-*, css/builder.css) */
  --link-hover: #2a4f88;
  --focus: #3661a1;

  --btn-bg: #4d7b15; /* bb_green (css/bb_buttons.css): its colour and shadow */
  --btn-bg-hover: #3f6511; /* darker than bb_green's hover, so the words keep 4.5:1 */
  --btn-text: #ffffff;
  --btn-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .132), 0 .3px .9px 0 rgba(0, 0, 0, .108);

  --sso-bg: #ffffff;
  --sso-bg-hover: #f3f4f6;

  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #b91c1c;

  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #15803d;

  --strength-weak: #dc2626;
  --strength-fair: #c2410c;
  --strength-good: #a16207;
  --strength-strong: #15803d;

  --qr-bg: #ffffff;

  --icon-email: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-opacity='0.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
  --icon-user:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-opacity='0.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  --icon-lock:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-opacity='0.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --icon-key:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-opacity='0.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='4.5'/%3E%3Cpath d='M10.7 12.3L21 2'/%3E%3Cpath d='M16 7l3 3'/%3E%3Cpath d='M19 4l2 2'/%3E%3C/svg%3E");
  --icon-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-opacity='0.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

:root:has(body.mf-login) {
  color-scheme: light;
}

/* keep autofilled fields on-theme instead of the browser's yellow/blue */
body.mf-login input:-webkit-autofill,
body.mf-login input:-webkit-autofill:hover,
body.mf-login input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--autofill-bg) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}
body.mf-login input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--autofill-bg) inset, 0 0 0 1px var(--focus);
}
