/* Smaller pieces used across the site (loaded on every page by _Layout): the
   price watch box and Look inside button on book pages, "Because you liked"
   shelves, the newsletter band, the barcode scanner on Sell a Book, the push
   alerts page and My Price Alerts. Bigger pages have their own files
   (seller-dashboard.css, look-inside.css, book-finder.css). */

/* ---- Notifications ---- */
.notif-kind-price {
  background: #dcfce7;
  color: #166534;
}

.notif-push-link {
  font-weight: 600;
}

/* ---- Book page: Look inside and the price watch ---- */
.look-inside-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--bb-gold-400);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #fffbeb, var(--bb-gold-100));
  color: #78350f;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.look-inside-btn:hover {
  color: #78350f;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(169, 132, 31, 0.2);
}

.look-inside-btn span {
  display: grid;
  line-height: 1.2;
}

.look-inside-btn small {
  color: #92400e;
}

.price-watch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px dashed #86efac;
  border-radius: 0.75rem;
  background: #f0fdf4;
}

.price-watch.is-watching {
  border-style: solid;
}

.price-watch-icon {
  font-size: 1.3rem;
}

.price-watch-text {
  flex: 1 1 14rem;
  font-size: 0.92rem;
}

.price-watch-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.price-watch-more summary {
  color: #166534;
  font-size: 0.85rem;
  cursor: pointer;
}

.price-watch-more[open] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.price-watch-more .form-control {
  width: 7rem;
}

/* ---- My Price Alerts ---- */
.ba-hero.pa-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(135deg, #065f46, #0f766e 55%, #1e3a8a);
}

.pa-hero-note {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
}

.pa-list {
  display: grid;
  gap: 0.75rem;
}

.pa-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--bb-sage-100);
  border-radius: 1rem;
  background: #fff;
}

.pa-row.has-new {
  border-color: #86efac;
  box-shadow: 0 0 0 3px #dcfce7;
}

.pa-cover img {
  width: 4rem;
  height: 5.6rem;
  border-radius: 0.3rem;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.pa-info h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.pa-info h2 a {
  color: inherit;
  text-decoration: none;
}

.pa-meta,
.pa-watching {
  color: #6b7280;
  font-size: 0.85rem;
}

.pa-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.25rem 0;
}

.pa-now {
  font-size: 1.15rem;
  font-weight: 800;
}

.pa-was {
  color: #6b7280;
}

.pa-badge {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 700;
}

.pa-actions {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.pa-target {
  display: flex;
  gap: 0.35rem;
}

.pa-target .form-control {
  width: 7rem;
}

@media (max-width: 767.98px) {
  .pa-row {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }

  .pa-actions {
    grid-column: 1 / -1;
    justify-items: start;
  }
}

/* ---- Home: "Because you liked" ---- */
.because-eyebrow {
  display: inline-block;
  margin-bottom: 0.15rem;
  color: var(--bb-gold-700);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.because-shelf h2 a {
  color: var(--bb-blue-700);
  text-decoration: none;
}

.because-shelf h2 a:hover {
  text-decoration: underline;
}

/* ---- Footer: install the app, and the newsletter ---- */
.footer-install {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-install:hover {
  background: rgba(255, 255, 255, 0.16);
}

.footer-install[hidden] {
  display: none;
}

.newsletter-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: center;
  width: calc(100% - 2rem);
  max-width: calc(1200px - 2rem);
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(212, 175, 55, 0.25));
}

.newsletter-text {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.newsletter-icon {
  font-size: 2rem;
}

.newsletter-band h2 {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
}

.newsletter-band p {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form .form-control {
  min-width: 0;
}

.newsletter-form .btn-light {
  color: var(--bb-blue-700);
  white-space: nowrap;
}

.newsletter-subscribed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.newsletter-done {
  margin: 0;
  font-weight: 600;
}

.newsletter-error {
  margin: 0 0 0.4rem;
  color: #fecaca;
  font-size: 0.9rem;
}

@media (max-width: 767.98px) {
  .newsletter-band {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }
}

/* The newsletter's confirm and unsubscribe pages. */
.newsletter-page {
  max-width: 34rem;
  margin: 3rem auto;
  padding: 2rem;
  border-radius: 1.25rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 28px rgba(44, 54, 35, 0.08);
}

.newsletter-page-icon {
  font-size: 2.5rem;
}

.newsletter-page h1 {
  margin: 0.5rem 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.newsletter-page form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* ---- Sell a Book: the ISBN box and the barcode scanner ---- */
.isbn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.isbn-row .form-control {
  flex: 1 1 12rem;
  min-width: 0;
}

.isbn-scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.isbn-status {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  background: var(--bb-blue-50);
  font-size: 0.9rem;
}

.isbn-status.is-ok {
  background: #f0fdf4;
}

.isbn-status.is-warn {
  background: #fffbeb;
}

.isbn-status span {
  flex: 1 1 14rem;
}

.isbn-cover {
  width: 3rem;
  border-radius: 0.25rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.isbn-listed {
  display: block;
  flex-basis: 100%;
  margin-top: 0.25rem;
  color: #92400e;
}

.isbn-scanner {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.85);
}

.isbn-scanner-frame {
  position: relative;
  width: min(36rem, 100%);
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
}

.isbn-scanner video {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
}

.isbn-scanner-aim {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 30%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 0.75rem;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
}

.isbn-scanner-aim::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4%;
  right: 4%;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: isbn-sweep 1.6s ease-in-out infinite alternate;
}

@keyframes isbn-sweep {
  from {
    transform: translateY(-1.5rem);
  }

  to {
    transform: translateY(1.5rem);
  }
}

.isbn-scanner-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.5rem;
  margin: 0;
  padding: 0 1rem;
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.isbn-scanner-close {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
}

/* ---- Alerts on my devices ---- */
.push-page {
  max-width: 46rem;
  margin: 1.5rem auto;
}

.push-head h1 {
  margin: 0.4rem 0;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 900;
}

.push-head p {
  color: #4b5563;
}

.push-eyebrow {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--bb-blue-50);
  color: var(--bb-blue-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.push-card {
  margin-bottom: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--bb-sage-100);
  border-radius: 1rem;
  background: #fff;
}

.push-card[hidden] {
  display: none;
}

.push-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.push-devices {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.push-devices li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bb-sage-100);
}

.push-device-icon {
  font-size: 1.4rem;
}

.push-device-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.push-device-text small {
  color: #6b7280;
}
