/* TOP TECH assets and account controls */
.toptech-brand img{width:92px;height:auto;max-height:36px;object-fit:contain}
.brand-divider{height:27px;width:1px;background:#ddd0d7}
.account-actions{display:flex;align-items:center;gap:10px}
.login-btn{border:0;border-radius:99px;padding:10px 17px;font:600 13px Kanit;cursor:pointer;color:var(--pink);background:transparent}
.toptech-visual{height:390px;border-radius:28px;overflow:visible;box-shadow:0 24px 45px #bd56793d;background:#ffe4ec}
.toptech-visual>img{height:100%;width:100%;object-fit:cover;border-radius:28px;box-shadow:0 20px 38px #8e51622b}
.toptech-visual .tag-top{right:-25px}
.toptech-visual .tag-bottom{left:-24px}
.review>img{width:100%;height:110px;object-fit:cover;object-position:top;border-radius:12px;margin-bottom:15px}

.auth-modal{position:fixed;inset:0;background:rgba(52, 42, 53, 0.55);backdrop-filter:blur(6px);display:grid;place-items:center;padding:20px;opacity:0;visibility:hidden;transition:all 0.25s ease;z-index:100;overflow-y:auto}
.auth-modal.open{opacity:1;visibility:visible}
.auth-dialog{width:min(94vw,480px);background:linear-gradient(180deg,#fff5f9 0%,#ffffff 130px);border-radius:32px;padding:22px 26px 30px;position:relative;box-shadow:0 24px 80px rgba(43, 24, 45, 0.35);transform:translateY(20px) scale(0.97);transition:all 0.35s cubic-bezier(0.16, 1, 0.3, 1);max-height:90vh;overflow-y:auto;overflow-x:hidden}
.auth-dialog:before{content:"";position:absolute;top:-40px;right:-40px;width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,#ffd6e5 0%,transparent 70%);pointer-events:none;z-index:0}
.auth-dialog:after{content:"";position:absolute;top:20px;left:-30px;width:90px;height:90px;border-radius:50%;background:radial-gradient(circle,#f2edff 0%,transparent 70%);pointer-events:none;z-index:0}
.auth-dialog>*{position:relative;z-index:1}
.auth-modal.signup .auth-dialog{width:min(94vw,640px)}
.auth-modal.open .auth-dialog{transform:translateY(0) scale(1)}
.auth-dialog>p:not(.eyebrow){font-size:13px;color:var(--muted);margin:0 0 14px}
.auth-header{text-align:center}
.auth-header h2{margin:2px 0 4px}
.auth-dialog label{font-size:12px;font-weight:600;display:grid;gap:5px;margin-bottom:12px;color:#332940}
.auth-dialog input, .auth-dialog select{font:400 13.5px Kanit, sans-serif;border:1.5px solid #ded7ee;border-radius:14px;padding:10px 13px;background:#fff;transition:border-color 0.2s, box-shadow 0.2s, transform 0.15s;outline:none;color:#1e293b}
.auth-dialog input:focus, .auth-dialog select:focus{border-color:#ff4081;box-shadow:0 0 0 4px rgba(255,64,129,0.14);transform:translateY(-1px)}
.auth-dialog .btn-primary{transition:transform 0.25s cubic-bezier(0.34,1.56,0.64,1),box-shadow 0.25s}
.auth-dialog .btn-primary:hover{transform:translateY(-3px) scale(1.015)}
.auth-dialog .btn-primary:active{transform:translateY(0) scale(0.98)}
.modal-close{position:absolute;right:18px;top:16px;border:0;background:#f4eff5;width:32px;height:32px;border-radius:50%;color:#776a87;font-size:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background 0.2s, transform 0.2s;z-index:5}
.modal-close:hover{background:#ebdff0;color:#ff4081;transform:rotate(90deg)}

/* ===== Real Photo Bunny Mascot with Paw-Cover-Eyes Overlay ===== */
.rabbit-mascot-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: 2px 0 6px;
  position: relative;
  width: 172px;
  aspect-ratio: 420 / 614;
  margin-left: auto;
  margin-right: auto;
}

.rabbit-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 20px rgba(255, 64, 129, 0.22));
  transform-origin: 50% 100%;
  transition: transform 0.35s ease;
}

.rabbit-idle {
  animation: idleBob 3.2s ease-in-out infinite;
}

@keyframes idleBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(-0.8deg); }
}

.mascot-sparkle {
  position: absolute;
  color: var(--pink2);
  font-size: 14px;
  opacity: 0.85;
  z-index: 2;
  animation: sparkleTwinkle 2.4s ease-in-out infinite;
}
.mascot-sparkle.sp1 { top: -6px; left: 4%; animation-delay: 0s; }
.mascot-sparkle.sp2 { top: 14px; right: 0%; font-size: 11px; animation-delay: 0.6s; color: #9174e4; }
.mascot-sparkle.sp3 { bottom: 40%; left: -6px; font-size: 12px; animation-delay: 1.2s; }

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(15deg); }
}

/* Soft paw mitts that slide up to cover the eyes while typing a password */
.photo-paw {
  position: absolute;
  width: 74px;
  height: 74px;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 6px 10px rgba(255, 64, 129, 0.2));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.left-photo-paw { left: -6px; top: 26%; transform: translateY(90px) scale(0.7) rotate(-10deg); }
.right-photo-paw { left: 30%; top: 27%; transform: translateY(90px) scale(0.7) rotate(10deg); }

.rabbit-mascot-wrapper.covering-eyes .rabbit-photo {
  animation: none;
  transform: translateY(-2px) rotate(-2deg);
}

.rabbit-mascot-wrapper.covering-eyes .left-photo-paw,
.rabbit-mascot-wrapper.covering-eyes .right-photo-paw {
  opacity: 1;
}
.rabbit-mascot-wrapper.covering-eyes .left-photo-paw { transform: translateY(0) scale(1) rotate(-10deg); }
.rabbit-mascot-wrapper.covering-eyes .right-photo-paw { transform: translateY(0) scale(1) rotate(10deg); }

/* Peeking: one paw lowers a little to sneak a look */
.rabbit-mascot-wrapper.peeking .rabbit-photo {
  animation: none;
  transform: translateY(-2px) rotate(1deg);
}
.rabbit-mascot-wrapper.peeking .left-photo-paw { opacity: 0.9; transform: translateY(42px) scale(0.9) rotate(-26deg); }
.rabbit-mascot-wrapper.peeking .right-photo-paw { opacity: 1; transform: translateY(0) scale(1) rotate(10deg); }

/* Happy little hop + sparkle on success */
.rabbit-mascot-wrapper.happy .rabbit-photo {
  animation: happyHop 0.45s ease-in-out infinite;
}

@keyframes happyHop {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

.pupil-group {
  transition: transform 0.1s ease-out;
}

/* Floating hearts burst on successful login/signup */
.heart-burst {
  position: absolute;
  left: 50%;
  top: 20px;
  pointer-events: none;
  font-size: 15px;
  color: var(--pink);
  animation: heartFloat 1.1s ease-out forwards;
}

@keyframes heartFloat {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--driftX, 0px)), -70px) scale(1.1); }
}


/* ===== Auth Tab Switcher ===== */
.auth-tabs {
  display: flex;
  background: #f4eff5;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font: 600 13.5px Kanit, sans-serif;
  color: #776a87;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: #ffffff;
  color: #ff4081;
  box-shadow: 0 3px 10px rgba(255, 64, 129, 0.15);
  transform: scale(1.03);
}

/* ===== Registration Fields (Backoffice style) ===== */
.signup-fields-container {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-modal.signup .signup-fields-container {
  display: flex;
}

.signup-confirm,
.otp-step {
  display: none;
}

#confirmPasswordLabel[hidden],
.auth-modal:not(.signup) #confirmPasswordLabel {
  display: none !important;
}

.auth-modal.signup .signup-confirm {
  display: block;
}

.auth-modal.signup.otp-active .signup-fields-container,
.auth-modal.signup.otp-active #phoneLabel,
.auth-modal.signup.otp-active #passwordLabel,
.auth-modal.signup.otp-active .signup-confirm {
  display: none;
}

.auth-modal.signup.otp-active .otp-step {
  display: block;
}

.forgot-password-action {
  align-self: flex-end;
  border: 0;
  background: transparent;
  color: #e83e72;
  font-weight: 700;
  cursor: pointer;
  margin: -6px 0 4px;
}

.auth-modal.signup .forgot-password-action,
.auth-modal.recovery .auth-tabs,
.auth-modal.recovery .signup-fields-container,
.auth-modal.recovery #passwordLabel,
.auth-modal.recovery .signup-confirm,
.auth-modal.recovery .forgot-password-action,
.recovery-reset-step { display: none !important; }

.auth-modal.recovery.recovery-otp #phoneLabel,
.auth-modal.recovery.recovery-reset #phoneLabel,
.auth-modal.recovery.recovery-reset .otp-step { display: none !important; }

.auth-modal.recovery.recovery-otp .otp-step,
.auth-modal.recovery.recovery-reset .recovery-reset-step { display: block !important; }

.recovery-reset-step label { display: block; margin-top: 10px; }
.recovery-back { margin: 4px auto 0; }

.otp-step {
  border: 1px solid #f4c9dc;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fff8fb;
}

.otp-step-label {
  margin: 0 0 5px;
  color: #ff4081;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.otp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #776a87;
}

.otp-resend {
  border: 0;
  background: transparent;
  color: #ff4081;
  font: 600 12px Kanit, sans-serif;
  cursor: pointer;
}

.otp-resend:disabled { color: #aaa0ad; cursor: not-allowed; }
.optional-field-note { align-self: center; color: #918697; font-size: 12px; }

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.thai-date-selects {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.2fr;
  gap: 6px;
}

.thai-date-selects select {
  padding: 8px 6px;
  font-size: 12.5px;
}

.extra-fields-details {
  background: #fbf9fc;
  border: 1px dashed #e3d8ed;
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 4px;
}

.extra-fields-summary {
  font-size: 12.5px;
  font-weight: 600;
  color: #ff4081;
  cursor: pointer;
  user-select: none;
}

.extra-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

/* ===== Password Eye Toggle ===== */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 44px !important;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
  border-radius: 8px;
  color: #776a87;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.toggle-password-btn:hover {
  background: #ffe4ed;
  transform: translateY(-50%) scale(1.12);
}

@media(max-width:580px){
  .auth-form-row, .extra-fields-grid {
    grid-template-columns: 1fr;
  }
  .thai-date-selects {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .toptech-brand img{width:76px}
  .toptech-brand .brand-divider,.toptech-brand>span:last-child{display:none}
  .account-actions{gap:3px}
  .login-btn,.header-cta{padding:8px 10px;font-size:12px}
  .toptech-visual{height:235px;margin-top:27px;transform:none}
  .toptech-visual .tag-top{right:-9px}
  .toptech-visual .tag-bottom{left:-9px}
}
