/* RESET & GLOBAL STYLES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-inter, sans-serif);
  background-color: #f9f9f9;
  color: #344054;
}

/* Visually hide elements but keep them accessible to screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* CONTAINER */
.container {
  max-width: 360px;
  width: 100%;
  margin: 5rem auto;
  padding: 0.25rem;
  /* background: #fff; */
  border-radius: 8px;
  text-align: center;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

/* LOGO */
.logo {
  margin-bottom: 1rem;
}

.logo img {
  width: 48px;
  /* Adjust as needed */
}

/* HEADINGS */
.main-heading {
  font-size: 30px;
  font-weight: 600;
  color: #101828;
  margin-bottom: 0.75rem;
}

.subheading {
  font-size: 16px;
  font-weight: 400;
  color: #475467;
  margin-bottom: 1.5rem;
}

/* DEBUG MSG (optional) */
#debug-msg {
  color: red;
  margin: 0.5rem 0;
}

/* AUTH FORMS */
.auth-form {
  text-align: left;
}

/* LABELS & INPUTS */
.label {
  font-size: 14px;
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.auth-form .stay-logged {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: auto;
    margin-bottom: 0rem;
}
.auth-form .register-stay-logged {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: auto;
    margin-bottom: 1rem;
}


/* OPTIONS ROW */
.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
}

.checkbox-container label {
  margin-left: 0.4rem;
  font-weight: 500;
  font-size:14px
}

.forgot-password a {
  font-size: 14px;
  color: #007ECC;
  text-decoration: none;
}

.forgot-password a:hover {
  text-decoration: underline;
}

/* BUTTONS */
button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
}

/* Primary sign-in button */
.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background-color: #007ECC;
  color: #fff;
  margin-bottom: 1rem;
}

.btn-primary:hover {
  background-color: #0056b3;
}

/* Success sign-up button */
.btn-success {
  width: 100%;
  padding: 0.75rem;
  background-color: #28a745;
  color: #fff;
  margin-top: 1rem;
}

.btn-success:hover {
  background-color: #218838;
}

/* Link-style button for toggles (like "Sign up", "Sign in instead") */
.link-button {
  background: none;
  color: #007bff;
  padding: 0;
  font-size: 1rem;
  text-decoration: underline;
  margin-left: 0.3rem;
}

.link-button:hover {
  text-decoration: none;
}

/* SOCIAL LOGIN BUTTONS */
.social-login {
  margin-bottom: 1rem;
}

.social-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px solid #ccc;
  color: #344054;
}

.social-btn:hover {
  background-color: #f0f0f0;
}

/* Examples of color branding for each social button (optional) */
/* Note: social button classes intentionally omitted to avoid empty rulesets */

/* SIGNUP CTA at bottom of sign-in form */
.signup-cta {
  text-align: center;
}

/* HIDDEN CLASS (for toggling sign-up form) */
.hidden {
  display: none;
}

.social-icon {
  width: 24px;
  /* Adjust as needed */
  height: 24px;
  /* Adjust as needed */
  margin-right: 0.5rem;
  vertical-align: middle;
  /* Keeps icon aligned with text */
}

/* Toasts (centered card) */
.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  min-width: unset;
  width: auto;
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #0B1324; /* deep navy text */
  border: 1px solid #EEF2F6;
  box-shadow: 0 12px 36px rgba(16, 24, 40, 0.14);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  font-size: 16px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  white-space: normal;
  word-break: break-word;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  animation: toast-in-center 180ms ease-out forwards, toast-out-center 220ms ease-in forwards;
  animation-delay: 0s, var(--toast-duration, 3000ms);
}

.toast-row { display: flex; align-items: center; gap: 16px; }
.toast-icon {
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 20px;
}
.toast-icon.error { background: #FEE4E2; color: #D92D20; }
.toast-icon.success { background: #D1FADF; color: #12B76A; }
.toast-icon.info { background: #D1E9FF; color: #007ECC; }
.toast-text {
  font-size: 17px;
  font-weight: 500; /* softer weight for macOS look */
  letter-spacing: -0.005em;
  color: #0B1324;
}

@keyframes toast-in-center {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out-center {
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* Signup page adjustments: show toast under heading as overlay (no layout shift) */
.signup-page .container { position: relative; }
.signup-page .toast-container {
  position: absolute;
  top: 110px; /* a bit lower to avoid intersecting heading */
  left: 50%;
  transform: translateX(-50%);
  width: 100%; /* match form/container width */
  align-items: center;
  gap: 8px;
  margin: 0;
  pointer-events: none; /* don't block form */
  z-index: 10;
}
.signup-page .toast {
  display: inline-flex; /* shrink to content until max-width */
  align-items: center;
  width: auto; /* grow with content */
  max-width: calc(100% - 8px); /* cap at container/input width with tiny inset */
  min-width: 280px; /* slightly smaller overall */
  padding: 6px 10px; /* reduce height */
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.35; /* tighter text leading */
  pointer-events: none; /* don't block inputs under overlay */
}
.signup-page .toast-icon { width: 28px; height: 28px; font-size: 16px; }
.signup-page .toast-text { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }

/* Slightly reduce gap between icon and text for signup toast */
.signup-page .toast-row { gap: 10px; }

/* Signin page adjustments: top overlay toast within container */
.signin-page .container { position: relative; }
.signin-page #toast-container.toast-container {
  position: absolute;
  top: 110px; /* place under heading similar to signup */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0;
  pointer-events: none;
  z-index: 10;
}
.signin-page .toast {
  display: inline-flex; /* shrink to content until max-width */
  align-items: center;
  width: auto; /* grow with content */
  max-width: calc(100% - 8px); /* cap at container/input width */
  min-width: 280px; /* match signup */
  padding: 6px 10px; /* reduced height like signup */
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.35;
  pointer-events: none;
}
.signin-page .toast-icon { width: 28px; height: 28px; font-size: 16px; }
.signin-page .toast-text { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.signin-page .toast-row { gap: 10px; }

/* Subline and animated dots for redirect message (restored) */
.toast-sub { display: inline-block; margin-top: 4px; font-size: 15px; font-weight: 500; color: rgba(11,19,36,0.72); }
.toast-dots { display: inline-flex; margin-left: 6px; }
.toast-dots .dot { display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: currentColor; opacity: 0.25; animation: toast-dot 1.2s ease-in-out infinite; }
.toast-dots .dot:nth-child(1) { animation-delay: 0s; }
.toast-dots .dot:nth-child(2) { animation-delay: .3s; }
.toast-dots .dot:nth-child(3) { animation-delay: .6s; }
@keyframes toast-dot { 0%,20%{opacity:.25;transform:translateY(0)}50%{opacity:1;transform:translateY(-2px)}80%,100%{opacity:.25;transform:translateY(0)} }