@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  input {
    @apply ring-0 focus:ring-0 border-none focus:border-none;
  }
}

.action-row-content {
  overflow-wrap: break-word;
  text-align: right;
  max-width: 95%;
  min-width: 2.5rem;
  font-size: var(--text-fit-size, 1.125rem);
  text-wrap: balance;
}

/* right-aligned text shifts the whole string left with every keystroke,
   since it's anchored to the right edge — left-align while actively
   editing so typing feels normal, and only right-align once you click away */
.action-row-content:focus {
  text-align: left;
}

/* the min-width above exists to protect an icon-only column from being
   squeezed below what its icon needs, but it forces every column to that
   same box regardless of how little content it holds — for a short trailing
   column that leaves unused width inside its own box, which is invisible
   while focused (left-aligned, hugs the separator) but opens up as a gap
   once blurred (right-aligned, so the empty space moves to the left edge,
   between the separator and the content). Trailing columns (created by the
   arrow button — usually short text or an icon chip) get sized to their own
   content instead, so there's no leftover box to reveal on blur. The first
   column keeps the min-width/shrinkable sizing above: it's the one that
   might carry long, wrappable text, and width:fit-content there would size
   off the unwrapped single-line content instead of the wrapped box */
.action-row-content:not(:first-child) {
  min-width: 0;
  width: fit-content;
  flex-shrink: 0;
}

.action-row-separator {
  font-family: inherit;
  padding-left: 1px;
  padding-right: 1px;
}

.action-text-content,
.action-text-content * {
  font-size: var(--text-fit-size, 1.25rem) !important;
}

.action-title-content {
  font-size: var(--text-fit-size, 1.875rem);
  line-height: 1.2;
}

@layer components {
  .config-btn {
    @apply font-head text-white opacity-80 hover:opacity-100 hover:text-red cursor-pointer px-2 py-1 border border-white rounded text-3xl;
  }

  .config-label {
    @apply font-head text-white text-3xl;
  }

  .config-toggle {
    @apply font-head text-white text-3xl flex items-center gap-4;
  }

  .config-effect-option {
    @apply cursor-pointer rounded border border-white/20 hover:border-red p-2 flex items-center justify-center;
  }

  .config-option {
    @apply opacity-50 hover:text-red cursor-pointer;
  }

  .config-link {
    @apply font-head text-white opacity-80 hover:opacity-100 hover:text-red cursor-pointer;
  }
}

* {
  -webkit-print-color-adjust: exact !important;
  color-adjust: exact !important;
}

@font-face {
  font-family: 'dropdead';
  src: url(/assets/Hanoded-DropDeadGorgeous-920b73e7fd5f82c4160fd6e7a288deb790fedf549317d8d9b23fd8b574d05dd9.woff) format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'futura';
  src: url(/assets/FuturaStd-Condensed-e027dce3ecb436695086295e5c7016da45d93f63f238fb31b8307d35d9725d93.woff) format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'futurabold';
  src: url(/assets/FuturaStd-CondensedBold-483acd19f14b1198b37523f6b65c6fc79b5e03789c5654d67a35d2b948e49282.woff) format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
  background-image: url(/assets/grunge_wall_light-5d1d5bd101f7f0e7bc43e24ea6e0ddecec6cc25e8b3d7fd83ceadfc5cf29397d.png);
}

.bg-wall-light {
  background-image: url(/assets/grunge_wall_light-5d1d5bd101f7f0e7bc43e24ea6e0ddecec6cc25e8b3d7fd83ceadfc5cf29397d.png);
}

.card {
  overflow: hidden;
  position: relative;
  border-radius: 0.5rem;
  height: 408px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 1);
}

.action-front .flavor {
  height: 110px;
}

