/* ================= SELLER LOGIN — Modal (PHP+JS compatible) ================= */

/* Overlay driven by ModalHub (.is-open + aria-hidden) */
.sl-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  /* NOTE: don't center by default; only when open */
  padding: 32px;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.sl-overlay.is-open[aria-hidden="false"] {
  display: grid; /* moved here */
  place-items: center; /* moved here */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Sections toggled by JS */
.hidden {
  display: none !important;
}

/* ---------- Modal shell ---------- */
.sl-overlay .modal-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(620px, 96vw);
  max-height: min(88vh, 860px);
  overflow: hidden;
  border-radius: 22px;
  color: #eafbf2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(
      1200px 700px at 20% -15%,
      rgba(16, 185, 129, 0.18),
      transparent 60%
    ),
    radial-gradient(
      1200px 900px at 120% 140%,
      rgba(14, 165, 233, 0.14),
      transparent 65%
    ),
    linear-gradient(180deg, #061a18, #071b23 40%, #07141a);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

/* ---------- Close Button (match Register Modal style) ---------- */
.sl-overlay .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  color: #9fd3e2;
  background: #0a2a30;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.sl-overlay .modal-close:hover {
  background: #0d3640;
  color: #c8f3ff;
  transform: scale(1.05);
}
.sl-overlay .modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

/* ---------- Header ---------- */
.sl-overlay .sl-head {
  padding: 22px 26px 0;
}
.sl-overlay .sl-title {
  margin: 2px 0 10px;
  text-align: center !important;
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.sl-overlay .sl-underline {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  margin: 10px 0 0;
  background: linear-gradient(
    90deg,
    rgba(45, 212, 191, 0.9),
    rgba(125, 211, 252, 0.85) 40%,
    rgba(14, 165, 233, 0.7) 70%,
    transparent
  );
}

/* ---------- Content ---------- */
.sl-overlay .sl-content {
  overflow: auto;
  overflow-x: hidden;
  padding: 18px clamp(16px, 3vw, 28px) 26px;
  scrollbar-width: thin;
  scrollbar-color: #2dd4bf rgba(255, 255, 255, 0.08);
}
.sl-overlay .sl-content::-webkit-scrollbar {
  width: 10px;
}
.sl-overlay .sl-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}
.sl-overlay .sl-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #34d399, #22c55e);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}
.sl-overlay .sl-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5eead4, #2dd4bf);
}

/* ---------- Labels ---------- */
.sl-overlay .label {
  display: block;
  margin: 2px 0 6px;
  font-weight: 700;
  font-size: 14px;
  color: #dff7f0;
}

/* ---------- Fields ---------- */
.sl-overlay .field {
  background: #f8f8f8 !important;
  border: 1px solid transparent !important;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 2px 10px;
}
.sl-overlay .field input {
  width: 100%;
  padding: 12px 6px;
  background: transparent !important;
  color: #000 !important;
  border: none !important;
  outline: none !important;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.sl-overlay .field:has(input:not(:placeholder-shown)),
.sl-overlay .field.filled {
  background: #e8f1ff !important;
}
.sl-overlay input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #e8f1ff inset !important;
  -webkit-text-fill-color: #000 !important;
}

/* ---------- Actions ---------- */
.sl-overlay .sl-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.sl-overlay .sl-actions--center {
  justify-content: center;
}

/* ---------- Generic buttons ---------- */
.sl-overlay .btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}
.sl-overlay .btn-primary {
  color: #042;
  background: #48f2bc;
}
.sl-overlay .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(72, 242, 188, 0.35);
}
.sl-overlay .btn-secondary {
  color: #eafff8;
  background: #14665a;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.sl-overlay .btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.sl-overlay .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Footer ---------- */
.sl-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.sl-sub .left,
.sl-sub .right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Register CTA */
.sl-overlay .btn-register {
  padding: 0.6em 1.4em;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background-image: linear-gradient(
    45deg,
    #ff512f 0%,
    #f09819 51%,
    #ff512f 100%
  );
  background-size: 200% auto;
  transition: background-position 0.25s, transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 0 10px -5px #f09819;
}
.sl-overlay .btn-register:hover {
  background-position: right center;
  transform: translateY(-1px);
}
.sl-overlay .btn-register:active {
  transform: scale(0.98);
}

/* ---------- OTP ---------- */
.sl-overlay .otp-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  min-height: 260px;
}
.sl-overlay .otp-title {
  margin-top: 4px;
}
.sl-overlay .otp-grid {
  display: flex;
  gap: 10px;
}
.sl-overlay .otp-box {
  width: 48px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid #134e4a;
  background: #0e1e1a;
  color: #eafbf2;
}
@media (max-width: 480px) {
  .sl-overlay .otp-box {
    width: 40px;
    height: 44px;
    font-size: 18px;
  }
}
.sl-otp-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* ---------- Success ---------- */
.sl-overlay .verified-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 20px 0;
}
.sl-overlay .tick {
  width: 86px;
  height: 86px;
}
.sl-overlay .tick svg {
  width: 100%;
  height: 100%;
}
.sl-overlay .tick .circle {
  fill: none;
  stroke: #22c55e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: slStroke 0.6s ease forwards;
}
.sl-overlay .tick .check {
  fill: none;
  stroke: #22c55e;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: slStroke 0.4s 0.4s ease forwards;
}
@keyframes slStroke {
  to {
    stroke-dashoffset: 0;
  }
}
.sl-overlay .ok-title {
  margin: 6px 0 0;
}

