
@font-face {
    font-family: 'BBC-Ceefax';
    src: url('../fonts/bbc-ceefax-logo.otf.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
html, body {
    height: 100%;
    margin: 0;
}

.mud-layout {
    min-height: 100vh;
    background-color: var(--mud-palette-background);
}

.fixture-line {
    display: grid;
    grid-template-columns: 1fr 30px  2.5rem 1rem 2.5rem 30px 1fr;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.fixture-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0.75rem;
}

.fixture-info {
    font-size: smaller;
    text-align: center;
    margin-top: 0.5rem;
}

.home-name {
    text-align: right;
}

.away-name {
    text-align: left;
}

.hyphen {
    text-align: center;
}

.team-name {
    white-space: normal;
    padding: 0 0.5rem;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.ceefax-logo
{
    display: flex;
    gap: 0.5em;
    margin: 0;
    padding: 0;

    /* uppercase everything */
    text-transform: uppercase;
}

.ceefax-logo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    font-size: calc( var(--mud-appbar-height) - 24px);
    line-height: 1;
    -webkit-font-smoothing: none;
    text-rendering: geometricPrecision;

    border: 4px solid #000;
    background: #fff;
    color: #000;
    padding: 0.2em;

    /* ensure the spans inherit the uppercase */
    text-transform: inherit;
}

.score-input {
    width: 2.5rem;
}

.score-input input {
    text-align: center;
}

.bottom-buttons {
    flex-direction: row;
}

#pongOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#pongOverlay canvas {
    background: #000;
    touch-action: none;
}

#pongScore {
    color: #fff;
    font: 16px sans-serif;
    margin-bottom: 8px;
}

#pongTimer {
    color: #fff;
    font: 16px sans-serif;
    margin-bottom: 8px;
}

.sliding-puzzle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.sliding-puzzle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: min(320px, 80vw);
}

.sliding-puzzle-tile,
.sliding-puzzle-blank {
    aspect-ratio: 1;
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--mud-palette-divider);
}

.sliding-puzzle-tile {
    background-image: url('/images/puzzles/dg.jpg');
    background-repeat: no-repeat;
    background-size: 400% 400%;
    background-color: var(--mud-palette-surface);
    cursor: pointer;
    display: block;
    padding: 0;
    touch-action: manipulation;
    transition: transform 0.15s ease;
}

.sliding-puzzle-tile:hover {
    transform: scale(1.02);
}

.sliding-puzzle-tile:focus-visible {
    outline: 3px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.sliding-puzzle-blank {
    background-color: var(--mud-palette-background);
    border-style: dashed;
}

.sliding-puzzle-solved {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.sliding-puzzle-solved-image {
    max-width: min(320px, 80vw);
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--mud-elevation-6);
}

@media (max-width: 600px) {
    .fixture-line {
        grid-template-columns: 1fr 20px 2rem 0.5rem 2rem 20px 1fr;
        gap: 0.25rem;
    }

    .bottom-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    body.ceefax .ceefax-title {
        font-size: 1.25rem;
    }

    body.ceefax .fixture-line {
        grid-template-columns: 1fr 2rem 0.5rem 2rem 1fr;
    }

    body.ceefax .fixture-line img {
        display: none;
    }
}