.action-front .flavor.flavor-limit-reached {
  box-shadow: 0 0 0 2px var(--color-red, #FC0100);
}

.card.front {
  background-image: url(/assets/bg_front-1f07b83302339f5b2d8656adf9186f4eaf2ccf0c745897750e8aeb5fa3151c45.png);
}

.card.back {
  background-image: url(/assets/bg_back-033cf80402f116bd215dacd28d290675c63a9c3e779a346cb98253abe1fa1e04.png);
}

.card.eventFront {
  background-size: cover;
  background-image: url(/assets/eventTextbg-normal-68f10142210f4d32442f8d88984ed2b660104213e5b4d9a5ab86d7e886f3feb5.png);
}

card.eventTextbg-normal {
  background-image: url(/assets/eventTextbg-normal-68f10142210f4d32442f8d88984ed2b660104213e5b4d9a5ab86d7e886f3feb5.png);
}

card.eventTextbg-large {
  background-image: url(/assets/eventTextbg-large-484889f5277b47a0a86761571d0e13ceee687487dbe5aecc8fad7d658d089575.png);
}

.card.eventBack {
  background-size: cover;
  background-image: url(/assets/bg_eventBack-6f7cd6e754b3a38b904c9439409d2530dc64a30e80512d50dafac8fa30f47333.png);
}

.card.item-front, .card.action-front, .card.action-back, .card.action-front {
  background-size: cover;
}

.card.action-type-action {
  background-image: url(/assets/bg_front-1f07b83302339f5b2d8656adf9186f4eaf2ccf0c745897750e8aeb5fa3151c45.png);
}

.card.action-type-reaction {
  background-image: url(/assets/bg_reaction_front-4e81b1733a9337fb4bda6e3e68ed203f96a24781095adc06a20095b31fe9007f.png);
}


.card.action-no-horror {
  background-image: url(/assets/bg_action_no_horror-a187da67027af1f4555f93db212625a5cd62aa5caef2b3495d7a2b03d4193464.png);
}

.card.action-back {
  background-image: url(/assets/bg_action_back-2a2e1afb3d4c9c2e1ab83c1fd842bb43d87d4994fe047eb711bcae40abbaefa7.png);
}

.card.textbg-image-none {
  background-image: url(/assets/bg_item-front-none-f830e74741f473705df0ea82b67d3f8a0416d8f18b5addf09324801e9d9745d8.png);
}

.card.textbg-image-small {
  background-image: url(/assets/bg_item-front-small-a1b8dbbe56f3b3eefb7ea8c669a90e193ce37f4e9674c0db8b0c7dfb0b01b787.png);
}

.card.textbg-image-medium {
  background-image: url(/assets/bg_item-front-medium-a81cabbb04014d2fe2248045436c73e5a230d21cdee0c86413f886bdeb06c945.png);
}

.card.textbg-image-large {
  background-image: url(/assets/bg_item-front-large-ecd80546606a12c92c3f85ecc2fe07f2a22fdbe7ea9d2b1725cc80ddfe3ffd75.png);
}

.card.item-back {
  background-image: url(/assets/bg_item-back-e0c295d19232491f011bc75d23e3088744aa52a07ace3fc671fa2cb3b4108e52.png);
  background-size: cover;
}

.card__image, .item__image {
  filter: drop-shadow(-10px 40px 35px #000);
}

.card.item {
  width: 332px;
  height: 524px;
}

.card.action {
  width: 332px;
  height: 524px;
}

.card.horizontal {
  width: 524px;
  height: 332px;
}

.card.event_name {
  background-image: url(/assets/red_line-85c233bf9ff49459c11dc5542565e213f0be7db3b3c8a1954f6412b3ad7a1a71.png);
  margin-top: 10px;
}

.card.eventLocation {
  top: 174px;
  left: 216px;
}

.item__image {
  top: 117px;
  left: 80px;
}

.item-pill {
  border: 2px solid black;
  border-left: none;
}

.config-input {
  background-color: #f7fafc;
  border-color: #e2e8f0;
  color: #4a5568;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.05);
}

.icon__health {
  position: absolute;
  width: 50px;
  top: 11px;
  left: 35px;
  z-index: 0;
}

img {
  display: block;
  max-width: 100%;
}

.ability {
  bottom: 50px;
  height: 260px;
}

.redline {
  position: absolute;
  max-width: 450px;
  top: 67px;
  right: 0;
  opacity: 0.7;
}

.card.with-redline .redline {
  max-width: 100%;
  top: 50px;
}

.title-underline {
  background-image: url(/assets/red_line-85c233bf9ff49459c11dc5542565e213f0be7db3b3c8a1954f6412b3ad7a1a71.png);
  background-position-y: bottom;
  background-repeat: no-repeat;
}

.title-underline-thin {
  background-image: url(/assets/red_line-85c233bf9ff49459c11dc5542565e213f0be7db3b3c8a1954f6412b3ad7a1a71.png);
  background-position-y: bottom;
  background-repeat: no-repeat;
  background-size: 100% 30%;
}

#event_ability {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#event_discard {
  position: bottom;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#item_ability {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.textbg-image-small #item_ability {
  bottom: 75px;
  height: 80px;
}

.textbg-image-medium #item_ability {
  bottom: 46px;
  height: 140px;
}

