/*!
 * my.lab — σύνδεση (design: Claude Design «mylab-login»)
 *
 * Ανοιχτό φόντο με το «my.lab», ροζ υγρό από κάτω (.ml-auth-liq, το επίπεδό
 * του το κινεί το js/mylab-login.js), κεφαλίδα με λογότυπο και «Νέος πελάτης;
 * Ζητήστε προσφορά», και στη μέση η λευκή κάρτα. Ίδια για σύνδεση, «Ξέχασα
 * τον κωδικό», ορισμό κωδικού και «Ελέγξτε το email σας»
 * (includes/woo-account.php → wl_mylab_login_open / wl_mylab_login_close).
 * Tokens από το css/style.css.
 */

@keyframes mlDot {
  0%, 80%, 100% { transform: scale(.45); opacity: .5; }
  40% { transform: scale(1); opacity: 1; }
}
@keyframes mlPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
/* Ανίχνευση αυτόματης συμπλήρωσης του browser (js/mylab-login.js, animationstart) */
@keyframes mlAutofill {
  from { opacity: 1; }
  to { opacity: 1; }
}

.ml-auth {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
.ml-auth a {
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms;
}
.ml-auth a:hover {
  color: var(--pink);
}

/* ---------- Στρώματα: «my.lab» στο φόντο, υγρό, σταγόνες ---------- */
.ml-auth-word,
.ml-auth-liq,
.ml-auth-drops {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.ml-auth-word span,
.ml-auth-liq > span {
  position: absolute;
  left: 50%;
  bottom: -0.12em;
  transform: translateX(-50%);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(120px, 21vw, 380px);
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--surface-2);
}
.ml-auth-liq {
  background: var(--pink);
  clip-path: polygon(0% 100%, 100% 100%, 100% 76%, 0% 76%);
}
.ml-auth-liq > span {
  color: #fff;
  opacity: 0.22;
}
.ml-auth-bubs {
  position: absolute;
  inset: 0;
}
.ml-auth-bubs span,
.ml-auth-drops span {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  will-change: transform;
}
.ml-auth-drops {
  z-index: 1;
}
.ml-auth-drops span {
  background: var(--pink);
}

/* ---------- Κεφαλίδα ---------- */
.ml-auth-top {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 4vw, 56px);
  pointer-events: none;
}
.ml-auth-logo,
.ml-auth-cta {
  pointer-events: auto;
}
.ml-auth-logo {
  display: inline-flex;
}
.ml-auth-logo img {
  display: block;
  width: auto;
  height: clamp(32px, 3vw, 42px);
}
.ml-auth .ml-auth-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  transition: background 200ms, color 200ms;
}
.ml-auth .ml-auth-cta:hover,
.ml-auth .ml-auth-cta:focus-visible {
  background: var(--pink);
  color: #fff;
}
.ml-auth-live {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  transition: background 200ms;
}
.ml-auth-cta:hover .ml-auth-live,
.ml-auth-cta:focus-visible .ml-auth-live {
  background: #fff;
}

/* ---------- Η κάρτα ---------- */
.ml-auth-stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(100px, 14vh, 120px) clamp(16px, 4vw, 56px) 64px;
  pointer-events: none;
}
.ml-auth-wrap {
  width: 100%;
  max-width: 460px;
}
.ml-auth-card {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--card-border), 0 40px 90px -40px rgba(31, 30, 27, 0.35);
  will-change: transform;
}
.ml-auth-h {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: pretty; /* όχι balance: καθυστερεί το πρώτο paint σε lang="el" (βλ. style.css) */
  color: var(--ink);
}
.ml-auth-h .dot {
  color: var(--pink);
}
.ml-auth-lead {
  margin: -4px 0 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted-2);
  text-wrap: pretty;
}

/* Μηνύματα: «Αποσυνδεθήκατε.» (ροζ κουκκίδα) και λάθη (ροζ «!») */
.ml-auth-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--pink-tint-border);
  border-radius: 14px;
  background: var(--pink-tint);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
.ml-auth-msg::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
}
.ml-auth-msg.is-error {
  color: var(--error);
}
.ml-auth-msg.is-error::before {
  content: "!";
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.ml-auth .ml-auth-msg a {
  color: inherit;
  text-decoration: underline;
}

/* ---------- Φόρμα ---------- */
.ml-auth-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ml-auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ml-auth-field > label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-2);
}
.ml-auth-field input[type="text"],
.ml-auth-field input[type="email"],
.ml-auth-field input[type="password"] {
  width: 100%;
  height: 58px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  outline: none;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}
