/* Distriktsläkare Login — wp-login redesign v1.3.5 */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;600;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap");

body.dl-login-redesign {
  --dl-login-blue-50: #eef7fc;
  --dl-login-blue-100: #d6edf9;
  --dl-login-blue-500: #2ea8d4;
  --dl-login-blue-600: #1a96c4;
  --dl-login-blue-700: #157fa8;
  --dl-login-text: #1a2b3c;
  --dl-login-muted: #5a6d7d;
  --dl-login-border: #d8e6ef;
  --dl-login-radius-lg: 20px;
  --dl-login-shadow-lg: 0 12px 40px rgba(26, 43, 60, 0.12);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--dl-login-text);
  background: linear-gradient(180deg, var(--dl-login-blue-50) 0%, #fff 280px) !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 !important;
}

body.dl-login-redesign a {
  color: var(--dl-login-blue-600);
}

body.dl-login-redesign a:hover {
  color: var(--dl-login-blue-700);
}

/* Site header */
body.dl-login-redesign .dl-login-site-header {
  background: var(--dl-login-blue-500);
  color: #fff;
  width: 100%;
}

body.dl-login-redesign .dl-login-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
}

body.dl-login-redesign .dl-login-logo {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
}

body.dl-login-redesign .dl-login-logo:hover {
  opacity: 0.92;
  color: #fff !important;
}

/* Main layout */
body.dl-login-redesign .dl-login-page {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

body.dl-login-redesign #login {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: minmax(320px, 420px);
  justify-content: center;
  align-items: start;
}

body.dl-login-redesign #login > h1 {
  display: none !important;
}

body.dl-login-redesign .dl-login-form-panel {
  position: static;
}

body.dl-login-redesign .dl-login-form-card {
  background: #fff;
  border: 1px solid var(--dl-login-border);
  border-radius: var(--dl-login-radius-lg);
  box-shadow: var(--dl-login-shadow-lg);
  padding: 1.75rem;
}

body.dl-login-redesign .dl-login-form-title {
  margin: 0 0 1.5rem;
  font-family: "DM Sans", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--dl-login-text);
  text-align: center;
}

body.dl-login-redesign #loginform,
body.dl-login-redesign #lostpasswordform,
body.dl-login-redesign #resetpassform {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

body.dl-login-redesign #loginform p,
body.dl-login-redesign #lostpasswordform p,
body.dl-login-redesign #resetpassform p {
  margin-bottom: 1rem;
}

/* Field labels — same pattern as bli-medlem */
body.dl-login-redesign .dl-login-form-card label[for="user_login"],
body.dl-login-redesign .dl-login-form-card label[for="user_pass"],
body.dl-login-redesign .dl-login-form-card label[for="pass1"],
body.dl-login-redesign .dl-login-form-card label[for="pass2"] {
  display: block;
  margin: 0 0 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dl-login-text);
}

body.dl-login-redesign #loginform .user-pass-wrap,
body.dl-login-redesign #resetpassform .user-pass-wrap {
  margin-bottom: 0;
}

body.dl-login-redesign #loginform .wp-pwd,
body.dl-login-redesign #resetpassform .wp-pwd {
  display: grid;
  align-items: center;
}

/* Hide BuddyBoss in-field icons — bli-medlem uses labels above fields */
body.dl-login-redesign .dl-login-form-card label[for="user_login"]::before,
body.dl-login-redesign .dl-login-form-card label[for="user_pass"]::before,
body.dl-login-redesign .dl-login-form-card .wp-pwd::before {
  display: none !important;
  content: none !important;
}

body.dl-login-redesign #loginform input[type="text"],
body.dl-login-redesign #loginform input[type="password"],
body.dl-login-redesign #loginform input[type="email"],
body.dl-login-redesign #lostpasswordform input[type="text"],
body.dl-login-redesign #resetpassform input[type="password"] {
  width: 100%;
  margin-top: 0;
  border: 1.5px solid var(--dl-login-border) !important;
  border-radius: 8px !important;
  padding: 0.75rem 0.875rem !important;
  font-size: 0.9375rem !important;
  font-family: inherit;
  background: #fff !important;
  color: var(--dl-login-text) !important;
  box-shadow: none !important;
}

