body.is-mobile-chatbot .chatbot-float {
  width: max-content;
  min-width: max-content;
  right: 0.65rem;
  left: auto;
  bottom: 0.65rem;
  display: inline-flex;
}

body.is-mobile-chatbot .chatbot-toggle {
  width: 3.25rem;
  height: 3.25rem;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0;
  border-radius: 999px;
  justify-content: center;
}

body.is-mobile-chatbot .chatbot-toggle-label {
  display: none;
}

body.is-mobile-chatbot .chatbot-toggle-icon {
  display: inline;
  font-size: 1.1rem;
  line-height: 1;
}

body.is-mobile-chatbot .chatbot-panel {
  max-height: 68vh;
  width: min(22rem, calc(100vw - 1.3rem));
}

body.is-mobile-chatbot .chatbot-chip {
  font-size: 0.86rem;
  padding: 0.62rem 0.78rem;
}

#floating-ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

#floating-ui .chatbot-float {
  pointer-events: auto;
}
/* Booksta UI overrides: larger helper, calmer page-load, stronger admin cards */

/* Larger chatbot helper */
.chatbot-float {
  position: fixed !important;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  right: 1.25rem;
  bottom: 1.25rem;
  width: max-content;
  min-width: max-content;
  max-width: min(30rem, calc(100vw - 1.5rem));
  z-index: 120;
  transform: none;
  will-change: auto;
}

.chatbot-toggle {
  min-width: 7rem;
  min-height: 3.4rem;
  padding: 0.9rem 1.1rem;
  font-size: 1rem;
  border-radius: 999px;
}

.chatbot-panel {
  width: 100%;
  max-height: min(36rem, 70vh);
  overflow: hidden;
}

.chatbot-body {
  min-height: 12rem;
  max-height: 24rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chatbot-msg {
  font-size: 0.98rem;
  line-height: 1.55;
  padding: 0.85rem 0.95rem;
}

.chatbot-chip {
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.chatbot-toggle-icon {
  display: none;
}

/* Calm down initial page-load animations; keep scroll-triggered animations intact */
.hero:not(.scroll-fade-in),
.section:not(.scroll-fade-in),
.book-card:not(.scroll-fade-in),
.mini-book:not(.scroll-fade-in),
.wishlist-card:not(.scroll-fade-in),
.order-card:not(.scroll-fade-in),
.review-card:not(.scroll-fade-in),
.drawer-item:not(.scroll-fade-in),
.contact-card:not(.scroll-fade-in),
.panel:not(.scroll-fade-in),
.glass-card:not(.scroll-fade-in) {
  animation: none !important;
}

.hero-title,
.section-title,
.section-copy {
  animation: none !important;
}

/* Make the auth modal and home background feel stable on open */
.auth-modal-backdrop,
.auth-modal-panel,
.auth-modal-panel * {
  animation: none !important;
}

/* Stronger admin cards that read like analytics tiles */
.admin-layout .card,
.admin-layout .stat-card,
.admin-layout .dashboard-panel,
.admin-layout .alert-grid .card,
.admin-layout .books-summary-grid .stat-card {
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass-strong) 80%, transparent), var(--glass));
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.14);
  backdrop-filter: blur(14px);
}

.admin-layout .card:hover,
.admin-layout .stat-card:hover,
.admin-layout .dashboard-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 18px 42px rgba(99, 102, 241, 0.16);
}

.admin-layout .stat-card {
  padding: 1.15rem 1.2rem;
}

.admin-layout .stat-value {
  font-size: 2.2rem;
}

.admin-layout .books-summary-grid {
  gap: 1rem;
}

.admin-layout .dashboard-hero {
  padding: 1.2rem;
}

.admin-layout .dashboard-panel {
  padding: 1.15rem;
}

/* Storefront cards: a little more like analytics tiles */
.book-card.card,
.mini-book.card,
.wishlist-card.card,
.order-card.card {
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.08);
}

.book-card.card:hover,
.mini-book.card:hover,
.wishlist-card.card:hover,
.order-card.card:hover {
  box-shadow: 0 18px 42px rgba(99, 102, 241, 0.14);
}

@media (max-width: 700px) {
  .chatbot-float {
    width: max-content;
    min-width: max-content;
    right: 0.65rem;
    left: auto;
    bottom: 0.65rem;
    display: inline-flex;
  }

  .chatbot-panel {
    max-height: 68vh;
    width: min(22rem, calc(100vw - 1.3rem));
  }

  .chatbot-toggle {
    width: 3.25rem;
    height: 3.25rem;
    min-width: 3.25rem;
    min-height: 3.25rem;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
  }

  .chatbot-toggle-label {
    display: none;
  }

  .chatbot-toggle-icon {
    display: inline;
    font-size: 1.1rem;
    line-height: 1;
  }

  .chatbot-chip {
    font-size: 0.86rem;
    padding: 0.62rem 0.78rem;
  }
}
