/* Kabale for to: grøn filt som de andre kortspil. Bord, bjælke, knap og mørk tilstand kommer fra Solitaire.css; bjælke og beskeder fra kabale-kort.css */
:root { --roed: #C63F28; --kul: #1E2421; --guld: #E2B54A; }
body { background: var(--filt), var(--bord); color: var(--creme); font-variant-numeric: tabular-nums; }
button, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

#kk-bar { align-items: center; }
#kk-bar select {
  font: 600 15px/1.2 Poppins, system-ui, sans-serif; min-height: 44px; padding: 0 34px 0 14px; border: 1px solid rgba(252,247,238,.22); border-radius: 8px;
  background: var(--knap) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23FCF7EE' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--creme); cursor: pointer; -webkit-appearance: none; appearance: none;
}
#kk-bar select option { background: #FCF7EE; color: #1E2421; }
button:focus-visible, select:focus-visible { outline: 3px solid var(--creme); outline-offset: 2px; }
@media (max-width: 460px) {
  #kk-bar { gap: 5px; padding: 6px; flex-wrap: nowrap; }
  #kk-bar button, #kk-bar select { flex: 1 1 auto; min-width: 0; font-size: 14px; padding-left: 7px; padding-right: 7px; white-space: nowrap; }
  #kk-bar select { padding-right: 22px; background-position: right 7px center; }
}
body #kk-bar.sk-taet > select { flex: 1 1 40%; }

#bord { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
#bord > #baize { position: absolute; left: 0; top: 0; width: 100%; height: 100%; touch-action: none; }
#baize .kort { transition: transform var(--flyt, 300ms) ease-out, opacity 240ms ease-out; }
#baize .kort.traek { transition: none; }
#baize .kort.loeftet { filter: url(#skygge); }
#baize .kort[role=button] { cursor: pointer; }
#baize .kort.valgt > rect.spielkarte { stroke: var(--roed); stroke-width: 5; }
#baize .kort.tip > rect.spielkarte { stroke: var(--roed); stroke-width: 5; stroke-dasharray: 7 4; }
#baize .kort.mulig > rect { stroke: var(--guld); stroke-width: 5; }
#baize .kort:focus { outline: none; }
#baize .kort:focus-visible > rect { stroke: #8FC3E8; stroke-width: 5; }
#baize text { pointer-events: none; }
.plads { fill: rgba(13,21,16,.22); stroke: rgba(252,247,238,.35); stroke-width: 1.5; stroke-dasharray: 6 5; }
.plads.mulig { stroke: var(--guld); stroke-width: 3.5; stroke-dasharray: none; fill: rgba(226,181,74,.14); cursor: pointer; }
.plads.kastmulig { stroke: var(--creme); stroke-width: 2.5; stroke-dasharray: 5 4; cursor: pointer; }
.plads-tekst { font: 600 13px Poppins, system-ui, sans-serif; fill: var(--creme); opacity: .7; }
.maerke rect { fill: #1E2421; stroke: #FCF7EE; stroke-width: 1.5; }
.maerke text { font: 700 13px Poppins, system-ui, sans-serif; fill: #FCF7EE; }
.maerke.stak rect { fill: var(--roed); }
.joker rect { fill: var(--guld); stroke: #1E2421; stroke-width: 1.5; }
.joker text { font: 700 13px Poppins, system-ui, sans-serif; fill: #1E2421; }
.navn { font: 600 14px Poppins, system-ui, sans-serif; fill: var(--creme); }
.navn.tur { fill: var(--guld); }
.ramme { fill: none; stroke: transparent; stroke-width: 3; }
.ramme.tur { stroke: var(--guld); animation: puls 1.1s ease-in-out infinite; }
@keyframes puls { 50% { stroke-opacity: .25; } }

#status {
  position: absolute; left: 50%; transform: translateX(-50%); top: var(--status-y, 50%); width: max-content; max-width: calc(100% - 16px); box-sizing: border-box;
  padding: 3px 12px; border-radius: 14px; background: rgba(13,21,16,.6); font: 600 14px/1.3 Poppins, system-ui, sans-serif; text-align: center; pointer-events: none; z-index: 1;
}
#status:empty { display: none; }
#status.taenker::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: prikker 1.2s steps(4) infinite; }
@keyframes prikker { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

.rund {
  position: absolute; top: var(--knap-y, 80%); min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  font: 600 15px/1.2 Poppins, system-ui, sans-serif; border: 1px solid rgba(252,247,238,.22); background: var(--knap); color: var(--creme); z-index: 2;
}
.rund:disabled { opacity: .45; cursor: default; }
@media (max-width: 380px) { .rund { padding: 0 9px; } }

#kk-besked { width: max-content; max-width: min(calc(100vw - 24px), 460px); box-sizing: border-box; max-height: calc(100% - 24px); overflow-y: auto; }
#kk-besked p { margin: 0 0 6px; font-size: 15px; }
#kk-besked .knapper { display: flex; justify-content: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
#kk-besked .knapper button { margin: 0; }
#kk-besked button.primaer { background: var(--roed); color: var(--creme); }
.regel-tekst h3 { margin: 12px 0 4px; font: 600 16px Poppins, system-ui, sans-serif; }
.regel-tekst p, .regel-tekst li { font-size: 15px; }
.regel-tekst ul { margin: 0 0 8px; padding-left: 20px; }

@media (prefers-reduced-motion: reduce) { #baize .kort { transition: none; } .ramme.tur { animation: none; } #status.taenker::after { animation: none; content: '...'; } }
html.kabale-hk .rund { border: 2px solid var(--creme) !important; }
