/* ==========================================================================
   SwapperPro - Main Layout & Ultra-Responsive Application Styles
   Fully optimized for all viewports: Small mobile (<400px), Tablets & Desktops.
   Zero horizontal overflow, fluid touch targets, and pristine visual hierarchy.
   ========================================================================== */

@import url("./tokens.css");
@import url("./components.css");

/* --------------------------------------------------------------------------
   Reset & Base Setup
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  /* Guaranteed zero horizontal scrolling */
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: background-color var(--duration-normal) ease, color var(--duration-normal) ease;
  display: flex;
  flex-direction: column;
}

/* Custom Eye-Friendly Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-pill);
}

/* Prevent image/canvas/svg overflowing container on any screen */
img,
canvas,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Navigation Bar (Sticky, Fluid, Responsive on <400px)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 24px;
  height: 24px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--accent-subtle);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-toggle-btn {
  display: none;
}

@media (max-width: 640px) {
  .nav-container {
    position: relative;
  }

  .nav-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    gap: 8px;
    display: none;
    z-index: 100;
  }

  .nav-links.is-open {
    display: flex;
    animation: navSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .nav-link {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    width: 100%;
    justify-content: flex-start;
  }
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   App Shell & Main Layout Container
   -------------------------------------------------------------------------- */
.app-container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 44px;
  flex: 1;
}

/* --------------------------------------------------------------------------
   Hero Section (Fluid Typography & Proportions)
   -------------------------------------------------------------------------- */
.hero-section {
  text-align: center;
  padding: 24px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.hero-title {
  font-size: clamp(1.65rem, 5.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  max-width: 780px;
  word-break: break-word;
}

.hero-title span {
  background: var(--accent-primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.875rem, 2.5vw, 1.075rem);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.5;
  padding: 0 8px;
}

/* --------------------------------------------------------------------------
   Search Bar (Centered, Fluid, Responsive Under 400px)
   -------------------------------------------------------------------------- */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 8px auto 16px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.search-icon-left {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 38px 0 42px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-tertiary);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-clear-btn.is-visible {
  display: flex;
}

.search-clear-btn:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

/* --------------------------------------------------------------------------
   Filter Row & Category Switcher (Scrollable on Mobile)
   -------------------------------------------------------------------------- */
.filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  width: 100%;
}

.category-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  gap: 3px;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-switcher::-webkit-scrollbar {
  display: none;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.category-tab:hover {
  color: var(--text-primary);
}

.category-tab.is-active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* --------------------------------------------------------------------------
   Card Grid (Fully Responsive on All Devices)
   -------------------------------------------------------------------------- */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-title-wrap h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Guaranteed minimum 2 columns on all devices */
  gap: 12px;
  width: 100%;
}

@media (min-width: 640px) {
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }
}

/* --------------------------------------------------------------------------
   Centered Active Workspace (Tool / Game Playground)
   -------------------------------------------------------------------------- */