/* ---------- Custom buttons used by JS ---------- */
.sl-overlay .button-85 {
  padding: 0.6em 2em;
  border: 0;
  color: #fff;
  background: #000;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  user-select: none;
  font-weight: 700;
  min-width: 150px;
}
.sl-overlay .button-85:before {
  content: "";
  background: linear-gradient(
    45deg,
    #f00,
    #f70,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #f00
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glow85 20s linear infinite;
  border-radius: 10px;
}
.sl-overlay .button-85:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
  border-radius: 10px;
}
.sl-overlay .button-85[disabled] {
  opacity: 0.6;
  filter: grayscale(40%);
  cursor: not-allowed;
}
@keyframes glow85 {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.sl-overlay .button-62 {
  background: linear-gradient(135deg, #ff4d6d, #f72585);
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 2.5;
  padding: 0 1rem;
  transition: box-shadow 0.2s ease-in-out, transform 0.05s ease-in-out;
  user-select: none;
  white-space: nowrap;
  min-width: 150px;
  -webkit-tap-highlight-color: transparent;
}
.sl-overlay .button-62:not([disabled]):hover,
.sl-overlay .button-62:not([disabled]):focus {
  box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.5),
    -0.125rem -0.125rem 1rem rgba(247, 37, 133, 0.45),
    0.125rem 0.125rem 1rem rgba(255, 77, 109, 0.45);
  transform: translateY(-1px);
}
.sl-overlay .button-62[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Forgot (Amazon-like) ---------- */
.button-13 {
  background: #fff;
  border: 1px solid #d5d9d9;
  border-radius: 8px;
  box-shadow: rgba(213, 217, 217, 0.5) 0 2px 5px 0;
  color: #0f1111;
  cursor: pointer;
  display: inline-block;
  font-family: "Amazon Ember", -apple-system, system-ui, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 29px;
  padding: 0 10px 0 11px;
  text-align: center;
  user-select: none;
  vertical-align: middle;
  width: 130px;
}
.button-13:hover {
  background: #f7fafa;
}
.button-13:focus {
  border-color: #008296;
  outline: 0;
}

/* ---------- Success CTA ---------- */
.button-68 {
  appearance: none;
  backface-visibility: hidden;
  background: #27ae60;
  border-radius: 8px;
  border-style: none;
  box-shadow: rgba(39, 174, 96, 0.15) 0 4px 9px;
  color: #fff !important;
  cursor: pointer;
  display: inline-block;
  font-family: Inter, -apple-system, system-ui, "Segoe UI", Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  padding: 13px 20px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  user-select: none;
  white-space: nowrap;
}
.button-68:hover {
  background: #1e8449;
  box-shadow: rgba(39, 174, 96, 0.2) 0 6px 12px;
}

/* ---------- Loader overlay (transient) ---------- */
#slLoader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}
#slLoader.show {
  display: grid;
}
#slLoader main {
  display: grid;
  place-items: center;
}
#slLoader .ip {
  width: 220px;
  height: 110px;
  overflow: visible;
}
#slLoader .ip .ip__track path {
  stroke: rgba(255, 255, 255, 0.18);
}
#slLoader .ip__worm1,
#slLoader .ip__worm2 {
  animation: sl-worm 1.6s cubic-bezier(0.65, 0.05, 0.36, 1) infinite;
}
@keyframes sl-worm {
  0% {
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dashoffset: -468;
  }
  100% {
    stroke-dashoffset: -936;
  }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 520px) {
  .sl-overlay {
    padding: 12px;
  }
  .sl-overlay .modal-shell {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px;
  }

  .sl-overlay .sl-sub {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-top: 16px;
  }
  .sl-overlay .sl-sub .left {
    order: 1;
    display: flex !important;
    justify-content: center !important;
    width: 100%;
  }
  .sl-overlay .sl-sub .right {
    order: 2;
    margin-left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 6px !important;
    width: 100%;
  }
  .sl-overlay .sl-sub .right .tiny {
    width: 100%;
    text-align: right;
    font-size: 14px;
    color: #ccc;
    padding-right: 6px;
  }
  .sl-overlay .sl-sub .btn-register {
    align-self: flex-end !important;
    width: auto;
    max-width: 240px;
  }
}
