/* Card-link and card-image styles carried over from the original site. */
.mtg_deck_title {
  text-decoration: underline;
}

table.mtg_deck {
  width: 100%;
  max-width: 510px;
  margin: 10px;
  text-align: left;
}

table.mtg_deck td {
  vertical-align: top;
  padding: 5px 2px;
  vertical-align: top;
}

table.mtg_deck td.card_box img {
  max-height: 310px !important;
  max-width: 310px !important;
  border-radius: 4.75% / 3.5%;
}

.card-link:has(img) {
  display: block;
  width: fit-content;
  margin: 10px auto;
}

.card-link img {
  display: block;
  max-height: 310px !important;
  max-width: 310px !important;
  border-radius: 4.75% / 3.5%;
}

.scryfall_hover-zoom { transition: transform .2s; width: 200px; position: relative; z-index: 10; }
.scryfall_hover-zoom:hover { transform: scale(1.5); z-index: 100; }
.scryfall_hover-zoom--container { position: relative; }

.clickable { cursor: pointer; }

.scryfall_hover_img a { position:relative; display: inline-block; }
.scryfall_hover_img a span { position:absolute; display:none; z-index:99;}
.scryfall_hover_img a:hover span { display:block; width: 200px; }

.scryfall_card-hover-size{ width: 250px; }

.mtg_utils_cardpack{ display:table-cell; vertical-align:middle; text-align:center; }
/* The card picture shown beside the pointer over a card name (assets/js/card-hover.js): the original printing
   from Scryfall, at a readable size, with a card's rounded corners. */
.card-hover {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  width: 244px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}
.card-hover.is-shown {
  opacity: 1;
}
.card-hover img {
  display: block;
  width: 244px;
  height: auto;
  aspect-ratio: 488 / 680;
  border-radius: 4.75% / 3.5%;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.45);
  background-color: #1a1a1a;
}

/* Card names (lib/mtg-shortcodes.js): not links, but they show the card when pointed at, so they read as the
   link purple with a dotted underline. */
.card-link[data-card-img] {
  color: var(--link);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: default;
}
.card-link[data-card-img]:hover,
.card-link[data-card-img]:focus-visible {
  color: var(--link-hover);
}
