/* ═══════════════════════════════════════════════════════════════
   MERKERT SOCIAL MEDIA — AUTH SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────── */
#auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(44, 36, 32, 0.92);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#auth-overlay.auth-open {
  display: flex;
}

/* ── Panel ───────────────────────────────────────────────────── */
.auth-panel {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 40px 40px 32px;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ── Close button ────────────────────────────────────────────── */
.auth-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 18px;
  color: #B0A090;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.auth-close:hover {
  color: #2C2420;
  background: #F5F0E8;
}

/* ── State visibility ────────────────────────────────────────── */
.auth-state { display: block; }
.auth-hidden { display: none !important; }

/* ── Logo ────────────────────────────────────────────────────── */
.auth-logo {
  text-align: center;
  margin-bottom: 18px;
}
.auth-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* ── Typography ──────────────────────────────────────────────── */
.auth-h2 {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  color: #2C2420;
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.25;
}
.auth-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #8B6F5A;
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.5;
}

/* ── Quiz hint banner ────────────────────────────────────────── */
.auth-quiz-hint {
  background: #F5F0E8;
  border: 1.5px solid #E8DDD0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #C67B5A;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Form fields ─────────────────────────────────────────────── */
.auth-field {
  margin-bottom: 14px;
}
.auth-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #8B6F5A;
  margin-bottom: 5px;
  font-weight: 500;
}
.auth-input {
  width: 100%;
  border: 1.5px solid #E0D8CE;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #2C2420;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: #C67B5A;
  box-shadow: 0 0 0 3px rgba(198, 123, 90, 0.12);
}
.auth-input::placeholder {
  color: #C0B0A0;
}

/* ── Checkboxes ──────────────────────────────────────────────── */
.auth-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #2C2420;
  cursor: pointer;
  margin-bottom: 10px;
  line-height: 1.5;
}
.auth-check-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #C67B5A;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.auth-link {
  color: #C67B5A;
  text-decoration: underline;
}

/* ── Error / success messages ────────────────────────────────── */
.auth-error {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #C0392B;
  background: #fdf0f0;
  border-radius: 7px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: none;
}
.auth-error:not(:empty) {
  display: block;
}
.auth-success {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #4A6741;
  background: #f0f5ee;
  border-radius: 7px;
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Primary button ──────────────────────────────────────────── */
.auth-btn-primary {
  width: 100%;
  background: #C67B5A;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
}
.auth-btn-primary:hover {
  background: #B56A49;
  transform: translateY(-1px);
}
.auth-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Switch link ─────────────────────────────────────────────── */
.auth-switch {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #8B6F5A;
  text-align: center;
  margin-top: 16px;
}
.auth-switch-btn {
  background: none;
  border: none;
  color: #C67B5A;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.auth-switch-btn:hover {
  color: #B56A49;
}

/* ── Success state ───────────────────────────────────────────── */
.auth-success-icon {
  width: 60px;
  height: 60px;
  background: #4A6741;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION — AUTH BUTTON & USER DROPDOWN
   ═══════════════════════════════════════════════════════════════ */
.auth-nav-btn {
  background: none;
  border: 1.5px solid #E0D8CE;
  border-radius: 8px;
  padding: 7px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #2C2420;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.auth-nav-btn:hover {
  border-color: #C67B5A;
  background: #fdf3ef;
}

/* User menu wrapper */
.auth-nav-user {
  position: relative;
  flex-shrink: 0;
}
.auth-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F5F0E8;
  border: 1.5px solid #E0D8CE;
  border-radius: 8px;
  padding: 7px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #2C2420;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s;
}
.auth-user-btn:hover {
  border-color: #C67B5A;
}

/* Dropdown */
.auth-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #E0D8CE;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(44, 36, 32, 0.14);
  min-width: 160px;
  overflow: hidden;
  z-index: 200;
}
.auth-user-dropdown.auth-dd-open {
  display: block;
}
.auth-user-dropdown a,
.auth-user-dropdown button {
  display: block;
  width: 100%;
  padding: 11px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #2C2420;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
  box-sizing: border-box;
}
.auth-user-dropdown a:hover,
.auth-user-dropdown button:hover {
  background: #F5F0E8;
}
.auth-user-dropdown a:not(:last-child),
.auth-user-dropdown button:not(:last-child) {
  border-bottom: 1px solid #F0EBE4;
}
.auth-dd-signout {
  color: #C0392B !important;
}

/* Mobile auth button in nav-mobile-menu */
.auth-nav-btn-mobile {
  display: block;
  padding: 0.9rem 1rem;
  font-family: sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #C67B5A;
  text-decoration: none;
  border-bottom: 1px solid #E8DDD0;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════════ */
.auth-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #2C2420;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 24px;
  z-index: 99999;
  white-space: nowrap;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.auth-toast.auth-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-panel {
    padding: 28px 24px 24px;
  }
  .auth-h2 {
    font-size: 1.25rem;
  }
}