body.dl-login-redesign #loginform input[type="password"],
body.dl-login-redesign #loginform input#user_pass,
body.dl-login-redesign #resetpassform input[type="password"] {
  padding-right: 2.75rem !important;
}

body.dl-login-redesign #loginform .wp-pwd > input,
body.dl-login-redesign #loginform .wp-pwd > .button.wp-hide-pw,
body.dl-login-redesign #resetpassform .wp-pwd > input,
body.dl-login-redesign #resetpassform .wp-pwd > .button.wp-hide-pw {
  grid-area: 1 / 1;
}

body.login.dl-login-redesign #loginform .user-pass-wrap .label-switch,
body.dl-login-redesign .dl-login-form-card .label-switch {
  display: none !important;
}

body.login.dl-login-redesign #loginform .user-pass-wrap .wp-pwd .button.wp-hide-pw,
body.login.dl-login-redesign #resetpassform .user-pass-wrap .wp-pwd .button.wp-hide-pw {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  justify-self: end;
  align-self: center;
  z-index: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 0.375rem 0 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  line-height: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.login.dl-login-redesign #loginform .user-pass-wrap .wp-pwd .wp-hide-pw .dashicons,
body.login.dl-login-redesign #resetpassform .user-pass-wrap .wp-pwd .wp-hide-pw .dashicons {
  position: static !important;
  top: auto !important;
  left: auto !important;
  margin: 0 !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  font-size: 20px !important;
  line-height: 1 !important;
  opacity: 0.5;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-family: dashicons !important;
}

body.login.dl-login-redesign #loginform .user-pass-wrap .wp-pwd .wp-hide-pw .dashicons::before,
body.login.dl-login-redesign #resetpassform .user-pass-wrap .wp-pwd .wp-hide-pw .dashicons::before {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  font-size: 20px !important;
  line-height: 1.25rem !important;
  font-family: dashicons !important;
  display: block !important;
  margin: 0 !important;
}

body.login.dl-login-redesign #loginform .user-pass-wrap .wp-pwd .dashicons-visibility::before,
body.login.dl-login-redesign #resetpassform .user-pass-wrap .wp-pwd .dashicons-visibility::before {
  content: "\f177" !important;
}

body.login.dl-login-redesign #loginform .user-pass-wrap .wp-pwd .dashicons-hidden::before,
body.login.dl-login-redesign #resetpassform .user-pass-wrap .wp-pwd .dashicons-hidden::before {
  content: "\f530" !important;
}

body.dl-login-redesign #loginform input:focus,
body.dl-login-redesign #lostpasswordform input:focus,
body.dl-login-redesign #resetpassform input:focus {
  border-color: var(--dl-login-blue-500) !important;
  box-shadow: 0 0 0 3px rgba(46, 168, 212, 0.15) !important;
  outline: none;
}

body.dl-login-redesign #loginform .dl-login-remember-zone {
  display: flex;
  align-items: center;
  min-height: calc(2.75rem - 5px);
  margin: -5px 0 0;
  padding: 0;
}

body.login.dl-login-redesign #loginform p.forgetmenot {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  float: none !important;
  font-size: 0.875rem !important;
  line-height: 1.2 !important;
  vertical-align: baseline !important;
  overflow: visible;
}

body.login.dl-login-redesign #loginform .forgetmenot label {
  display: inline !important;
  margin: 0 !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  color: var(--dl-login-muted) !important;
  cursor: pointer;
}

body.login.dl-login-redesign #loginform span.checkbox,
body.login.dl-login-redesign #loginform .forgetmenot span.checkbox {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  float: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.login.dl-login-redesign #loginform .forgetmenot input[type="checkbox"],
body.login.bb-login.dl-login-redesign #loginform .forgetmenot input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  border: 1.5px solid var(--dl-login-blue-500);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  opacity: 1 !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
  float: none !important;
  z-index: auto !important;
}