.textbg-image-large #item_ability {
  bottom: 40px;
  height: 230px;
}

.uses {
  z-index: 0;
  flex-flow: wrap-reverse;
}

.uses.bg-sm {
  bottom: 150px;
}

.uses.bg-md {
  bottom: 195px;
}

.uses.bg-lg {
  bottom: 268px;
}

@media print {
  body {
    background-image: none;
  }

  .print-hidden {
    display: none !important;
    visibility: hidden !important;
  }

  .card {
    box-shadow: none;
    height: 238px !important;
    width: 336px !important;
    background-size: 336px 238px;
  }

  .card__image {
    width: 178px !important;
    height: 238px !important;
  }

  .card.item {
    box-shadow: none;
    width: 166px !important;
    height: 261px !important;
    background-size: 166px 261px;
  }

  .card.action {
    box-shadow: none;
    width: 240px !important;
    height: 336px !important;
    background-size: 240px 336px;
  }

  .card.horizontal {
    box-shadow: none;
    width: 336px !important;
    height: 238px !important;
    background-size: 336px 238px;
  }

  .item__image {
    width: 55px;
    height: 72px;
    top: 68px;
    left: 55px;
  }

  .event.card.back {
    background-size: 261px 166px;
  }

  .girl .redline { top: 46px; }
  .item .redline { top: 30px; }
  .card.with-redline .redline { top: 30px; }

  .uses.bg-sm { bottom: 75px; }
  .uses.bg-md { bottom: 95px; }
  .uses.bg-lg { bottom: 132px; }

  .textbg-image-small #item_ability  { bottom: 38px; height: 40px; }
  .textbg-image-medium #item_ability { bottom: 18px; height: 80px; }
  .textbg-image-large #item_ability  { bottom: 18px; height: 120px; }

  .flavor { font-size: 0.5rem; }
  .action-front .flavor { height: 96px; }

  .card .mt-12 { margin-top: 1rem; }
  .card .mt-10 { margin-top: 2rem; }
  .card .pb-6  { padding-bottom: 0.25rem; }
  .card .pb-4  { padding-bottom: 0.5rem; }
  .card .pb-2  { padding-bottom: 0; }
  .card .title-underline.pb-2 { padding-bottom: 0.5rem; }
  .card .title-underline-thin.pb-2 { padding-bottom: 0.15rem; }
  .card .pt-0  { padding-top: 0; }
  .card.pt-4   { padding-top: 0.625rem; }

  .action-rows-grid {
    padding-left: 0;
    padding-right: 0;
    gap: 0.25rem;
    margin-top: 0;
  }

  .action-rows-grid > div {
    min-height: 0;
    overflow: hidden;
    gap: 0.15rem;
  }

  .action-rows {
    margin-top: 1.75rem;
  }

  .card:has(.action-row4.flex) .action-rows {
    margin-top: 0.5rem;
  }

  .action-row4 {
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding-right: 0;
    padding-left: 0;
    gap: 0.15rem;
  }

  .action-row4 .w-20 { width: 61.9px; }

  .action-row-inner {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }

  .action-row-stars {
    width: 2.5rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .action-row-stars span { font-size: 0.55rem; }

  .action-title-content {
    font-size: calc(var(--text-fit-size, 1.875rem) * 0.72) !important;
  }

  .action-row-content {
    font-size: calc(var(--text-fit-size, 1.125rem) * 0.85) !important;
    line-height: 1.1 !important;
    padding: 0 0.05rem;
    min-width: 2.125rem;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .action-row-content:not(:first-child) {
    min-width: 0;
    width: fit-content;
    flex-shrink: 0;
  }

  .action-row-content img {
    height: 1.1em !important;
    width: auto !important;
  }

  .action-row-separator {
    font-size: calc(var(--text-fit-size, 1.125rem) * 0.35) !important;
    margin-left: 0.15rem;
    margin-right: 0.15rem;
    padding-left: 0;
    padding-right: 0;
  }

  .action-text.invisible {
    display: none;
  }

  .action-text {
    margin-bottom: 0;
  }

  .action-text-content,
  .action-text-content * {
    font-size: calc(var(--text-fit-size, 1.25rem) * 0.55) !important;
    line-height: 1.4 !important;
  }

  .action-text-content img { height: 0.6rem; }
}

/* fake links (event config) */
input[type="radio"] {
  display: none;
}

label {
  color: white;
  opacity: 0.5;
}

input[type="radio"]:checked+label {
  color: red;
  opacity: 0.5;
}

label:hover {
  color: red;
  cursor: pointer;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
