/* ==========================================================================
   LY With Laughter Guru - Authentication & Change Password Stylesheet (auth.css)
   ========================================================================== */

.auth-page-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, rgba(3, 76, 172, 0.05) 0%, rgba(248, 250, 252, 1) 100%);
}

.auth-card {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 2rem;
  box-sizing: border-box;
}

.auth-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(3, 76, 172, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.auth-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.auth-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.auth-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F44200;
  display: inline-block;
}

.auth-step-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #c2410c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.auth-subheading {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.auth-notice-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.auth-notice-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #16a34a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-notice-text {
  margin: 0;
  font-size: 0.8125rem;
  color: #166534;
  line-height: 1.5;
}

.password-input-wrapper {
  position: relative;
}

.password-input {
  padding-right: 42px;
  border-radius: 10px;
  height: 46px;
}

.btn-toggle-pwd {
  position: absolute;
  right: 4px;
  top: 8px;
  /* transform: translateY(-50%); */
  color: #94a3b8;
  padding: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-pwd:hover {
  color: #0f172a;
}

.btn-toggle-pwd svg,
.btn-toggle-pwd i {
  width: 18px;
  height: 18px;
}

.password-requirements-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 1.25rem;
}

.password-requirements-title {
  margin: 0 0 6px 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.password-requirements-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.6;
}

.btn-submit-auth {
  height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9375rem;
  background: linear-gradient(135deg, #F44200 0%, #FF581A 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(244, 66, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
}

.btn-submit-auth:hover {
  background: linear-gradient(135deg, #e03d00 0%, #f44200 100%) !important;
  box-shadow: 0 6px 20px rgba(244, 66, 0, 0.4);
}

.btn-submit-auth svg,
.btn-submit-auth i {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.auth-footer {
  border-top: 1px solid #f1f5f9;
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.auth-footer-text {
  font-size: 0.8125rem;
  color: #64748b;
}

.auth-link {
  color: #034CAC;
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Submit Button Popover (Notice & Error Bubble for Auth Forms)
   ========================================================================== */
.submit-btn-wrapper {
  position: relative;
  width: 100%;
}

.btn-action-popover {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1.5px solid #FED7AA;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 16px 36px -4px rgba(244, 66, 0, 0.18), 0 6px 16px -2px rgba(0, 0, 0, 0.08);
  z-index: 1050;
  text-align: left;
  box-sizing: border-box;
  animation: popoverBounceIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popoverBounceIn {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* Speech arrow pointing down at submit button */
.btn-action-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px 9px 0 9px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
  z-index: 2;
}

.btn-action-popover::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10.5px 10.5px 0 10.5px;
  border-style: solid;
  border-color: #FED7AA transparent transparent transparent;
  z-index: 1;
}

/* Error variant for invalid credentials / authentication failures */
.btn-action-popover.popover-error {
  border-color: #FECACA;
  box-shadow: 0 16px 36px -4px rgba(220, 38, 38, 0.18), 0 6px 16px -2px rgba(0, 0, 0, 0.08);
}

.btn-action-popover.popover-error::before {
  border-color: #FECACA transparent transparent transparent;
}

.btn-action-popover.popover-error .popover-icon-badge {
  background: #FEE2E2;
  color: #DC2626;
}

.btn-action-popover.popover-error .popover-title {
  color: #DC2626;
}

.popover-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFEDD5;
  color: #EA580C;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popover-title {
  font-family: var(--font-family, -apple-system, sans-serif);
  font-weight: 800;
  font-size: 15px;
  color: #9A3412;
  letter-spacing: -0.01em;
}

.popover-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  height: fit-content;
  color: #94A3B8;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.popover-close-btn:hover {
  color: #0F172A;
  background: #F1F5F9;
}

.popover-body-text {
  font-family: var(--font-family, -apple-system, sans-serif);
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
  font-weight: 500;
}

.btn-popover-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family, -apple-system, sans-serif);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-popover-primary {
  background: linear-gradient(135deg, #F44200 0%, #FF6B35 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(244, 66, 0, 0.25);
}

.btn-popover-primary:hover {
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(244, 66, 0, 0.35);
}

.btn-popover-secondary {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
}

.btn-popover-secondary:hover {
  background: #E2E8F0;
  color: #0F172A;
  text-decoration: none;
}

.btn-popover-dismiss {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.btn-popover-dismiss:hover {
  background: #F1F5F9;
  color: #1E293B;
}

/* Dark theme support */
[data-theme="dark"] .btn-action-popover {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.5), 0 6px 16px -2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-action-popover::after {
  border-color: #1E293B transparent transparent transparent;
}

[data-theme="dark"] .btn-action-popover::before {
  border-color: #334155 transparent transparent transparent;
}

[data-theme="dark"] .btn-action-popover.popover-error {
  border-color: #7F1D1D;
}

[data-theme="dark"] .btn-action-popover.popover-error::before {
  border-color: #7F1D1D transparent transparent transparent;
}

[data-theme="dark"] .btn-action-popover.popover-error .popover-icon-badge {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
}

[data-theme="dark"] .btn-action-popover.popover-error .popover-title {
  color: #FCA5A5;
}

[data-theme="dark"] .popover-body-text {
  color: #CBD5E1;
}

[data-theme="dark"] .popover-close-btn {
  color: #94A3B8;
}

[data-theme="dark"] .popover-close-btn:hover {
  color: #F8FAFC;
  background: #334155;
}

[data-theme="dark"] .btn-popover-dismiss {
  background: #334155;
  color: #E2E8F0;
  border-color: #475569;
}

[data-theme="dark"] .btn-popover-dismiss:hover {
  background: #475569;
  color: #FFFFFF;
}
