﻿/* Fullscreen, oversized, rotated 🎾 pattern */
.bg-emoji-fixed {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 300vmax;
    height: 300vmax;
    transform: translate(-50%, -50%) rotate(-15deg);
    transform-origin: center;
    z-index: -1;
    pointer-events: none;
    opacity: .12;
    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96'>\
  <text x='50%' y='50%' dominant-baseline='middle' text-anchor='middle' font-size='48'>🎾</text>\
</svg>");
    background-size: 96px 96px;
    background-repeat: repeat;
    background-position: center;
    will-change: transform;
    backface-visibility: hidden;
}

.court {
    position: relative;
    background: url('/padel.png') center/cover no-repeat; /* swap per court if needed */
    border-radius: 14px;
    aspect-ratio: 1.6;
    overflow: hidden;
}

.court-grid {
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    padding: 18px 22px;
}

.grid-top-left {
    grid-row: 1;
    grid-column: 1;
    align-self: self-end;
    justify-self: center;
}

.grid-top-right {
    grid-row: 1;
    grid-column: 2;
    align-self: self-end;
    justify-self: center;
}

.grid-mid-left {
    grid-row: 2;
    grid-column: 1;
    align-self: center;
    justify-self: center;
}

.grid-mid-right {
    grid-row: 2;
    grid-column: 2;
    align-self: center;
    justify-self: center;
}

.grid-bot-left {
    grid-row: 3;
    grid-column: 1;
    align-self: self-start;
    justify-self: center;
}

.grid-bot-right {
    grid-row: 3;
    grid-column: 2;
    align-self: self-start;
    justify-self: center;
}

.stack {
    display: grid;
    gap: 6px;
}

.pill {
    padding: 8px 20px;
    border-radius: 999px;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    margin: 6px 0;
}

.pill-dark {
    color: #fff;
    background: rgba(23,32,42,.9);
}

.pill-sm {
    padding: 6px 14px;
    min-width: 120px;
}

.disc {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #d9d9d9;
    color: #2b2b2b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 26px;
    border: 2px solid rgba(0,0,0,.2);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
}

.kb-capture {
    outline: none;
}

/* Card-like frame inside the modal */
.history-wrap {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.08);
    overflow: hidden;
}

/* Sticky, clean header */
.history-table thead.bg-header th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bs-light);
    border-bottom: 1px solid var(--bs-border-color);
    white-space: nowrap;
}

/* Tight column widths */
.col-pos {
    width: 64px;
}

.col-total {
    width: 96px;
}

/* Numbers look better monospaced */
.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Make striped rows a bit softer */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(var(--bs-primary-rgb), .02);
}
.court-imgwrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.court-img {
    display: block;
    width: 100%;
    height: auto;
}
/* no cropping, respects real ratio */
.court-overlay {
    position: absolute;
    inset: 0;
}

.modal-dialog   {
    max-width: 90vw !important;
}