/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Body and HTML base setup */
html,
body {
  height: 100%;
  margin: 0;
}

/* Main container layout */
main.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Content wrapper - will take up remaining space */
.content-wrapper {
  flex: 1 0 auto;
  width: 100%;
}

@media (min-width: 40rem) {
  .content-wrapper {
    padding-top: 2rem;
  }
}

/* Root-page URL search, styled like the BotFlip chat composer. */
.sidestep-search {
  width: 100%;
  max-width: 60.5rem;
  margin: 0 auto;
  padding: 1rem;
}

.sidestep-search__form,
.sidestep-search__composer {
  width: 100%;
}

.sidestep-search__composer {
  position: relative;
}

.sidestep-search__input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 3.5rem;
  border: 1px solid #111827;
  border-radius: 9999px;
  background: #fff;
  color: #111827;
  padding: 0.5rem 4rem 0.5rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  box-shadow:
    0 0 0 4px rgba(17, 24, 39, 0.08),
    0 0 56px 16px rgba(59, 130, 246, 0.26),
    0 24px 70px rgba(15, 23, 42, 0.18);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sidestep-search__input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.sidestep-search__input:focus-visible {
  border-color: #111827;
  box-shadow:
    0 0 0 4px rgba(17, 24, 39, 0.1),
    0 0 56px 16px rgba(59, 130, 246, 0.3),
    0 24px 70px rgba(15, 23, 42, 0.2);
}

.sidestep-search__input::-webkit-search-cancel-button {
  display: none;
}

.sidestep-search__submit {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 50%;
  right: 0.625rem;
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9999px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.sidestep-search__submit:hover {
  background: #1f2937;
}

.sidestep-search__submit:active {
  transform: translateY(-50%) scale(0.96);
}

.sidestep-search__submit:focus-visible {
  outline: 4px solid #d1d5db;
  outline-offset: 1px;
}

.sidestep-search__submit svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 40rem) {
  .sidestep-search {
    padding-right: 0;
    padding-left: 0;
  }

  .sidestep-search__input {
    font-size: 1rem;
  }
}

/* Footer wrapper */
.footer-wrapper {
  flex-shrink: 0;
  width: 100%;
  background-color: white;
  padding-top: 2rem;
  margin-top: auto;
  z-index: -1;
}

.chat-markdown {
  overflow-wrap: anywhere;
}

.chat-autocomplete-results [role="option"].selected_item {
  background-color: var(--color-blue-100, #dbeafe);
}

.chat-markdown p,
.chat-markdown ul,
.chat-markdown ol,
.chat-markdown blockquote,
.chat-markdown pre,
.chat-markdown table {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.chat-markdown > :last-child {
  margin-bottom: 0;
}

.chat-markdown ul,
.chat-markdown ol {
  padding-left: 1.25rem;
}

.chat-markdown ul {
  list-style: disc;
}

.chat-markdown ol {
  list-style: decimal;
}

.chat-markdown li {
  margin: 0.25rem 0;
}

.chat-markdown a {
  color: #2563eb;
  text-decoration: underline;
}

.chat-markdown a.chat-product-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.chat-markdown code {
  border-radius: 0.25rem;
  background-color: rgba(255, 255, 255, 0.65);
  padding: 0.1rem 0.25rem;
  font-size: 0.875em;
}

.chat-markdown pre {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 0.375rem;
  background-color: rgba(17, 24, 39, 0.08);
  padding: 0.75rem;
}

.chat-markdown pre code {
  background-color: transparent;
  padding: 0;
}

.chat-markdown blockquote {
  border-left: 3px solid #d97706;
  padding-left: 0.75rem;
  color: #4b5563;
}

.chat-markdown table {
  max-width: 100%;
  border-collapse: collapse;
}

.chat-markdown th,
.chat-markdown td {
  border: 1px solid rgba(75, 85, 99, 0.28);
  padding: 0.375rem 0.5rem;
}

.mobile-scanner-page {
  margin-top: -50px;
  min-height: 100vh;
  min-height: 100dvh;
}

.mobile-scanner-shell {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
}

.mobile-scanner-header {
  background: rgba(248, 250, 252, 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding-top: calc(env(safe-area-inset-top, 0px) + 0.875rem);
}

.mobile-scanner-empty-body {
  min-height: calc(100vh - 14rem);
  min-height: calc(100dvh - 14rem);
}

.mobile-scanner-result-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.035),
    0 8px 18px rgba(15, 23, 42, 0.035);
}

.mobile-scanner-result-grid {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 2.5rem;
  align-items: start;
  column-gap: 0.75rem;
  row-gap: 0.75rem;
}

.mobile-scanner-result-image {
  width: 5rem;
  height: 6rem;
}

.mobile-scanner-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.5rem;
  row-gap: 0.375rem;
}

.mobile-scanner-pill {
  border-color: rgba(148, 163, 184, 0.36);
  line-height: 1.25rem;
}

.mobile-scanner-actions {
  display: flex;
  justify-content: flex-end;
  align-self: start;
  justify-self: end;
}

.mobile-scanner-action-button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.375rem;
  background: #f8fafc;
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.mobile-scanner-action-button:focus-visible {
  outline: 2px solid rgba(148, 163, 184, 0.28);
  outline-offset: 2px;
}

.mobile-scanner-action-button svg {
  overflow: visible;
}

.mobile-scanner-action-button:active {
  background: #f1f5f9;
}

.mobile-scanner-menu {
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.035),
    0 8px 18px rgba(15, 23, 42, 0.035);
}

@import "pagy";
@import "blog";

@media print {

  nav,
  footer {
    display: none !important;
  }
}
