/**
 * Tabla I/O — Native App Welcome Styles
 * ──────────────────────────────────────────────────────────
 * Styles for the first-launch app welcome carousel overlay.
 * Dynamically inherits the active theme (Cream, Stone, Dark, Light).
 */

/* ── Overlay ──────────────────────────────────────────── */
#app-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--body-bg, var(--bg-primary, #000000));
  color: var(--text-primary, #f0f0f0);
  padding: env(safe-area-inset-top, 24px) env(safe-area-inset-right, 20px) env(safe-area-inset-bottom, 24px) env(safe-area-inset-left, 20px);
  animation: appWelcomeFadeIn 0.3s ease;
}

#app-welcome-overlay.app-welcome-dismissing {
  animation: appWelcomeFadeOut 0.3s ease forwards;
}

@keyframes appWelcomeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes appWelcomeFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ── Card ─────────────────────────────────────────────── */
.app-welcome-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 24px;
}

/* ── Top bar (dots + skip) ────────────────────────────── */
.app-welcome-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.app-welcome-dots {
  display: flex;
  gap: 8px;
}

.app-welcome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong, rgba(255, 255, 255, 0.2));
  transition: background 0.3s ease, transform 0.3s ease;
}

.app-welcome-dot.active {
  background: var(--accent-primary, var(--accent, #ea6500));
  transform: scale(1.3);
}

.app-welcome-skip {
  background: none;
  border: none;
  color: var(--text-muted, #888888);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.app-welcome-skip:hover,
.app-welcome-skip:active {
  color: var(--text-primary, #f0f0f0);
}

/* ── Brand ────────────────────────────────────────────── */
.app-welcome-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-welcome-logo {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 12px rgba(234, 101, 0, 0.25));
}

.app-welcome-brand-name {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary, #f0f0f0);
  letter-spacing: -0.02em;
}

/* ── Slide content ────────────────────────────────────── */
.app-welcome-slides {
  width: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-welcome-slide {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: appWelcomeSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes appWelcomeSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-welcome-slide-icon {
  color: var(--accent-primary, var(--accent, #ea6500));
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-welcome-slide-icon svg {
  width: 58px;
  height: 58px;
  stroke: var(--accent-primary, var(--accent, #ea6500));
}

.app-welcome-slide-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary, #f0f0f0);
  margin: 0;
  letter-spacing: -0.01em;
}

.app-welcome-slide-desc {
  font-size: 0.98rem;
  color: var(--text-secondary, #888888);
  line-height: 1.6;
  margin: 0;
  max-width: 320px;
}

/* ── Footer / Button ──────────────────────────────────── */
.app-welcome-footer {
  width: 100%;
  display: flex;
  justify-content: center;
}

.app-welcome-btn {
  width: 100%;
  max-width: 300px;
  padding: 15px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent-primary, var(--accent, #ea6500));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(234, 101, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.app-welcome-btn:hover {
  background: var(--accent-hover, #c4520a);
}

.app-welcome-btn:active {
  transform: scale(0.96);
}

/* ── Theme Overrides (Cream mode) ─────────────────────── */
[data-theme="cream"] #app-welcome-overlay,
html.cream #app-welcome-overlay {
  background: #FDF8F2 !important;
  color: #2C1A0E !important;
}

[data-theme="cream"] .app-welcome-brand-name,
html.cream .app-welcome-brand-name,
[data-theme="cream"] .app-welcome-slide-title,
html.cream .app-welcome-slide-title {
  color: #2C1A0E !important;
}

[data-theme="cream"] .app-welcome-slide-desc,
html.cream .app-welcome-slide-desc {
  color: #6B3F1F !important;
}

[data-theme="cream"] .app-welcome-skip,
html.cream .app-welcome-skip {
  color: #A0724A !important;
}

[data-theme="cream"] .app-welcome-dot,
html.cream .app-welcome-dot {
  background: rgba(180, 110, 50, 0.25) !important;
}

[data-theme="cream"] .app-welcome-dot.active,
html.cream .app-welcome-dot.active {
  background: #E8680A !important;
}

[data-theme="cream"] .app-welcome-btn,
html.cream .app-welcome-btn {
  background: #E8680A !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(232, 104, 10, 0.35) !important;
}
