/* Toast notifications — sticky bottom-right */

#fc-toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

@media (max-width: 768px) {
  #fc-toast-root {
    bottom: 96px; /* above mobile-bottom-nav */
    right: 12px;
    left: 12px;
  }
}

.fc-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-modal);
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 200ms cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.fc-toast.is-shown {
  opacity: 1;
  transform: translateX(0);
}

.fc-toast.is-leaving {
  opacity: 0;
  transform: translateX(20px);
}

.fc-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.fc-toast-success .fc-toast-icon { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.fc-toast-error   .fc-toast-icon { background: rgba(220, 38, 38, 0.18); color: #fca5a5; }
.fc-toast-warning .fc-toast-icon { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.fc-toast-info    .fc-toast-icon { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.fc-toast-star    .fc-toast-icon { background: rgba(251, 191, 36, 0.18); }

.fc-toast-success { border-left: 3px solid #10b981; }
.fc-toast-error   { border-left: 3px solid #dc2626; }
.fc-toast-warning { border-left: 3px solid #f59e0b; }
.fc-toast-info    { border-left: 3px solid #3b82f6; }
.fc-toast-star    { border-left: 3px solid #fbbf24; }

.fc-toast-text {
  flex: 1;
  line-height: 1.4;
}

.fc-toast-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fc-toast-close:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ====== Login modal (soft prompt) ====== */
.fc-login-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 200ms ease;
}
.fc-login-modal-backdrop.is-open { opacity: 1; }

.fc-login-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 36px 28px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-modal);
  text-align: center;
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  color: var(--text-primary);
  transform: scale(0.96);
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.fc-login-modal-backdrop.is-open .fc-login-modal { transform: scale(1); }

.fc-login-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fc-login-modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.fc-login-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  margin-bottom: 16px;
}
.fc-login-modal-icon svg { fill: #fbbf24; }

.fc-login-modal-title {
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.fc-login-modal-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 20px;
}

.fc-login-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fc-login-modal-foot {
  margin-top: 18px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.fc-login-modal-foot a { color: var(--brand-primary); }

/* ====== PWA install banner ====== */
.fc-pwa-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translate(-50%, 30px);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-modal);
  max-width: calc(100vw - 32px);
  width: 420px;
  opacity: 0;
  transition: opacity 200ms cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
}
.fc-pwa-banner.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fc-pwa-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fc-pwa-icon img { width: 28px; height: 28px; }

.fc-pwa-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fc-pwa-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.fc-pwa-text span {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.fc-pwa-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.fc-pwa-btn:hover { background: var(--brand-primary-hover); }

.fc-pwa-close {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}
.fc-pwa-close:hover { color: var(--text-primary); background: var(--bg-hover); }

@media (max-width: 480px) {
  .fc-pwa-banner { width: calc(100vw - 24px); bottom: 88px; }
  .fc-pwa-text span { display: none; }
}

/* ====== Onboarding tour ====== */
#fc-onboard { position: fixed; inset: 0; z-index: 220; pointer-events: none; }
.fc-ob-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}
.fc-ob-popover {
  position: absolute;
  width: 320px;
  padding: 18px 20px 16px;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: #fafafa;
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  pointer-events: auto;
  z-index: 2;
}
.fc-ob-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.fc-ob-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
}
.fc-ob-skip {
  background: transparent; border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.fc-ob-skip:hover { background: rgba(255, 255, 255, 0.08); color: #fafafa; }

.fc-ob-popover h3 {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.fc-ob-popover p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.fc-ob-actions { display: flex; justify-content: space-between; gap: 8px; }
.fc-ob-actions button {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: #fafafa;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 100ms;
}
.fc-ob-actions button:hover { background: rgba(255, 255, 255, 0.14); }
.fc-ob-actions .fc-ob-next { background: #dc2626; border-color: #dc2626; }
.fc-ob-actions .fc-ob-next:hover { background: #b91c1c; }

.fc-ob-target {
  position: relative;
  z-index: 221 !important;
  box-shadow:
    0 0 0 4px rgba(220, 38, 38, 0.40),
    0 0 0 9999px rgba(0, 0, 0, 0.55);
  border-radius: 12px;
  animation: fc-ob-pulse 1.6s ease-in-out infinite;
}
@keyframes fc-ob-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.40), 0 0 0 9999px rgba(0, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.50), 0 0 0 9999px rgba(0, 0, 0, 0.55); }
}