body.login.dl-login-redesign #loginform .forgetmenot input[type="checkbox"]::before,
body.login.bb-login.dl-login-redesign #loginform .forgetmenot input[type="checkbox"]::before {
  content: none !important;
  display: none !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
}

body.dl-login-redesign #loginform .forgetmenot input[type="checkbox"]:checked {
  background-color: var(--dl-login-blue-500);
  border-color: var(--dl-login-blue-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.4 11 12.5 5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

body.login.dl-login-redesign .dl-login-form-card p.dl-login-forgot-password,
body.login.dl-login-redesign .dl-login-form-card p.lostmenot.dl-login-forgot-password {
  display: block !important;
  float: none !important;
  clear: both;
  margin: 1rem 0 0 !important;
  padding: 0 !important;
  text-align: center;
  font-size: 0.875rem;
  color: var(--dl-login-muted);
  visibility: visible !important;
  opacity: 1 !important;
}

body.login.dl-login-redesign .dl-login-form-card p.dl-login-forgot-password a,
body.login.dl-login-redesign .dl-login-form-card p.lostmenot.dl-login-forgot-password a {
  font-weight: 500;
  color: var(--dl-login-blue-600);
}

/* Submit — match .dl-bm-btn-primary from bli-medlem */
body.dl-login-redesign .dl-login-form-card p.submit,
body.dl-login-redesign .dl-login-form-card .submit,
body.dl-login-redesign #loginform p.submit {
  margin: 0 !important;
  padding: 0;
  text-align: center;
}

body.dl-login-redesign #lostpasswordform p.submit,
body.dl-login-redesign #resetpassform p.submit {
  margin-top: 1.5rem !important;
}

body.dl-login-redesign .dl-login-form-card .button.button-primary,
body.dl-login-redesign .dl-login-form-card .button.button-primary.button-large,
body.dl-login-redesign .dl-login-form-card input#wp-submit,
body.dl-login-redesign .dl-login-form-card #loginform #wp-submit,
body.dl-login-redesign .dl-login-form-card #lostpasswordform #wp-submit,
body.dl-login-redesign .dl-login-form-card #resetpassform #wp-submit {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  float: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0.875rem 1.5rem !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: #fff !important;
  background: var(--dl-login-blue-500) !important;
  background-color: var(--dl-login-blue-500) !important;
  border: none !important;
  border-color: transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

body.dl-login-redesign .dl-login-form-card .button.button-primary:hover,
body.dl-login-redesign .dl-login-form-card .button.button-primary:focus,
body.dl-login-redesign .dl-login-form-card input#wp-submit:hover,
body.dl-login-redesign .dl-login-form-card input#wp-submit:focus {
  color: #fff !important;
  background: var(--dl-login-blue-600) !important;
  background-color: var(--dl-login-blue-600) !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body.dl-login-redesign #login .message,
body.dl-login-redesign #login #login_error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  border-radius: 8px;
  border-left-width: 3px;
  box-shadow: none;
}

body.dl-login-redesign #login #login_error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

body.dl-login-redesign .dl-login-form-card #nav {
  display: none;
}

body.dl-login-redesign #nav,
body.dl-login-redesign #backtoblog {
  margin: 1rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--dl-login-muted);
  text-align: center;
}

body.dl-login-redesign #nav a,
body.dl-login-redesign #backtoblog a {
  font-weight: 500;
}

body.dl-login-redesign .dl-login-form-footer {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--dl-login-muted);
}

body.dl-login-redesign .privacy-policy-page-link,
body.dl-login-redesign .language-switcher {
  display: none !important;
}

body.dl-login-redesign.dl-login-lostpassword .dl-login-form-card .message {
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--dl-login-muted);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.dl-login-redesign #backtoblog {
  display: none !important;
}

body.dl-login-redesign.dl-login-lostpassword .dl-login-form-title {
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  body.dl-login-redesign #login {
    grid-template-columns: 1fr;
  }

  body.dl-login-redesign .dl-login-page {
    padding: 1.5rem 1rem 3rem;
  }

  body.dl-login-redesign .dl-login-form-card {
    padding: 1.25rem;
  }
}
