/* Respawn Now - IGDB TCG Card (Button + Modal + Card)
   Single source of truth: keep ONLY this file as assets/card.css
*/

/* -------------------------
   Button
-------------------------- */
.rn-tcg-card__wrapper {
	margin: 1rem 0;
  }
  
  .rn-tcg-card__open-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	padding: .55rem 1rem;
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .2px;
	color: rgba(20, 16, 6, .92);
	background: linear-gradient(180deg, #ffe08a 0%, #d6a63a 60%, #b3872a 100%);
	border: 1px solid rgba(0, 0, 0, .25);
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
	transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  }
  
  .rn-tcg-card__open-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
	filter: saturate(1.05);
  }
  
  .rn-tcg-card__open-btn:focus {
	outline: 2px solid #ffe08a;
	outline-offset: 2px;
  }
  
  /* -------------------------
	 Modal Layout
  -------------------------- */
  .rn-tcg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 22px 14px;
	box-sizing: border-box;
  }
  
  .rn-tcg-modal[aria-hidden="true"],
  .rn-tcg-modal[hidden] {
	display: none !important;
  }
  
  .rn-tcg-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .68);
	backdrop-filter: blur(3px);
	cursor: pointer;
  }
  
  .rn-tcg-modal__panel {
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	/* IMPORTANT: do not introduce panel scrollbars */
	overflow: visible;
	border-radius: 22px;
	padding: 10px;
	box-shadow: 0 32px 70px rgba(0, 0, 0, .55);
  }
  
  .rn-tcg-modal__close {
	position: absolute;
	top: -10px;
	right: -10px;
	z-index: 3;
  
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
  
	padding: 0;
	font-size: 22px;
	line-height: 1;
  
	color: rgba(255, 255, 255, .92);
	background: rgba(12, 12, 14, .78);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 999px;
	cursor: pointer;
  
	box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
	transition: transform .12s ease, background .12s ease;
  }
  
  .rn-tcg-modal__close:hover {
	transform: translateY(-1px);
	background: rgba(12, 12, 14, .92);
  }
  
  .rn-tcg-modal__close:focus {
	outline: 2px solid #ffe08a;
	outline-offset: 2px;
  }
  
  .rn-tcg-modal__body {
	padding: 0;
  }
  
  /* -------------------------
	 Card (MTG-ish frame vibe)
  -------------------------- */
  .rn-tcg-card {
	width: 100%;
	/* Fit inside viewport without forcing scrollbars */
	max-height: calc(100vh - 60px);
	border-radius: 22px;
	overflow: hidden;
	box-sizing: border-box;
  
	/* Outer frame */
	background: linear-gradient(180deg, #0f0f12 0%, #101015 100%);
	border: 1px solid rgba(255, 255, 255, .10);
	box-shadow: 0 18px 48px rgba(0, 0, 0, .40);
  }
  
  /* Shell = inner frame with “bevel” and subtle texture */
  .rn-tcg-card__shell {
	padding: 14px;
	background:
	  radial-gradient(1200px 500px at 20% 0%, rgba(255, 217, 102, .10), rgba(0, 0, 0, 0) 60%),
	  radial-gradient(900px 400px at 80% 12%, rgba(122, 255, 210, .06), rgba(0, 0, 0, 0) 55%),
	  linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
	border-radius: 22px;
	position: relative;
  }
  
  /* Inner border line like a card frame */
  .rn-tcg-card__shell::before {
	content: "";
	position: absolute;
	inset: 10px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, .10);
	pointer-events: none;
  }
  
  .rn-tcg-card__header {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 10px 10px 10px;
	border-radius: 16px;
  
	background:
	  linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
	border: 1px solid rgba(255, 255, 255, .10);
	box-shadow:
	  inset 0 1px 0 rgba(255, 255, 255, .08),
	  0 10px 24px rgba(0, 0, 0, .20);
  }
  
  .rn-tcg-card__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: .2px;
	color: rgba(255, 255, 255, .96);
  
	/* prevent giant titles from blowing layout */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
  }
  
  .rn-tcg-card__badge {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	font-weight: 900;
	font-size: 12px;
	letter-spacing: .6px;
	color: rgba(16, 12, 4, .92);
  
	background: linear-gradient(180deg, #ffe08a 0%, #d6a63a 60%, #b3872a 100%);
	border: 1px solid rgba(0, 0, 0, .25);
	box-shadow:
	  inset 0 1px 0 rgba(255, 255, 255, .25),
	  0 12px 24px rgba(0, 0, 0, .25);
	flex: 0 0 auto;
  }
  
  /* Art block: looks like printed frame */
  .rn-tcg-card__art {
	margin-top: 12px;
	border-radius: 16px;
	overflow: hidden;
  
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .10);
	box-shadow:
	  inset 0 1px 0 rgba(255, 255, 255, .08),
	  0 14px 30px rgba(0, 0, 0, .22);
  }
  
  .rn-tcg-card__art img {
	width: 100%;
	display: block;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transform: translateZ(0);
  }
  
  /* Meta panel: crisp, tight, no ugliness */
  .rn-tcg-card__meta {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 16px;
	background:
	  linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
	border: 1px solid rgba(255, 255, 255, .10);
	box-shadow:
	  inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  
  .rn-tcg-card__meta-row {
	display: grid;
	grid-template-columns: 118px 1fr;
	gap: 10px;
	padding: 7px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  
  .rn-tcg-card__meta-row:last-child {
	border-bottom: 0;
  }
  
  .rn-tcg-card__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .2px;
	color: rgba(255, 255, 255, .68);
  }
  
  .rn-tcg-card__value {
	font-size: 12px;
	color: rgba(255, 255, 255, .92);
  }
  
  .rn-tcg-card__meta-row--chips {
	align-items: start;
  }
  
  .rn-tcg-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	margin: 0;
	padding: 0;
	list-style: none;
  }
  
  .rn-tcg-card__chips li {
	margin: 0;
  }
  
  .rn-tcg-card__chip {
	display: inline-flex;
	align-items: center;
	padding: .22em .62em;
	font-size: 12px;
	line-height: 1.2;
	font-weight: 700;
  
	border-radius: 999px;
	white-space: nowrap;
  
	color: rgba(255, 255, 255, .92);
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .10);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  }
  
  /* Text blocks: clamp instead of scroll */
  .rn-tcg-card__text,
  .rn-tcg-card__storyline {
	margin-top: 12px;
	padding: 12px 12px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, .10);
	background:
	  linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  
  .rn-tcg-card__summary,
  .rn-tcg-card__storyline-content {
	margin: 0;
	color: rgba(255, 255, 255, .90);
	font-size: 13px;
	line-height: 1.5;
  
	/* Avoid scroll: clamp lines */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
  }
  
  .rn-tcg-card__summary {
	-webkit-line-clamp: 7;
  }
  
  .rn-tcg-card__storyline-content {
	color: rgba(255, 255, 255, .82);
	font-size: 12.5px;
	-webkit-line-clamp: 6;
  }
  
  /* Footer */
  .rn-tcg-card__footer {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, .10);
  }
  
  .rn-tcg-card__scores {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
  }
  
  .rn-tcg-score {
	font-size: 12px;
	font-weight: 800;
	color: rgba(255, 255, 255, .90);
  
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .10);
	padding: 6px 10px;
	border-radius: 999px;
  
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  }
  
  .rn-tcg-score--rn {
	background: rgba(255, 217, 102, .10);
	border-color: rgba(255, 217, 102, .22);
	color: rgba(255, 245, 215, .92);
  }
  
  .rn-tcg-card__legal {
	margin-top: 10px;
	font-size: 11px;
	color: rgba(255, 255, 255, .55);
  }
  
  /* Responsive tweaks */
  @media (max-width: 520px) {
	.rn-tcg-modal__panel {
	  padding: 8px;
	}
  
	.rn-tcg-card__shell {
	  padding: 12px;
	}
  }
  
  @media (max-width: 420px) {
	.rn-tcg-card__meta-row {
	  grid-template-columns: 1fr;
	  gap: 6px;
	}
  }