.ml-auth-field input:focus {
  border-color: var(--pink);
  background: #fff;
  box-shadow: 0 0 0 4px var(--pink-tint);
}
.ml-auth-field input::placeholder {
  color: #b5b2aa;
}
.ml-auth-field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px var(--bg) inset;
  -webkit-text-fill-color: var(--ink);
  animation-name: mlAutofill;
}

/* Κωδικός: κουκκίδες αντί για χαρακτήρες (.ml-auth-pdots) και «μάτι» */
.ml-auth-pass {
  position: relative;
  display: block;
}
.ml-auth-field .ml-auth-pass input {
  padding-right: 60px;
}
.ml-auth-field .ml-auth-pass input.is-masked {
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--ink);
  letter-spacing: 9px;
}
.ml-auth-pdots {
  position: absolute;
  left: 20px;
  right: 60px;
  top: 0;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  pointer-events: none;
}
.ml-auth-pdots[hidden] {
  display: none;
}
.ml-auth-pdots span {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--pink);
  border-radius: 50%;
  background: var(--pink);
  animation: mlPop 320ms cubic-bezier(0.34, 1.5, 0.64, 1);
}
.ml-auth-pdots span:nth-child(3n) {
  background: transparent;
}
.ml-auth-eye {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.ml-auth-eye:hover,
.ml-auth-eye:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}
.ml-auth-eye:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 1px;
}
.ml-auth-eye svg {
  display: block;
}
.ml-auth-eye .off {
  display: none;
}
.ml-auth-eye[aria-pressed="true"] .off {
  display: inline;
}
/* Χωρίς JS το «μάτι» δεν κάνει τίποτα */
.ml-auth:not(.is-ready) .ml-auth-eye {
  display: none;
}

/* Μετρητής ισχύος του Woo (ορισμός κωδικού) */
.ml-auth .woocommerce-password-strength {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.ml-auth .woocommerce-password-strength.short,
.ml-auth .woocommerce-password-strength.bad {
  background: var(--pink-tint);
  color: var(--error);
}
.ml-auth .woocommerce-password-strength.strong {
  background: var(--ink);
  color: #fff;
}
.ml-auth .woocommerce-password-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted-2);
}

/* «Να με θυμάσαι» (διακόπτης) και «Ξέχασα τον κωδικό» στην ίδια γραμμή */
.ml-auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
}
.ml-auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.ml-auth-switch {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 42px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: var(--border);
  background-image: radial-gradient(circle, #fff 8.4px, rgba(255, 255, 255, 0) 9.4px);
  background-repeat: no-repeat;
  background-size: 18px 18px;
  background-position: 3px 3px;
  cursor: pointer;
  transition: background-color 200ms, background-position 380ms cubic-bezier(0.34, 1.5, 0.64, 1);
}
.ml-auth-switch:checked {
  background-color: var(--pink);
  background-position: 21px 3px;
}
.ml-auth-switch:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* ---------- Κουμπί: ροζ χάπι που «γεμίζει» μαύρο στο hover (.ml-auth-fill) ---------- */
.ml-auth .ml-auth-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 62px;
  margin-top: 4px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease-press), opacity 200ms;
}
.ml-auth .ml-auth-btn:hover {
  color: #fff;
}
.ml-auth-btn:active {
  transform: scale(0.97);
}
.ml-auth-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.ml-auth-btn:disabled,
.ml-auth-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ml-auth-btn:disabled:active,
.ml-auth-btn.disabled:active {
  transform: none;
}
/* Χωρίς JS (χωρίς κύμα): απλό σκούρο hover */
.ml-auth:not(.is-ready) .ml-auth-btn:hover {
  background: var(--ink);
}
.ml-auth-fill {
  position: absolute;
  inset: 0;
  background: var(--ink);
  clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
  pointer-events: none;
}
.ml-auth-btn-t {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ml-auth-dots {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.ml-auth-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: mlDot 1s infinite ease-in-out;
}
.ml-auth-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.ml-auth-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
.ml-auth-form.is-loading .ml-auth-dots {
  display: flex;
}
.ml-auth-form.is-loading .ml-auth-btn-t {
  visibility: hidden;
}

/* ---------- Κάτω γραμμή: «← weblab.gr» και «Βοήθεια: info@…» ---------- */
.ml-auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--surface-2);
  font-size: 14px;
}
.ml-auth-back {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 160ms, gap 200ms;
}
.ml-auth-back:hover {
  gap: 10px;
}

/* ---------- Κινητό: η κεφαλίδα σε μία γραμμή ---------- */
@media (max-width: 560px) {
  .ml-auth-cta-q {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ml-auth-pdots span,
  .ml-auth-dots span {
    animation: none;
  }
}
