/* Skládání balíčků jako v Hearthstonu: krabičky balíčků, úprava s albem a seznamem karet,
   řádky karet s cenou, jménem a výřezem obrázku. Na telefonu je seznam jako vysouvací lišta dole. */

/* Seznam balíčků */
.decks-note { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
.deck-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; padding-bottom: 20px; }
.deck-box { position: relative; aspect-ratio: .78; border-radius: 14px; cursor: pointer; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #4a1630, #20061a); box-shadow: inset 0 0 0 2px #c99a3c, inset 0 0 0 5px #2a0b1c, inset 0 0 0 6px rgba(255, 214, 128, .45), 0 10px 22px rgba(0, 0, 0, .5);
  transition: transform .15s; }
.deck-box:active { transform: scale(.97); }
@media (hover: hover) { .deck-box:hover { transform: translateY(-3px); } }
.box-art { position: absolute; inset: 7px 7px 34%; z-index: -1; border-radius: 9px 9px 4px 4px; background: linear-gradient(160deg, #6b2a5a, #2a0b1c) center 25% / cover;
  box-shadow: inset 0 -30px 30px rgba(20, 6, 16, .85); }
.box-plaque { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; gap: 3px; padding: 9px 8px; border-radius: 8px; text-align: center;
  background: linear-gradient(180deg, #f8eed2, #e0c992); box-shadow: 0 0 0 1.5px #a07a3c, 0 3px 8px rgba(0, 0, 0, .45); }
.box-plaque b { font: 800 13.5px/1.15 var(--font-display); color: #4a2c0a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-plaque small { font: 600 11.5px/1 var(--font-body); color: #7a5a2a; }
.box-use { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; font-size: 17px; line-height: 1;
  color: rgba(255, 255, 255, .55); background: rgba(10, 4, 20, .7); box-shadow: 0 0 0 1.5px rgba(255, 214, 128, .4); }
.box-use[aria-pressed="true"] { color: #2a1400; background: radial-gradient(circle at 35% 30%, #fff1b0, var(--gold) 55%, var(--gold-deep)); box-shadow: 0 0 14px rgba(255, 204, 77, .8); }
.deck-box.active { box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 5px #2a0b1c, inset 0 0 0 6px var(--gold), 0 0 22px rgba(255, 204, 77, .45), 0 10px 22px rgba(0, 0, 0, .5); }
.box-badge, .box-warn { position: absolute; top: 12px; left: 10px; padding: 4px 8px; border-radius: 999px; font: 800 10px/1 var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.box-badge { color: #2a1400; background: var(--gold); }
.box-warn { top: auto; bottom: 64px; left: 50%; transform: translateX(-50%); color: #fff; background: #b3263a; }
.deck-box.active .box-warn { bottom: 64px; }
.new-box { display: grid; place-content: center; justify-items: center; gap: 10px; padding: 12px; text-align: center; cursor: default;
  background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 2px rgba(255, 214, 128, .35); outline: 2px dashed rgba(255, 214, 128, .25); outline-offset: -10px; }
.new-plus { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font: 900 30px/1 var(--font-display); color: #2a1400;
  background: radial-gradient(circle at 35% 30%, #fff1b0, var(--gold) 55%, var(--gold-deep)); }
.new-box b { font: 800 14px/1 var(--font-display); color: #f3e3c0; }
.new-actions { display: grid; gap: 6px; }

/* Úprava balíčku: album vlevo, seznam karet vpravo */
#collection.editing .hub-inner { gap: 8px; }
.tab-deck:has(.deck-editor) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.deck-editor { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; }
.de-album { min-height: 0; display: flex; flex-direction: column; }
.de-side { min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px;
  background: linear-gradient(180deg, #3a1028, #1a0614); box-shadow: inset 0 0 0 1.5px rgba(255, 204, 77, .35), 0 12px 28px rgba(0, 0, 0, .5); }
.de-bar { display: none; }
.de-head { display: flex; align-items: center; gap: 6px; }
.de-name { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: #12040d; color: #f6e2b0;
  font: 800 16px/1 var(--font-display); box-shadow: inset 0 0 0 1.5px rgba(255, 204, 77, .45); }
.de-name:focus { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
.de-title { flex: 1; font: 800 16px/1.2 var(--font-display); color: #f6e2b0; padding: 8px 4px; }
.de-icon { width: 38px; height: 38px; border: 0; border-radius: 10px; cursor: pointer; background: rgba(255, 255, 255, .06); font-size: 16px; }
.de-tiles { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 2px; list-style: none; display: grid; align-content: start; gap: 3px; overscroll-behavior: contain; }
.de-empty { padding: 24px 10px; color: var(--muted); font-size: 13px; text-align: center; }
.de-tile { position: relative; width: 100%; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 0; border: 0; border-radius: 6px; cursor: pointer; overflow: hidden;
  background: #1d0a18; isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 128, .28), 0 2px 4px rgba(0, 0, 0, .4); color: #fff; transition: transform .12s, filter .12s; }
.de-art { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; z-index: -1; background: linear-gradient(90deg, #2a0b1c, #4a1630) right 0 top 30% / cover no-repeat; }
.de-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #1d0a18, rgba(29, 10, 24, .5) 45%, rgba(29, 10, 24, .1)); }
.de-tile.legend { box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 10px rgba(255, 204, 77, .25); }
@media (hover: hover) { .de-tile:hover { filter: brightness(1.2); transform: translateX(-3px); } }
.de-tile:active { transform: scale(.97); }
.de-tile.bump { animation: tile-bump .5s ease-out; }
@keyframes tile-bump { 0% { filter: brightness(2.2); transform: translateX(-10px); } 100% { filter: none; transform: none; } }
.de-cost { flex: 0 0 34px; height: 34px; display: grid; place-items: center; font: 900 16px/1 var(--font-display); color: #fff;
  background: linear-gradient(160deg, #ffe0f0, #ff5aa5 35%, var(--hot) 55%, #7a0038); clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
  -webkit-text-stroke: 3px #3a0018; paint-order: stroke fill; }
.de-tname { flex: 1; min-width: 0; text-align: left; font: 800 13px/1 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.de-n { flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 6px; font: 900 13px/1 var(--font-display); color: var(--gold);
  background: rgba(10, 4, 14, .85); box-shadow: inset 0 0 0 1px rgba(255, 204, 77, .5); }
.de-n:empty { visibility: hidden; }
.de-curve { justify-content: center; height: 58px; }
.de-curve i::before { height: calc(var(--h) * 32px + 2px); }
.de-foot { display: flex; align-items: center; gap: 6px; }
.de-foot .de-count { flex: 1; }
.de-count { font: 700 13px/1 var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; }
.de-count b { font-size: 20px; color: #fff; }
.deck-editor.full .de-count b { color: var(--ready); }
.btn.small { padding: 9px 13px; font-size: 13px; }
.deck-editor.readonly .de-album { opacity: .55; }

/* Album při skládání: kolik kopií zbývá, vyčerpané karty zešednou */
.album-count.left { color: #3a6a1e; }
.album-cell.used-up .card { filter: grayscale(.85) brightness(.7); }
.album-cell.used-up .album-count { color: #8a6a3a; font-size: 11px; }

/* Telefon: seznam karet je lišta dole, klepnutím se vysune */
@media (max-width: 759px) {
  .deck-editor { display: flex; flex-direction: column; gap: 0; padding-bottom: 62px; }
  .de-album { flex: 1; }
  .de-side { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; height: 56px; padding: 0 10px; gap: 0; overflow: hidden;
    transition: height .3s cubic-bezier(.2, .8, .2, 1); }
  .de-bar { display: flex; flex: 0 0 56px; align-items: center; gap: 10px; width: 100%; padding: 0 4px; border: 0; background: none; color: inherit; cursor: pointer; }
  .de-bar-name { flex: 1; min-width: 0; text-align: left; font: 800 15px/1 var(--font-display); color: #f6e2b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .de-bar i { font-style: normal; color: var(--gold); transition: transform .3s; }
  .deck-editor.sheet-open .de-side { height: 78%; padding-bottom: 10px; }
  .deck-editor.sheet-open .de-bar i { transform: rotate(180deg); }
  .deck-editor.sheet-open .de-side > :not(.de-bar) { margin-top: 8px; }
}

/* Jednoduché okno (potvrzení, přezdívka) */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(6, 2, 12, .78); animation: modal-in .2s ease-out; }
.modal.closing { opacity: 0; transition: opacity .18s; }
@keyframes modal-in { from { opacity: 0; } }
.modal-box { width: min(420px, 100%); display: grid; gap: 12px; padding: 22px 20px 18px; border-radius: 20px; text-align: center;
  background: linear-gradient(180deg, #2f0f26, #170612); box-shadow: inset 0 0 0 1.5px rgba(255, 204, 77, .5), 0 20px 50px rgba(0, 0, 0, .6); animation: modal-pop .25s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes modal-pop { from { transform: scale(.9); } }
.modal-box h3 { margin: 0; font: 900 20px/1.2 var(--font-display); color: var(--gold); }
.modal-box p { margin: 0; color: #e6d6ef; font-size: 14.5px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.nick-field { display: flex; align-items: center; gap: 12px; }
.nick-field img, .nick-field .avatar { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; object-fit: cover;
  background: var(--plum); box-shadow: 0 0 0 2px var(--gold); }
.nick-input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: #12040d; color: #fff; font: 700 17px/1 var(--font-body);
  box-shadow: inset 0 0 0 1.5px rgba(255, 204, 77, .5); user-select: text; -webkit-user-select: text; }
.nick-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
.nick-error { color: #ff9aa6 !important; font-size: 13px !important; }

/* Profil v nastavení */
.avatar-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.avatar-btn img, .avatar-btn .avatar { object-fit: cover; }
.avatar-btn i { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-style: normal; background: #1b1030; box-shadow: 0 0 0 1.5px var(--gold); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.chip img { object-fit: cover; }