.app-view {
  max-width: var(--workspace-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  animation: fadeIn 0.18s ease both;
}

.app-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.app-view-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.app-view-title {
  font-size: clamp(1.05rem, 3.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-view-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.app-playground-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(12px, 3vw, 24px);
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Tool Utility Components (Dropzone, Controls, Mode Switchers)
   -------------------------------------------------------------------------- */
.dropzone-area {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 36px) 16px;
  text-align: center;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.dropzone-area:hover,
.dropzone-area.drag-over {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
}

.dropzone-area p {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-area span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 320px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-select,
.form-input {
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--surface-input);
  color: var(--text-primary);
  padding: 0 10px;
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--border-focus);
}

.form-range {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* Tool Mode Selector (e.g. Brush vs Box) */
.tool-mode-group {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  gap: 2px;
}

.tool-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.tool-mode-btn:hover {
  color: var(--text-primary);
}

.tool-mode-btn.is-active {
  background: var(--surface-card);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Footer (Clean, Responsive)
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  padding: 24px 0;
  margin-top: auto;
  width: 100%;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   BREAKPOINTS: Comprehensive Multi-Device Optimization
   ========================================================================== */

/* Tablet & Smaller Screens (<768px) */
@media (max-width: 768px) {
  .app-container {
    padding: 16px 12px 36px;
  }

  .hero-section {
    padding: 16px 0 12px;
  }
}

/* Small Phones (<480px) */
@media (max-width: 480px) {
  .nav-container {
    padding: 0 10px;
    height: 52px;
  }

  .brand-link span:not(.brand-badge) {
    font-size: 0.95rem;
  }

  .brand-badge {
    display: none;
    /* Keep header ultra clean on phones */
  }

  .nav-link {
    padding: 4px 7px;
    font-size: 0.75rem;
  }

  .btn-icon {
    width: 34px;
    height: 34px;
    min-height: 34px;
  }

  .search-input {
    height: 44px;
    font-size: 0.84rem;
    padding: 0 34px 0 36px;
  }

  .category-tab {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card-body {
    padding: 10px 8px;
  }

  .card-title {
    font-size: 0.86rem;
  }

  .card-description {
    font-size: 0.72rem;
    line-height: 1.35;
    margin-bottom: 8px;
  }

  .card-preview-art {
    height: 95px;
    padding: 8px;
  }

  .app-playground-card {
    padding: 10px 6px;
    border-radius: var(--radius-lg);
  }
}

/* Micro / Narrow Devices (<380px, e.g. iPhone SE, Galaxy Fold outer, 320px-360px) */
@media (max-width: 380px) {
  .nav-container {
    padding: 0 8px;
  }

  .nav-links {
    gap: 1px;
  }

  .nav-link {
    padding: 3px 5px;
    font-size: 0.7rem;
  }

  .items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .card-body {
    padding: 8px 6px;
  }

  .card-title {
    font-size: 0.8rem;
  }

  .card-description {
    font-size: 0.68rem;
    margin-bottom: 6px;
  }

  .card-preview-art {
    height: 80px;
    padding: 6px;
  }

  .card-actions-row .btn-launch-item {
    min-height: 30px;
    font-size: 0.72rem;
    padding: 0 6px;
  }

  .app-container {
    padding: 12px 6px 28px;
  }

  .category-tab {
    padding: 4px 7px;
    font-size: 0.7rem;
  }

  .app-view-title {
    font-size: 0.95rem;
  }

  .btn {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.76rem;
  }
}

/* --------------------------------------------------------------------------
   Google AdSense Layout Architecture (Side Gutters & In-Stream Slots)
   Clean, non-intrusive: side rails flank wide displays, bottom banners under
   content and game playgrounds. Automatically collapses when empty or blocked.
   -------------------------------------------------------------------------- */
.site-layout-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  position: relative;
}

.ad-gutter {
  display: none;
  width: 160px;
  flex-shrink: 0;
  padding: 16px 8px;
}

/* Wide screen side rails (160x600 Skyscrapers) */
@media (min-width: 1380px) {
  .ad-gutter {
    display: flex;
    justify-content: center;
  }
}

.ad-gutter-sticky {
  position: sticky;
  top: 76px;
  width: 160px;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.ad-gutter ins.adsbygoogle {
  display: inline-block;
  width: 160px;
  height: 600px;
}

/* Clean ad containers: completely hidden when empty or blocked */
.ad-slot-container {
  width: 100%;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ad-slot-container:empty {
  display: none;
}

.ad-slot-bottom {
  margin: 24px auto 0;
  width: 100%;
  max-width: 728px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ad-slot-bottom ins.adsbygoogle {
  display: block;
  width: 100%;
  min-height: 90px;
}

.ad-slot-bottom:empty,
ins.adsbygoogle:empty {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Content & Legal Pages (Privacy Policy, Terms, About, Contact)
   -------------------------------------------------------------------------- */
.policy-view {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.policy-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 4vw, 36px);
  box-shadow: var(--shadow-sm);
}

.policy-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.policy-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.policy-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.policy-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 10px;
}

.policy-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

.policy-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

.policy-content p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.policy-content ul,
.policy-content ol {
  margin: 10px 0 18px 24px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.policy-content li {
  margin-bottom: 6px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.contact-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
}


/* --------------------------------------------------------------------------
   Cookie & Privacy Consent Banner (GDPR, CCPA & Google AdSense Policy)
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 620px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 18px;
  z-index: 1000;
  animation: cookieFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieFadeUp {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}

.cookie-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cookie-banner-text p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.cookie-banner-text a {
  color: var(--accent-primary);
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
  min-height: 32px;
}

/* ==========================================================================
   Tooltip / Toast Notifications – Top-Right
   ========================================================================== */
.tooltip-host {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
  width: max-content;
}

.tooltip-message {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: rgba(30, 30, 46, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: tooltip-slide-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: top right;
  border-left: 4px solid var(--accent-primary, #8b5cf6);
}

.tooltip-message--info {
  border-left-color: #60a5fa;
}

.tooltip-message--success {
  border-left-color: #34d399;
}

.tooltip-message--warning {
  border-left-color: #fbbf24;
  color: #fef3c7;
}

.tooltip-message--danger {
  border-left-color: #f87171;
}

.tooltip-message.is-leaving {
  animation: tooltip-slide-out 0.22s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes tooltip-slide-in {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes tooltip-slide-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.85);
  }
}

@media (max-width: 480px) {
  .tooltip-host {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
    width: auto;
  }
}