/* Merge Lab: quest cards, rewards, cooldowns and matching board items. */

.merge-shop-unread-dot {
  position: absolute;
  right: -1px;
  top: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e94747;
  box-shadow: 0 0 0 2px #fff,0 1px 4px rgba(140,34,34,.22);
  z-index: 20;
  pointer-events: none;
}

.merge-shop-unread-dot[hidden] {
  display: none !important;
}

.merge-quest-card {
  position: relative;
  width: 118px;
  min-width: 118px;
  height: 146px;
  flex: 0 0 118px;
  scroll-snap-align: start;
  background: transparent;
  z-index: 1;
}

.merge-quest-card[data-quest="6"] .merge-quest-image {
  width: 118px;
  min-width: 118px;
  height: 146px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
}

.merge-quest-character-crop {
  position: absolute;
  left: 0;
  top: 0;
  width: 78px;
  height: 100px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.merge-quest-character {
  position: absolute;
  left: 0;
  top: 0;
  width: 118px;
  height: 146px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.merge-quest-reward {
  position: absolute;
  right: 5px;
  top: 10px;
  width: 36px;
  height: 76px;
  border-radius: 18px;
  background: linear-gradient(180deg,#fff1c9 0%,#fff4d5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 20;
  box-shadow: inset 0 0 0 1px rgba(228,185,99,.22);
  pointer-events: none;
}

.merge-quest-reward img {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.merge-quest-reward strong {
  font: 700 15px/1 Arial,sans-serif;
  color: #4aa66b;
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
}

.merge-quest-card.has-quest-refresh .merge-quest-reward {
  top: 10px;
  height: 76px;
}

.merge-quest-refresh {
  position: absolute;
  right: -7px;
  bottom: -4px;
  z-index: 80;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 50%;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: #55be7d;
  color: #fff;
  box-shadow: 0 2px 5px rgba(44,119,78,.18);
  cursor: pointer;
  touch-action: manipulation;
}

.merge-quest-refresh svg {
  width: 8px;
  height: 8px;
  fill: currentColor;
}

.merge-quest-refresh:hover,
.merge-quest-refresh:focus-visible {
  filter: brightness(1.05);
}

.merge-quest-refresh:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(44,119,78,.16);
}

.merge-quest-action-error {
  margin-top: -8px !important;
  color: #bb4f4f !important;
  font-weight: 700 !important;
}

.merge-quest-claims {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 51px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 6px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(75,85,75,.06);
  z-index: 10;
}

.merge-quest-slot {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 39px;
  min-width: 32px;
  box-sizing: border-box;
  border: 1px solid rgba(120,130,140,.16);
  border-radius: 9px;
  pointer-events: none;
  display: grid;
  place-items: center;
  overflow: visible;
  background: #f0f1f2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.merge-quest-slot[hidden] {
  display: none !important;
}

.merge-quest-slot[data-item] {
  pointer-events: auto;
  cursor: pointer;
}

.merge-quest-slot[data-item]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.merge-quest-slot.is-match {
  background: #d9f7a8;
  border-color: rgba(132,190,75,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.merge-quest-slot.is-match[data-slot="1"] {
  z-index: 30;
}

.merge-quest-slot.is-match[data-slot="2"] {
  z-index: 20;
}

.merge-quest-slot.is-match[data-slot="3"] {
  z-index: 10;
}

.merge-quest-slot-art {
  display: block;
  width: 86%;
  height: 86%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.merge-quest-slot[data-item="laboratory:3"] .merge-quest-slot-art {
  width: 96%;
  height: 96%;
}

.merge-quest-slot[data-item="laboratory:6"] .merge-quest-slot-art {
  width: 94%;
  height: 94%;
}

.merge-quest-slot[data-item="laboratory:8"] .merge-quest-slot-art {
  width: 94%;
  height: 94%;
}

.merge-quest-slot[data-item="laboratory:9"] .merge-quest-slot-art {
  width: 90%;
  height: 90%;
}

.merge-quest-slot.is-match::after {
  content: "\2713";
  position: absolute;
  right: -5px;
  top: -7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2dbb58;
  color: #fff;
  font: 700 12px/1 Arial,sans-serif;
  box-shadow: 0 0 0 2px #fff;
  z-index: 100;
}

.merge-cell.is-quest-match,
.merge-cell.is-quest-match:hover,
.merge-cell.is-quest-match:focus,
.merge-cell.is-quest-match:focus-visible,
.merge-cell.is-quest-match:active {
  background: #d9f7a8 !important;
  box-shadow: inset 0 0 0 1px rgba(132,190,75,.35) !important;
}

.merge-quest-submit {
  position: absolute;
  left: 6px;
  top: 50%;
  z-index: 40;
  min-width: 54px;
  height: 18px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: #2dbb58;
  color: #fff;
  font: 700 10px/18px Arial,sans-serif;
  box-shadow: 0 2px 5px rgba(31,122,85,.22);
  cursor: pointer;
  display: none;
  white-space: nowrap;
}

.merge-quest-card.is-ready .merge-quest-submit {
  display: block;
}

.merge-quest-card.is-cooling-down .merge-quest-claims,
.merge-quest-card.is-cooling-down .merge-quest-submit {
  display: none !important;
}

.merge-quest-cooldown {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 51px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}

.merge-quest-card.is-cooling-down .merge-quest-cooldown {
  display: flex;
}

.merge-quest-cooldown[hidden] {
  display: none !important;
}

.merge-quest-cooldown-plaque {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 3px solid #8f877e;
  border-radius: 15px;
  background: linear-gradient(180deg,#e7e4df 0%,#d2cec8 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.46),inset 0 2px 0 rgba(255,255,255,.55),0 3px 0 rgba(102,94,86,.14),0 6px 12px rgba(78,72,66,.12);
}

.merge-quest-cooldown-plaque::before,
.merge-quest-cooldown-plaque::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(112,105,98,.16);
}

.merge-quest-cooldown-plaque::before {
  top: 50%;
  transform: translateY(-8px);
}

.merge-quest-cooldown-plaque::after {
  top: 50%;
  transform: translateY(8px);
}

.merge-quest-cooldown-rivet {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(101,96,91,.5);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%,#ffffff 0 18%,#d9d7d3 24% 50%,#8e8a85 72% 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8),0 1px 2px rgba(72,68,64,.18);
}

.merge-quest-cooldown-rivet-tl {
  left: 8px;
  top: 7px;
}

.merge-quest-cooldown-rivet-tr {
  right: 8px;
  top: 7px;
}

.merge-quest-cooldown-rivet-bl {
  left: 8px;
  bottom: 7px;
}

.merge-quest-cooldown-rivet-br {
  right: 8px;
  bottom: 7px;
}

.merge-quest-cooldown-timer {
  display: block;
  color: #5e5750;
  font: 900 11px/1 ui-rounded,"Trebuchet MS","Comic Sans MS","Segoe UI",system-ui,sans-serif;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(255,255,255,.72);
}

.merge-quest-submit:hover {
  filter: brightness(1.04);
}

.merge-quest-submit:active {
  transform: scale(.97);
  transform-origin: left center;
}
