/* Public Notion merch tracker embed */
.notion-merch-widget {
  width: 100%;
  margin: 0 auto;
  color: #111827;
}

[data-notion-merch-widget] {
  position: relative;
  padding-top: 4rem;
}

.notion-merch-widget p {
  margin: 0;
}

.notion-merch-widget p {
  color: #374151;
  font-size: 0.75rem;
}

.notion-merch-widget a {
  color: #111827 !important;
  font-weight: 700;
}

.notion-merch-widget a:visited,
.notion-merch-widget a:hover,
.notion-merch-widget a:focus-visible {
  color: #111827 !important;
}

.notion-merch-widget__banner {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 180px;
  height: 5.5rem;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 1rem 1.15rem;
  background: #e5d0d6;
  color: #111827 !important;
  filter: drop-shadow(3px 4px 0 #8f98c7);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
  align-items: center;
  justify-content: center;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
  clip-path: polygon(
    5% 12%,
    16% 9%,
    20% 0,
    31% 7%,
    43% 2%,
    53% 8%,
    66% 0,
    73% 9%,
    87% 5%,
    88% 16%,
    100% 21%,
    94% 34%,
    100% 47%,
    92% 56%,
    98% 70%,
    86% 74%,
    88% 88%,
    74% 85%,
    66% 100%,
    54% 92%,
    42% 98%,
    32% 91%,
    19% 97%,
    18% 85%,
    5% 83%,
    10% 68%,
    0 59%,
    8% 47%,
    1% 35%,
    10% 26%
  );
}

.notion-merch-widget p.notion-merch-widget__favorites-label {
  margin-bottom: 0.7rem !important;
  color: #000000;
  font-size: 0.95rem !important;
  font-weight: 700;
}

.notion-merch-widget__favorites {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.55rem;
}

.notion-merch-widget__favorite {
  display: grid;
  align-content: start;
  overflow: hidden;
  padding: 0.4rem;
  border: 1px solid #8f98c7;
  border-radius: 6px;
  background: #dce2ff;
  box-shadow: 3px 3px 0 rgba(53, 54, 92, 0.18);
  gap: 0.3rem;
  min-width: 0;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.05;
  text-decoration: none;
}

.notion-merch-widget__favorite:hover {
  transform: scale(1.03);
  transition: transform 0.2s ease;
  z-index: 1;
}

.notion-merch-widget__favorite img,
.notion-merch-widget__favorite-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  align-items: center;
  justify-items: center;
  border: 1px solid #cacaca;
  border-radius: 5px;
  background: #dce6ff;
  color: #6b7280;
  font-size: 1.6rem;
  object-fit: cover;
}

.notion-merch-widget__favorite span:last-child {
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 0.05rem 0.1rem 0.1rem;
}

.notion-merch-widget__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid #8f98c7;
  border-radius: 6px;
  background: #e3e5fb;
  color: #1f2937;
  font-size: 0.68rem;
}

.notion-merch-widget__summary h4 {
  margin: 0 0 0.4rem;
  color: #111827;
  font-size: 0.76rem;
}

.notion-merch-widget__bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(40px, 2fr) 2rem;
  align-items: center;
  gap: 0.35rem;
  margin: 0.3rem 0;
}

.notion-merch-widget__bar-row > span {
  color: #1f2937;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notion-merch-widget__bar-track {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 2px;
  background: #dce6ff;
}

.notion-merch-widget__bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6f7fa8;
}

.notion-merch-widget__bar-row strong {
  color: #111827;
  text-align: right;
}

.notion-merch-widget__sync {
  padding-top: 0.7rem;
  color: #374151 !important;
  font-size: 0.62rem !important;
  text-align: right;
}

.notion-merch-widget__error {
  color: #9b2c2c;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .notion-merch-widget__banner {
    top: 0;
    right: 0;
    width: 150px;
    height: 5.15rem;
    padding: 0.9rem 0.95rem;
  }

  .notion-merch-widget__favorites {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .notion-merch-widget__summary {
    grid-template-columns: 1fr;
  }
}
