/* KING CENTER | Dedicated Login Page - does not change other screens. */
:root {
  --kc-gold: #f0b84c;
  --kc-red: #dd0b13;
  --kc-white: #f7f7f7;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.kc-login-page {
  --kc-viewport-height: 100vh;
  margin: 0;
  min-height: 100vh;
  color: var(--kc-white);
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  background: #090a0c;
}

@supports (height: 100dvh) {
  body.kc-login-page { --kc-viewport-height: 100dvh; }
}

.kc-login-page button,
.kc-login-page select,
.kc-login-page input { font: inherit; }

/* LTR grid keeps the workshop on the LEFT and login panel on the RIGHT. */
.kc-login-layout {
  direction: ltr;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  min-height: var(--kc-viewport-height);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 83% 25%, #343034 0%, transparent 42%), #07080a;
}

.kc-workshop-visual {
  position: relative;
  min-height: 100%;
  background: url("../img/king-login/workshop-scene.webp") center center / cover no-repeat;
}

.kc-workshop-visual::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 9%;
  background: linear-gradient(90deg, transparent, #08090bcf);
  pointer-events: none;
}

.kc-login-section {
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vh, 26px) 4.5% clamp(8px, 2vh, 26px) 0;
}

.kc-login-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .16;
  pointer-events: none;
  background-image: radial-gradient(#bdbdbd .65px, transparent .65px);
  background-size: 7px 7px;
  mask-image: linear-gradient(90deg, transparent, #000);
}

.kc-login-panel {
  direction: rtl;
  width: min(100%, 635px);
  min-width: 0;
  min-height: min(790px, calc(var(--kc-viewport-height) - 52px));
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 clamp(22px, 3.2vw, 60px) clamp(24px, 14vh, 143px);
  overflow: hidden;
  isolation: isolate;
  border: 2px solid #e1a551;
  border-radius: 55px;
  background:
    radial-gradient(ellipse at 2% 1%, #4b2f20 0%, transparent 43%),
    radial-gradient(ellipse at 92% 84%, #271016 0%, transparent 39%),
    linear-gradient(140deg, #19181a, #111214 55%, #101010);
  box-shadow:
    inset 0 0 0 1px #ffd77f41,
    inset 0 15px 20px #f5ba3511,
    0 0 28px #f0ab4720,
    0 28px 80px #000000ad;
}

.kc-login-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, #ffe4a3 50%, transparent 95%);
  box-shadow: 0 0 18px 5px #e9b85a9c;
  pointer-events: none;
}

.kc-login-panel::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 165px;
  height: 270px;
  transform: skewX(-33deg);
  background: linear-gradient(90deg, #740006, #eb0015 55%, #54000a 56%, #b9000e);
  opacity: .75;
  z-index: -1;
  pointer-events: none;
}

.kc-brand-logo {
  width: calc(100% + 42px);
  max-width: none;
  height: clamp(64px, 25vh, 294px);
  flex: none;
  align-self: center;
  object-fit: contain;
  margin: -4px -21px 3px;
  mix-blend-mode: screen;
  user-select: none;
}

.kc-login-title {
  margin: 0;
  padding: clamp(4px, 1.2vh, 11px) 8px;
  font-size: clamp(23px, 2vw, 29px);
  line-height: 1.3;
  font-weight: 750;
  text-align: center;
  background: linear-gradient(90deg, transparent, #7400088f 23%, #970009bd 50%, #7400088f 77%, transparent);
  border-bottom: 1px solid #a3181a;
  box-shadow: 0 7px 12px -10px #ff4533;
}

.kc-login-subtitle {
  margin: clamp(4px, 1vh, 10px) 0 clamp(8px, 2vh, 23px);
  text-align: center;
  color: #e1cbb3;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.5;
}

.kc-login-error {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  padding: 10px 13px;
  border: 1px solid #ef5661;
  border-radius: 12px;
  color: #ffe2e2;
  background: #65141c;
  font-size: 14px;
  line-height: 1.6;
}
.kc-login-error svg { width: 21px; height: 21px; flex: none; }

.kc-login-form {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vh, 20px);
  position: relative;
  z-index: 1;
}

.kc-field {
  direction: ltr;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: clamp(44px, 7.5vh, 66px);
  padding: 0 19px;
  border: 1.5px solid #a3a3a6;
  border-radius: 23px;
  background: linear-gradient(115deg, #1b1c1e 0%, #2a2a2d 75%, #242427);
  box-shadow: inset 0 2px 4px #0007, 0 1px 1px #fff2;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.kc-field:focus-within {
  border-color: #ffc66b;
  box-shadow: 0 0 0 3px #d39c3833, 0 0 20px #a36c1b38;
}

.kc-field-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  color: #fff;
}

.kc-field-divider {
  height: 36px;
  width: 1px;
  flex: 0 0 1px;
  margin: 0 18px;
  background: #5c5a60;
}

.kc-field .kc-input {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  font-size: 19px;
  text-align: right;
  direction: rtl;
  caret-color: #ffc66b;
}
.kc-field .kc-input::placeholder { color: #ededed; opacity: .95; }

.kc-field .kc-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-inline: 0 4px;
  text-overflow: ellipsis;
}
.kc-field .kc-select option {
  background: #202024;
  color: #fff;
}
.kc-select-arrow {
  width: 21px;
  height: 21px;
  margin-left: 8px;
  color: #f0b84c;
  flex: 0 0 auto;
  pointer-events: none;
}

.kc-password-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.kc-password-toggle:hover { color: var(--kc-gold); background: #ffffff13; }
.kc-password-toggle svg { width: 27px; height: 27px; }
.kc-password-toggle .kc-eye-shown { display: none; }
.kc-password-toggle[aria-pressed="true"] .kc-eye-hidden { display: none; }
.kc-password-toggle[aria-pressed="true"] .kc-eye-shown { display: block; }

.kc-login-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: clamp(44px, 9vh, 78px);
  margin-top: clamp(0px, 1vh, 14px);
  padding: 8px 16px;
  border: 1.5px solid #e6a648;
  border-radius: 23px;
  color: #fff;
  background: linear-gradient(180deg, #fa272c 0%, #d40a11 39%, #a10008 73%, #790006 100%);
  box-shadow: inset 0 1px 0 #ff8b8d9e, 0 0 23px #d12a2d2b, 0 5px 8px #0006;
  text-shadow: 0 2px 2px #600008;
  font-size: 29px;
  font-weight: 750;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}
.kc-login-button svg { width: 34px; height: 34px; }
.kc-login-button:hover { color: #fff; filter: brightness(1.17); transform: translateY(-1px); }
.kc-login-button:active { transform: translateY(1px); }
.kc-login-button:focus-visible, .kc-password-toggle:focus-visible {
  outline: 3px solid #ffd77f;
  outline-offset: 4px;
}

.kc-gold-oil-wave {
  position: absolute;
  inset: auto 0 0;
  height: clamp(20px, 12vh, 130px);
  background: url("../img/king-login/gold-oil-wave.webp") center bottom / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 2;
}

.kc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

@media (max-width: 1150px) {
  .kc-login-layout { grid-template-columns: 49% 51%; }
  .kc-login-panel { padding-inline: clamp(20px, 3vw, 38px); border-radius: 42px; }
  .kc-login-section { padding: clamp(8px, 2vh, 24px); }
  .kc-field .kc-input { font-size: 17px; }
}

@media (max-width: 800px) {
  .kc-login-layout { display: block; }
  .kc-workshop-visual {
    position: absolute;
    inset: 0;
    background-position: 35% center;
    opacity: .32;
  }
  .kc-workshop-visual::after {
    inset: 0;
    width: auto;
    background: #0009;
  }
  .kc-login-section { min-height: var(--kc-viewport-height); padding: clamp(8px, 2vh, 30px) 16px; }
  .kc-login-panel { max-width: 570px; min-height: 0; padding-inline: clamp(20px, 6vw, 48px); }
}

@media (max-width: 480px) {
  .kc-login-section { padding: clamp(8px, 2vh, 18px) 10px; }
  .kc-login-panel {
    padding: 0 22px clamp(24px, 14vh, 115px);
    border-radius: 29px;
  }
  .kc-brand-logo { width: calc(100% + 20px); margin: 0 -10px 3px; }
  .kc-login-title { font-size: clamp(18px, 5.5vw, 23px); }
  .kc-login-subtitle { font-size: 12px; }
  .kc-field { padding-inline: 12px; border-radius: 17px; }
  .kc-field-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .kc-field-divider { margin: 0 12px; height: 28px; }
  .kc-field .kc-input { font-size: 16px; }
  .kc-login-button { font-size: 23px; border-radius: 18px; }
  .kc-login-button svg { width: 29px; height: 29px; }
}

/* Short laptops and landscape phones need space for the form before decoration. */
@media (max-height: 600px) {
  .kc-login-panel { min-height: 0; padding-bottom: 22px; border-radius: 24px; }
  .kc-brand-logo { height: clamp(48px, 18vh, 108px); margin-block: 0; }
  .kc-login-title { font-size: 20px; padding-block: 4px; }
  .kc-login-subtitle { margin: 4px 0 8px; font-size: 12px; }
  .kc-login-form { gap: 8px; }
  .kc-field { height: 44px; border-radius: 14px; }
  .kc-login-button { min-height: 44px; margin-top: 0; font-size: 22px; border-radius: 14px; }
  .kc-login-button svg { width: 26px; height: 26px; }
  .kc-login-error { margin-bottom: 8px; padding: 6px 10px; font-size: 12px; }
  .kc-gold-oil-wave { height: 18px; }
}

@media (max-height: 380px) {
  .kc-login-panel { padding-bottom: 10px; }
  .kc-brand-logo { height: 40px; }
  .kc-login-title { font-size: 18px; }
  .kc-login-subtitle { margin-block: 2px 6px; }
  .kc-gold-oil-wave { display: none; }
}

@media (max-width: 340px) {
  .kc-login-panel { padding-inline: 14px; }
  .kc-field { padding-inline: 8px; }
  .kc-field-divider { margin-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .kc-login-page *,
  .kc-login-page *::before,
  .kc-login-page *::after { transition: none !important; }
}
