/*
 * eko-world-loginfix.v4.css - sign-in form (/login.html, /ekoloko/login.html), phone and desktop.
 * Owner report 2026-10-07: on a phone the username and password fields came out unequal and squeezed.
 * Root cause: each field was one flex row (input + "remember me" label), and the longer label text squeezed the input.
 *
 * Phones and short landscape (max-width 600px, or max-height 500px up to 1100px wide): the leaf picture is dropped (it cannot
 * hold a stacked form); the form is one flat leaf-green panel, each field a column: label, then the input at full width,
 * then its "remember me" row. Both inputs: same width, height 48px, padding, 17px text, radius, dark leaf-green fill with
 * white text, as the Flash login fields. Eye button 44x44 at the visual left (RTL: inline-end). Every target >= 44px.
 * Wider screens keep the leaf layout; only the tap sizes and the "remember me" wording are set here.
 * Loaded after eko-world-loginpage.v20.css and eko-world-entry-polish.
 */
@font-face { font-family: 'EkoSpacerBold'; src: url('fonts/spacer-bold-v1.woff') format('woff'); font-display: swap; unicode-range: U+0590-05FF; }
@font-face { font-family: 'EkoSpacer'; src: url('fonts/spacer-v1.woff') format('woff'); font-display: swap; unicode-range: U+0590-05FF; }

/* the "remember me" wording says what it remembers (aria-labels already did) */
#eko-world-login label[for="eko-world-remember-user"] > span, #eko-world-login label[for="eko-world-remember"] > span { display: none !important; }
#eko-world-login label[for="eko-world-remember-user"]::after { content: "זכור שם משתמש"; }
#eko-world-login label[for="eko-world-remember"]::after { content: "השאר אותי מחובר"; }

@media (min-width: 601px) and (min-height: 501px), (min-width: 1101px) {
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login label.eko-world-remember { display: inline-flex !important; align-items: center !important; min-height: 44px !important; gap: 6px; white-space: nowrap; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login label.eko-world-remember input[type="checkbox"] { width: 24px !important; height: 24px !important; margin: 0 !important; flex: none; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-reveal { min-width: 44px !important; min-height: 44px !important; }
}

@media (max-width: 600px), (max-height: 500px) and (max-width: 1100px) {
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card:has(#eko-world-login) .eko-auth-view { background: none !important; }
  /* v5 (owner request 2026-10-08): the phone keeps the ORIGINAL leaf. It used to
     be dropped here for a flat green panel; now the leaf is drawn behind the
     stacked form (the same orig/leaf-big.webp as the desktop), so the phone
     reads as the original login, 1:1. */
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card:has(#eko-world-login) .eko-world-form::before {
    display: block !important; content: '' !important; position: absolute !important; inset: 0 !important; z-index: 0 !important;
    aspect-ratio: auto !important; background: url('orig/leaf-big.webp') center / 100% 100% no-repeat !important; pointer-events: none;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card:has(#eko-world-login) .eko-world-form::after { display: none !important; background: none !important; content: none !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login {
    position: relative !important; display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 14px !important;
    box-sizing: border-box !important; width: min(390px, calc(100% - 16px)) !important; height: auto !important; min-height: 0 !important; aspect-ratio: auto !important;
    margin: 10px auto 0 !important; padding: 52px 42px 44px !important; background: transparent !important; border-radius: 0 !important; direction: rtl;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login > * { position: relative !important; z-index: 1 !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-field {
    position: static !important; display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "label" "input" "rem" !important; grid-auto-flow: row !important; justify-content: stretch !important; gap: 6px !important;
    width: auto !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; transform: none !important;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-field > label:not(.eko-world-remember) {
    position: static !important; width: auto !important; margin: 0 !important; padding: 0 !important; text-align: start !important;
    font: 22px/1.2 'EkoSpacerBold', Arial, sans-serif !important; color: #fff !important; text-shadow: 0 1px 0 rgba(0, 0, 0, .25) !important;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-field > label:not(.eko-world-remember) { grid-area: label !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-field > input, #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-field > .eko-world-password { grid-area: input !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-field > label.eko-world-remember { grid-area: rem !important; justify-self: start !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-password { position: relative !important; display: block !important; width: 100% !important; margin: 0 !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login input#eko-world-username,
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login input#eko-world-password {
    position: static !important; display: block !important; box-sizing: border-box !important; width: 100% !important; min-width: 0 !important; height: 48px !important; min-height: 48px !important; max-height: 48px !important;
    margin: 0 !important; padding: 0 14px !important; border: 0 !important; border-radius: 10px !important; background: #4a6a1a !important; color: #fff !important;
    font: 17px/48px Arial, sans-serif !important; text-align: start !important; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25) !important; direction: rtl;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login input#eko-world-password { padding-inline: 14px 52px !important; padding-right: 14px !important; padding-left: 52px !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login input#eko-world-username:focus-visible,
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login input#eko-world-password:focus-visible { outline: 3px solid #fff !important; outline-offset: 2px !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-reveal {
    position: absolute !important; inset-block: 2px !important; inset-inline-end: 2px !important; inset-inline-start: auto !important; left: 2px !important; right: auto !important;
    width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; margin: 0 !important; padding: 0 !important; transform: none !important;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login label.eko-world-remember {
    position: static !important; display: flex !important; align-items: center !important; gap: 10px !important; width: auto !important; min-height: 44px !important; margin: 0 !important; padding: 0 !important;
    font: 17px/1.2 'EkoSpacer', Arial, sans-serif !important; color: #fff !important; white-space: nowrap;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login label.eko-world-remember input[type="checkbox"] {
    position: static !important; width: 26px !important; height: 26px !important; min-width: 26px !important; margin: 0 !important; flex: none !important; accent-color: #4a6a1a;
  }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login > button[type="submit"] { align-self: center !important; position: static !important; margin: 6px auto 0 !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-forgot { position: static !important; margin: 4px 0 0 !important; color: #fff !important; text-align: center; font-size: 16px !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login .eko-world-forgot a { display: inline-flex !important; align-items: center !important; min-height: 44px !important; color: #fff2b8 !important; }
}

/* v3: padding, submit spacing and the parrot (their rules out-ranked v2 on these three) */
@media (max-width: 600px), (max-height: 500px) and (max-width: 1100px) {
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card form#eko-world-login.eko-world-form { padding: 52px 42px 44px !important; gap: 14px !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card form#eko-world-login.eko-world-form > button.eko-world-slab[type="submit"] { margin: 8px auto 0 !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card form#eko-world-login.eko-world-form > .eko-auth-error:not([hidden]) { margin: 0 !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card:has(#eko-world-login) .eko-world-tuki { display: none !important; }
}

/* v4: the "remember me" boxes read as boxes: dark leaf-green fill, white rim, white tick when set (phones) */
@media (max-width: 600px), (max-height: 500px) and (max-width: 1100px) {
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login label.eko-world-remember input[type="checkbox"] { -webkit-appearance: none !important; appearance: none !important; border: 2px solid #fff !important; border-radius: 6px !important; background: #4a6a1a no-repeat center / 18px 18px !important; box-shadow: inset 0 2px 3px rgba(0,0,0,.25) !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login label.eko-world-remember input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") !important; }
  #eko-player-auth[data-auth-state="signed_out"] #eko-auth-card #eko-world-login label.eko-world-remember input[type="checkbox"]:focus-visible { outline: 3px solid #fff !important; outline-offset: 2px !important; }
}
