:root {
  --yvt-login-blue: #f26308;
  --yvt-login-ink: #3c1b06;
  --yvt-login-soft: #8f6d58;
}

body.login {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  box-sizing: border-box;
  overflow-x: hidden;
  color: var(--yvt-login-ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 115, 25,.22), transparent 34rem),
    radial-gradient(circle at 88% 86%, rgba(242, 99, 8,.18), transparent 38rem),
    linear-gradient(145deg,#fffbf8,#fff1e8);
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body.login::before,
body.login::after {
  content: "";
  position: fixed;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(242, 99, 8,.07);
  border-radius: 50%;
  pointer-events: none;
}

body.login::before { top: -230px; left: -180px; box-shadow: 0 0 0 64px rgba(242, 99, 8,.025),0 0 0 128px rgba(242, 99, 8,.018); }
body.login::after { right: -260px; bottom: -250px; box-shadow: 0 0 0 64px rgba(255, 115, 25,.025),0 0 0 128px rgba(255, 115, 25,.018); }

#login {
  width: min(calc(100% - 32px), 430px);
  margin: 0 auto;
  padding: 0 0 14px;
  flex: 0 0 auto;
}

.login h1 a {
  width: 260px;
  height: 72px;
  margin-bottom: 24px;
  background-image: url("../images/brand/yourdelivery-logo-2026.webp");
  background-position: center;
  background-size: contain;
}

.login form {
  margin-top: 0;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 28px;
  background: linear-gradient(145deg,rgba(255,255,255,.9),rgba(255, 235, 222,.72));
  box-shadow: inset 0 1px 0 #fff,0 32px 70px rgba(158, 79, 29,.17);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}

.login label { color: var(--yvt-login-ink); font-weight: 700; }

.login input[type="text"],
.login input[type="password"] {
  min-height: 52px;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(178, 87, 29,.2);
  border-radius: 14px;
  color: var(--yvt-login-ink);
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 #fff;
}

/* Keep the native password control and its visibility action on one baseline. */
.login .wp-pwd {
  position: relative;
  margin-top: 8px;
}

.login .wp-pwd input#user_pass {
  width: 100%;
  margin-top: 0;
  padding-right: 54px;
  box-sizing: border-box;
}

.login .wp-pwd .wp-hide-pw {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 11px;
  color: #e46717;
  background: transparent;
  box-shadow: none;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.login .wp-pwd .wp-hide-pw:hover,
.login .wp-pwd .wp-hide-pw:focus {
  color: #c04f06;
  background: rgba(242, 99, 8,.08);
  box-shadow: inset 0 0 0 1px rgba(242, 99, 8,.11);
}

.login .wp-pwd .wp-hide-pw:focus-visible {
  outline: 2px solid rgba(242, 99, 8,.48);
  outline-offset: 2px;
}

.login .wp-pwd .wp-hide-pw .dashicons {
  width: 20px;
  height: 20px;
  margin: 0;
  font-size: 20px;
  line-height: 20px;
}

/* Align the checkbox label and help action as one compact control group. */
.login form .forgetmenot {
  display: flex;
  float: left;
  align-items: center;
  min-height: 46px;
  margin: 0;
}

.login form .forgetmenot input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  border-color: rgba(178, 87, 29,.28);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.login form .forgetmenot label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  line-height: 1.2;
}

.login form .forgetmenot .wp-tooltip {
  display: inline-flex;
  align-items: center;
  margin-left: 3px;
}

.login form .forgetmenot .wp-tooltip__toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #8d6d59;
  background: transparent;
  box-shadow: none;
}

.login form .forgetmenot .wp-tooltip__toggle:hover,
.login form .forgetmenot .wp-tooltip__toggle:focus {
  color: #f26308;
  background: rgba(242, 99, 8,.08);
}

.login form .forgetmenot .wp-tooltip__toggle .dashicons {
  width: 17px;
  height: 17px;
  margin: 0;
  font-size: 17px;
  line-height: 17px;
}

.login input:focus {
  border-color: rgba(242, 99, 8,.58);
  box-shadow: 0 0 0 4px rgba(242, 99, 8,.1);
}

.wp-core-ui .button-primary {
  min-height: 46px;
  padding: 6px 20px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg,#ff6e11,var(--yvt-login-blue) 52%,#c85206);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35),0 14px 28px rgba(242, 99, 8,.22);
  font-weight: 700;
}

.login #backtoblog a,
.login #nav a,
.login .privacy-policy-page-link a { color: var(--yvt-login-soft); }

.login .message,
.login .notice {
  border: 1px solid rgba(178, 87, 29,.16);
  border-left: 4px solid var(--yvt-login-blue);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 30px rgba(158, 79, 29,.1);
}

/* Keep WordPress' native language form functional while matching the login shell. */
.login .language-switcher {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 32px), 430px);
  margin: 8px auto 0;
  padding: 0;
  text-align: left;
}

