/* AGENT_TARGET: sticker-scrapbook-styles — modal, grid, slot hover for sticker scrapbook */

.sticker-book-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #e880a0;
  background: linear-gradient(135deg, #fff0f8 0%, #ffe8f4 100%);
  color: #d44080;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin: 4px 4px 0;
  transition:
    background 0.2s,
    transform 0.15s;
}
.sticker-book-btn:hover,
.sticker-book-btn:focus-visible {
  background: linear-gradient(135deg, #ffd6ee 0%, #ffc8e8 100%);
  transform: scale(1.04);
  outline: none;
}
.hud-action-grid .sticker-book-btn {
  display: grid;
  margin: 0;
  padding: 8px 9px;
  border-radius: 12px;
  color: #6b2247;
  font:
    900 13px/1.05 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.hud-action-grid .sticker-book-btn:hover,
.hud-action-grid .sticker-book-btn:focus-visible {
  transform: none;
}

/* Modal overlay */
.scrapbook-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scrapbook-modal[hidden] {
  display: none;
}

.scrapbook-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 10, 30, 0.55);
  backdrop-filter: blur(3px);
}

.scrapbook-card {
  position: relative;
  background: linear-gradient(160deg, #fff8f0 0%, #ffeef8 50%, #f8e8ff 100%);
  border: 3px solid #e880a0;
  border-radius: 24px;
  padding: 28px 24px 24px;
  width: min(92vw, 560px);
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(200, 60, 120, 0.3);
  text-align: center;
}

.scrapbook-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #c06080;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.scrapbook-close:hover {
  color: #d44080;
}

.scrapbook-title-emoji {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 6px;
}
.scrapbook-title {
  margin: 0 0 4px;
  font-size: 1.4rem;
  color: #c03878;
}
.scrapbook-subtitle {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: #9060a0;
}

.scrapbook-count-row {
  margin: 8px 0 16px;
}
.scrapbook-count {
  display: inline-block;
  background: #ffe0f0;
  border: 2px solid #e880a0;
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #c03878;
}

/* Sticker grid */
.scrapbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
  justify-items: center;
}

.scrapbook-slot {
  position: relative;
  width: 110px;
  background: #fff0fa;
  border: 2px solid #e8a0c8;
  border-radius: 16px;
  padding: 14px 8px 10px;
  cursor: default;
  color: inherit;
  font: inherit;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
  overflow: visible;
}
.scrapbook-slot.earned {
  background: linear-gradient(135deg, #fff0f8 0%, #ffe0f0 100%);
  border-color: #e060a8;
  box-shadow: 0 2px 10px rgba(220, 80, 160, 0.18);
}
.scrapbook-slot.locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.scrapbook-slot.earned:hover,
.scrapbook-slot.earned:focus-visible {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(220, 80, 160, 0.3);
  outline: 3px solid rgba(192, 56, 120, 0.25);
  outline-offset: 3px;
  z-index: 2;
}
.scrapbook-slot:disabled {
  cursor: not-allowed;
}

.sticker-emoji {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 6px;
}
.sticker-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #c03878;
  line-height: 1.2;
  min-height: 2.4em;
}
.sticker-evidence {
  color: #7a3a86;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.22;
  margin-top: 6px;
  min-height: 3.6em;
}
.scrapbook-slot.locked .sticker-evidence {
  color: #8a6a90;
}

/* Hover tooltip */
.sticker-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #3a1040;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: normal;
  width: 180px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 20;
}
.sticker-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #3a1040;
}
.scrapbook-slot:hover .sticker-tooltip,
.scrapbook-slot:focus-visible .sticker-tooltip {
  display: block;
}

@media (max-width: 430px) {
  .scrapbook-card {
    padding: 24px 14px 20px;
  }
  .scrapbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .scrapbook-slot {
    width: min(138px, 100%);
    min-height: 150px;
  }
}