.login #language-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label label"
    "select button";
  gap: 9px 10px;
  width: 100%;
  padding: 17px 18px;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 20px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.84),rgba(255, 235, 222,.66));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    0 18px 42px rgba(158, 79, 29,.12);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}

.login #language-switcher label {
  grid-area: label;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--yvt-login-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .04em;
}

.login #language-switcher label .dashicons {
  width: 17px;
  height: 17px;
  margin: 0;
  color: var(--yvt-login-blue);
  font-size: 17px;
  line-height: 17px;
}

.login #language-switcher-locales {
  grid-area: select;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(178, 87, 29,.18);
  border-radius: 12px;
  color: var(--yvt-login-ink);
  background-color: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
  font-weight: 650;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

/* Enhanced language picker: the native select stays in the form as the
   submitted value, while the visible list can match the glass UI. */
.login .yvt-language-combobox {
  position: relative;
  grid-area: select;
  min-width: 0;
}

.login .yvt-language-combobox #language-switcher-locales {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.login .yvt-language-trigger {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 44px 0 14px;
  border: 1px solid rgba(178, 87, 29,.2);
  border-radius: 12px;
  color: var(--yvt-login-ink);
  background: linear-gradient(145deg,rgba(255,255,255,.94),rgba(255, 244, 237,.82));
  box-shadow: inset 0 1px 0 #fff,0 6px 16px rgba(160, 78, 25,.07);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.login .yvt-language-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  transform: translateY(-68%) rotate(45deg);
  border-right: 2px solid #764c31;
  border-bottom: 2px solid #764c31;
  transition: transform .2s ease, border-color .2s ease;
}

.login .yvt-language-combobox.is-open .yvt-language-trigger {
  border-color: rgba(242, 99, 8,.56);
  background: rgba(255,255,255,.98);
  box-shadow: 0 0 0 4px rgba(242, 99, 8,.1),inset 0 1px 0 #fff;
}

.login .yvt-language-combobox.is-open .yvt-language-trigger::after {
  transform: translateY(-26%) rotate(225deg);
  border-color: #f26308;
}

.login .yvt-language-list {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 14px;
  background: rgba(255, 248, 244,.94);
  box-shadow: inset 0 1px 0 #fff,0 18px 44px rgba(136, 65, 20,.2);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(.985);
  transform-origin: bottom center;
  transition: opacity .16s ease, transform .2s cubic-bezier(.2,.8,.2,1), visibility .16s ease;
}

.login .yvt-language-combobox.is-open .yvt-language-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.login .yvt-language-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 11px;
  border: 0;
  border-radius: 10px;
  color: #613417;
  background: transparent;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.login .yvt-language-option:hover,
.login .yvt-language-option:focus-visible {
  color: #c04f06;
  background: rgba(242, 99, 8,.09);
  outline: 0;
  transform: translateX(2px);
}

.login .yvt-language-option[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg,#ff7218,#f26308 58%,#cf5507);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32),0 7px 16px rgba(242, 99, 8,.18);
}

.login #language-switcher-locales:hover {
  border-color: rgba(242, 99, 8,.38);
  background-color: rgba(255,255,255,.94);
}

.login #language-switcher-locales:focus {
  border-color: rgba(242, 99, 8,.58);
  box-shadow: 0 0 0 4px rgba(242, 99, 8,.1), inset 0 1px 0 #fff;
}

.login .language-switcher .button {
  grid-area: button;
  min-width: 78px;
  min-height: 44px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid rgba(242, 99, 8,.16);
  border-radius: 12px;
  color: #c75207;
  background: linear-gradient(145deg,rgba(255,255,255,.94),rgba(255, 233, 219,.86));
  box-shadow: inset 0 1px 0 #fff,0 8px 20px rgba(242, 99, 8,.12);
  font-weight: 750;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.login .language-switcher .button:hover,
.login .language-switcher .button:focus {
  transform: translateY(-1px);
  border-color: rgba(242, 99, 8,.34);
  color: #b64b06;
  box-shadow: inset 0 1px 0 #fff,0 12px 24px rgba(242, 99, 8,.18);
}

.login .language-switcher .button:active {
  transform: translateY(0) scale(.98);
}

@media (max-width: 520px) {
  body.login { padding: 22px 12px; }
  #login,
  .login .language-switcher { width: min(100%,430px); }
  .login form { padding: 26px 22px; border-radius: 23px; }
  .login #language-switcher { padding: 15px; border-radius: 18px; }
}

@media (max-width: 400px) {
  .login #language-switcher {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "select"
      "button";
  }

  .login .language-switcher .button {
    display: block;
    width: 100%;
    margin: 0;
  }

  .login .yvt-language-combobox { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .login #language-switcher-locales,
  .login .language-switcher .button,
  .login .yvt-language-trigger,
  .login .yvt-language-list,
  .login .yvt-language-option { transition: none; }
}
