﻿/* ═══════════════════════════════════════════════════════════
   UmpireScoringPage.razor.css  —  Touch-optimised umpire screen
═══════════════════════════════════════════════════════════ */

.ump-root {
    background: #0d1b2a;
    color: white;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/*==================================*/
.relay-fmt-banner {
    padding: .7rem .9rem;
    border: 1px solid var(--mud-palette-primary);
    border-radius: 8px;
    background: rgba(94,53,177,.08);
    font-size: .9rem;
    line-height: 1.5;
}

.team-ctx-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 6px 14px;
    font-size: 13px;
    background: rgba(255,255,255,.03);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.team-ctx-tourn {
    font-weight: 700;
    color: #fff;
}

.team-ctx-teams {
    color: rgba(255,255,255,.85);
}

.team-ctx-vs {
    color: rgba(255,255,255,.4);
    margin: 0 2px;
    font-size: 11px;
}

.team-ctx-seg {
    color: rgba(147,197,253,.9);
}

.team-ctx-target {
    color: #fde68a;
    margin-left: auto;
}

/*=====================================================*/

/* ── TOP BAR ── */
.ump-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #0a1520;
    border-bottom: 1px solid rgba(255,255,255,.12);
    flex-shrink: 0;
    min-height: 38px;
    gap: 8px;
}

.ump-tb-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.ump-tb-match {
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.ump-tb-sep {
    font-size: 11px;
    color: rgba(255,255,255,.25);
    margin: 0 1px;
}

.ump-tb-info {
    font-size: 11px;
    color: rgba(255,255,255,.5);
}

.ump-tb-stage {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 500;
}

.ump-tb-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ump-tb-reset {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.6);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

    .ump-tb-reset:active {
        background: rgba(251,191,36,.25);
        color: #fbbf24;
    }

.ump-live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(239,68,68,.18);
    border: 1px solid rgba(239,68,68,.4);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    color: #fca5a5;
}

.ump-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    animation: ump-blink 1.4s infinite;
}

@keyframes ump-blink {
    0%,100% {
        opacity: 1
    }

    50% {
        opacity: .2
    }
}

/* ── LOADING / ERROR ── */
.ump-loading, .ump-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    font-size: 14px;
    color: rgba(255,255,255,.5);
}

/* ═══ WIZARD ═══ */
.ump-wiz {
    padding: clamp(10px,2vw,16px);
    flex: 1;
}

.ump-steps {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.ump-step-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ump-step-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.12);
    margin: 0 6px;
}

.ump-step-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.3);
    flex-shrink: 0;
}

    .ump-step-dot.on {
        border-color: #3b82f6;
        background: #3b82f6;
        color: white;
    }

    .ump-step-dot.ok {
        border-color: #22c55e;
        background: #22c55e;
        color: white;
    }

.ump-step-lbl {
    font-size: clamp(9px,1.3vw,11px);
    color: rgba(255,255,255,.3);
    white-space: nowrap;
}

    .ump-step-lbl.on {
        color: white;
    }

.ump-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: clamp(12px,2.5vw,18px);
    margin-bottom: 12px;
}

.ump-card-title {
    font-size: clamp(14px,2.2vw,17px);
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.ump-card-sub {
    font-size: clamp(11px,1.6vw,13px);
    color: rgba(255,255,255,.4);
    margin-bottom: clamp(10px,1.8vw,16px);
}

.ump-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.ump-field label {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 4px;
}

.ump-field select, .ump-field input {
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.15);
    background: #1a2d40;
    color: white;
    font-size: 13px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: dark;
}

    .ump-field select option {
        background: #1a2d40;
        color: white;
    }

.ump-section-label {
    font-size: clamp(13px,1.9vw,16px);
    color: rgba(255,255,255,.8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: clamp(6px,1.2vw,10px);
    padding-left: 8px;
    border-left: 3px solid #3b82f6;
}

.ump-divider {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 12px 0;
}

.ump-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    gap: 8px;
}

.ump-info-box {
    background: rgba(59,130,246,.1);
    border: 1px solid rgba(59,130,246,.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #93c5fd;
    margin-top: 12px;
}

.ump-sum-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 4px;
}

    .ump-sum-table td {
        padding: 6px 0;
    }

        .ump-sum-table td:first-child {
            color: rgba(255,255,255,.4);
            width: 130px;
        }

/* Court in wizard */
.ump-court-wrap {
    background: #1565C0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
}

    .ump-court-wrap svg {
        display: block;
        width: 100%;
    }

/* Player buttons */
.ump-player-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.ump-player-btn {
    display: flex;
    align-items: center;
    gap: clamp(8px,1.5vw,12px);
    padding: clamp(12px,2vw,16px) clamp(14px,2.5vw,22px);
    min-height: 52px;
    border-radius: 10px;
    font-size: clamp(13px,2vw,16px);
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.07);
    color: white;
    transition: background .1s;
    -webkit-tap-highlight-color: transparent;
}

    .ump-player-btn:active {
        background: rgba(255,255,255,.18);
    }

    .ump-player-btn.selected {
        background: #3b82f6;
        border-color: #3b82f6;
    }

.ump-auto-badge {
    font-size: 9px;
    color: #86efac;
    font-weight: 400;
    letter-spacing: .04em;
    margin-left: 4px;
}

/* Team choice */
.ump-team-choice {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ump-team-btn {
    flex: 1;
    min-width: 130px;
    min-height: 80px;
    padding: clamp(12px,2vw,18px);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
    color: white;
    cursor: pointer;
    text-align: center;
    transition: background .1s;
    -webkit-tap-highlight-color: transparent;
}

    .ump-team-btn:active {
        background: rgba(255,255,255,.14);
    }

    .ump-team-btn.selected {
        border-color: #3b82f6;
        background: rgba(59,130,246,.2);
    }

.ump-team-btn-label {
    font-size: clamp(11px,1.5vw,14px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #93c5fd;
    margin-bottom: 8px;
}

.ump-team-btn.selected .ump-team-btn-label {
    color: #93c5fd;
}

.ump-team-btn-names {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ump-team-player-row {
    display: flex;
    align-items: center;
    gap: clamp(6px,1vw,10px);
    font-size: clamp(13px,2vw,16px);
    font-weight: 600;
    color: white;
    justify-content: center;
    margin-bottom: 2px;
}

.ump-vs-sep {
    font-size: clamp(12px,1.8vw,14px);
    color: rgba(255,255,255,.3);
    font-weight: 600;
    flex-shrink: 0;
}

/* Change Ends banner */
.ump-change-ends-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(59,130,246,.15);
    border: 1.5px solid rgba(59,130,246,.4);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.ump-ce-icon {
    font-size: 22px;
    flex-shrink: 0;
    color: #93c5fd;
}

.ump-ce-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .ump-ce-text strong {
        font-size: clamp(13px,2vw,15px);
        color: #93c5fd;
        font-weight: 700;
    }

    .ump-ce-text span {
        font-size: clamp(11px,1.5vw,12px);
        color: rgba(255,255,255,.5);
    }

.ump-ce-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(34,197,94,.4);
    background: rgba(34,197,94,.15);
    color: #86efac;
    font-size: clamp(11px,1.5vw,13px);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

    .ump-ce-btn:active {
        background: rgba(34,197,94,.3);
    }

/* ═══ SCORING PAGE ═══ */
.ump-sc-hdr {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    align-items: start;
    padding: 6px 10px;
    background: #0a1520;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.ump-sc-side {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    border-left: 3px solid #378add;
    padding-left: 6px;
}

.ump-sc-side-right {
    border-left: none;
    border-right: 3px solid #d85a30;
    padding-left: 0;
    padding-right: 6px;
}

.ump-sc-center {
    text-align: center;
}

.ump-sc-nums {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.ump-sc-dash {
    font-size: clamp(16px,3vw,24px);
    color: rgba(255,255,255,.2);
}

.ump-sc-name {
    font-size: clamp(11px,1.6vw,13px);
    font-weight: 600;
    color: white;
}

.ump-sc-sub {
    font-size: clamp(10px,1.5vw,12px);
    color: rgba(255,255,255,.4);
    margin-top: 1px;
}

.ump-sc-srv {
    font-size: clamp(11px,1.5vw,13px);
    color: #facc15;
    margin-top: 3px;
    min-height: 16px;
}

.ump-sc-info {
    font-size: clamp(10px,1.4vw,12px);
    color: rgba(255,255,255,.3);
    text-align: center;
    margin-top: 3px;
}

.ump-sc-n {
    font-size: clamp(36px,8vw,58px);
    font-weight: 400;
    color: white;
    line-height: 1;
    min-width: clamp(40px,8vw,64px);
    text-align: center;
}

.ump-pills {
    display: flex;
    gap: 5px;
    justify-content: center;
    padding: 3px 10px;
    background: rgba(0,0,0,.2);
    flex-wrap: wrap;
}

.ump-pill {
    padding: 2px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.4);
}

    .ump-pill.cur {
        background: rgba(59,130,246,.18);
        border-color: #3b82f6;
        color: #93c5fd;
    }

    .ump-pill.wl {
        background: rgba(34,197,94,.13);
        border-color: #22c55e;
        color: #86efac;
    }

    .ump-pill.wr {
        background: rgba(251,191,36,.13);
        border-color: #fbbf24;
        color: #fde68a;
    }

.ump-interval {
    padding: 5px 12px;
    background: rgba(251,191,36,.15);
    border-bottom: 1px solid rgba(251,191,36,.3);
    font-size: clamp(11px,1.8vw,13px);
    font-weight: 600;
    color: #fde68a;
    text-align: center;
}

.ump-interval-ends {
    background: rgba(59,130,246,.2) !important;
    border-bottom-color: rgba(59,130,246,.4) !important;
    color: #93c5fd !important;
}

/* Court — focal panel, framed with side margins (court-first style) */
.ump-court-wrap {
    background: #1565C0;
    overflow: hidden;
    width: auto;
    line-height: 0;
    margin: 10px;
    border-radius: 12px;
}

    .ump-court-wrap svg {
        display: block;
        width: 100%;
    }

/* ── ACTION ROW ── */
.ump-action-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    border-top: 1px solid rgba(255,255,255,.08);
    min-height: clamp(54px,9vw,76px);
}

.ump-score-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: all .1s;
}

.ump-score-btn-l {
    background: rgba(59,130,246,.2);
    border-right: 1px solid rgba(255,255,255,.08);
}

.ump-score-btn-r {
    background: rgba(216,90,48,.18);
    border-left: 1px solid rgba(255,255,255,.08);
}

.ump-score-btn-l:active {
    background: rgba(59,130,246,.45);
}

.ump-score-btn-r:active {
    background: rgba(216,90,48,.42);
}

.ump-score-btn-plus {
    font-size: clamp(20px,4vw,30px);
    font-weight: 700;
    color: white;
    line-height: 1;
}

.ump-score-btn-name {
    font-size: clamp(9px,1.4vw,12px);
    color: rgba(255,255,255,.6);
    text-align: center;
    font-weight: 500;
    padding: 0 4px;
    line-height: 1.2;
    word-break: break-word;
}

.ump-middle-ctrls {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
}

.ump-mc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: all .1s;
    border-right: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 6px 4px;
}

    .ump-mc-btn:nth-child(3), .ump-mc-btn:nth-child(6) {
        border-right: none;
    }

    .ump-mc-btn:nth-child(4), .ump-mc-btn:nth-child(5), .ump-mc-btn:nth-child(6) {
        border-bottom: none;
    }

.ump-mc-icon {
    font-size: clamp(14px,2.5vw,20px);
    line-height: 1;
}

.ump-mc-lbl {
    font-size: clamp(8px,1.2vw,11px);
    font-weight: 600;
    letter-spacing: .02em;
}

.ump-mc-undo {
    background: rgba(239,68,68,.12);
    color: #fca5a5;
}

.ump-mc-swap {
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.35);
}

.ump-mc-swap-hot {
    background: rgba(34,197,94,.18);
    color: #86efac;
    animation: ump-swap-pulse 1.5s ease-in-out infinite;
}

.ump-mc-let {
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.4);
}

.ump-mc-corr {
    background: rgba(251,191,36,.08);
    color: #fbbf24;
}

.ump-mc-shuttle {
    background: rgba(100,160,255,.08);
    color: rgba(255,255,255,.5);
}

.ump-mc-shuttle-minus {
    color: rgba(255,255,255,.35);
}

.ump-mc-shuttle-count {
    background: rgba(100,160,255,.12);
    color: white;
}

.ump-mc-shuttle-plus {
    color: #86efac;
}

.ump-mc-shuttle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ump-mc-undo:active {
    background: rgba(239,68,68,.3);
}

.ump-mc-swap:active {
    background: rgba(34,197,94,.2);
    color: #86efac;
}

.ump-mc-swap-hot:active {
    background: rgba(34,197,94,.35);
}

.ump-mc-let:active {
    background: rgba(255,255,255,.12);
    color: white;
}

.ump-mc-corr:active {
    background: rgba(251,191,36,.2);
}

.ump-mc-shuttle:active {
    background: rgba(100,160,255,.25);
    color: white;
}

@keyframes ump-swap-pulse {
    0%,100% {
        box-shadow: inset 0 0 0 1px rgba(34,197,94,.4);
    }

    50% {
        box-shadow: inset 0 0 0 1px rgba(34,197,94,.9);
    }
}

/* ═══ SCORESHEET ═══ */
.ump-ss {
    background: #060f1a;
    border-top: 1px solid rgba(255,255,255,.09);
    padding: 6px 10px;
    flex: 1;
}

.ump-ss-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ump-ss-title {
    font-size: 11px;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ump-ss-shuttle {
    font-size: 11px;
    color: rgba(255,255,255,.35);
}

.ump-ss-tabs {
    display: flex;
    gap: 5px;
}

.ump-ss-tab {
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.3);
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

    .ump-ss-tab.on {
        background: rgba(59,130,246,.17);
        border-color: #3b82f6;
        color: #93c5fd;
    }

.ump-ss-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ump-ss-tbl-wrap {
    overflow-x: auto;
}

/* ── BWF Scoresheet table — players=rows, rallies=columns ── */
.ump-ss-tbl {
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,.15);
}

    .ump-ss-tbl .ss-cn {
        min-width: 90px;
        max-width: 110px;
        padding: 5px 8px;
        text-align: left;
        font-weight: 600;
        color: rgba(255,255,255,.8);
        border-right: 1px solid rgba(255,255,255,.15);
        border-bottom: 1px solid rgba(255,255,255,.08);
        position: sticky;
        left: 0;
        background: #060f1a;
        z-index: 2;
    }

    .ump-ss-tbl .ss-sr-h {
        width: 30px;
        min-width: 30px;
        padding: 4px;
        text-align: center;
        font-size: 9px;
        font-weight: 700;
        color: rgba(255,255,255,.3);
        letter-spacing: .06em;
        border-right: 2px solid rgba(255,255,255,.2);
        border-bottom: 1px solid rgba(255,255,255,.1);
        background: #060f1a;
    }

.ss-sr-val {
    width: 30px;
    min-width: 30px;
    padding: 4px;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    border-right: 2px solid rgba(255,255,255,.15);
    border-bottom: 1px solid rgba(255,255,255,.07);
}

    .ss-sr-val.is-s {
        color: #facc15;
    }

    .ss-sr-val.is-r {
        color: #60a5fa;
    }

.ump-ss-tbl .ss-rc-h {
    width: 26px;
    min-width: 26px;
    padding: 3px 2px;
    text-align: center;
    font-size: 9px;
    font-weight: 500;
    color: rgba(255,255,255,.25);
    border-right: 1px solid rgba(255,255,255,.07);
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: #060f1a;
}

.ump-ss-tbl .ss-rc {
    width: 26px;
    min-width: 26px;
    text-align: center;
    padding: 2px;
    border-right: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.ss-sc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}

    .ss-sc.sc-l {
        background: rgba(59,130,246,.35);
        color: #93c5fd;
    }

    .ss-sc.sc-r {
        background: rgba(216,90,48,.32);
        color: #f0997b;
    }

.ss-row.ss-left .ss-cn {
    color: #93c5fd;
}

.ss-row.ss-right .ss-cn {
    color: #f0997b;
}

.ump-ss-tbl thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.ump-ss-tbl tr td:last-child, .ump-ss-tbl tr th:last-child {
    border-right: none;
}

.ss-team-sep td {
    height: 4px;
    background: rgba(255,255,255,.07);
    padding: 0;
    border-right: none;
}

.ump-ss-empty {
    font-size: 12px;
    color: rgba(255,255,255,.2);
    text-align: center;
    padding: 14px 0;
}

/* ═══ TOAST ═══ */
.ump-toast {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: rgba(15,30,50,.97);
    border-top: 1px solid rgba(59,130,246,.25);
    font-size: 13px;
    color: #93c5fd;
    text-align: center;
    z-index: 500;
    animation: ump-toast-in .3s ease;
}

@keyframes ump-toast-in {
    from {
        transform: translateY(100%)
    }

    to {
        transform: translateY(0)
    }
}

@media (max-width: 480px) {
    .ump-action-row {
        grid-template-columns: 1fr 1.5fr 1fr;
    }

    .ump-step-lbl {
        display: none;
    }

    .ump-team-choice {
        flex-direction: column;
    }
}

/* ═══ MISCONDUCT PANEL ═══ */
.ump-misconduct-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0a1520;
    border-top: 2px solid rgba(239,68,68,.4);
    padding: 10px 12px;
    z-index: 200;
    animation: ump-slide-up .2s ease;
}

@keyframes ump-slide-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.ump-mc-panel-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.4);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ump-mc-panel-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.4);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.ump-mc-panel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.ump-mc-code-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.05);
    color: white;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .1s;
}

    .ump-mc-code-btn:active {
        background: rgba(255,255,255,.18);
    }

.ump-mc-code-letter {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.ump-mc-code-label {
    font-size: 9px;
    color: rgba(255,255,255,.5);
    text-align: center;
    line-height: 1.2;
}

/* colour coding per severity */
.ump-mc-code-btn.mc-warn {
    border-color: rgba(251,191,36,.4);
    background: rgba(251,191,36,.08);
}

    .ump-mc-code-btn.mc-warn .ump-mc-code-letter {
        color: #fbbf24;
    }

.ump-mc-code-btn.mc-fault {
    border-color: rgba(249,115,22,.4);
    background: rgba(249,115,22,.08);
}

    .ump-mc-code-btn.mc-fault .ump-mc-code-letter {
        color: #fb923c;
    }

.ump-mc-code-btn.mc-ref {
    border-color: rgba(96,165,250,.4);
    background: rgba(96,165,250,.08);
}

    .ump-mc-code-btn.mc-ref .ump-mc-code-letter {
        color: #60a5fa;
    }

.ump-mc-code-btn.mc-susp {
    border-color: rgba(239,68,68,.5);
    background: rgba(239,68,68,.1);
}

    .ump-mc-code-btn.mc-susp .ump-mc-code-letter {
        color: #f87171;
    }

.ump-mc-code-btn.mc-over {
    border-color: rgba(168,85,247,.4);
    background: rgba(168,85,247,.08);
}

    .ump-mc-code-btn.mc-over .ump-mc-code-letter {
        color: #c084fc;
    }

.ump-mc-code-btn.mc-inj {
    border-color: rgba(34,197,94,.4);
    background: rgba(34,197,94,.08);
}

    .ump-mc-code-btn.mc-inj .ump-mc-code-letter {
        color: #4ade80;
    }

.ump-mc-code-btn.mc-dsq {
    border-color: rgba(239,68,68,.7);
    background: rgba(239,68,68,.15);
}

    .ump-mc-code-btn.mc-dsq .ump-mc-code-letter {
        color: #ef4444;
        font-size: 13px;
    }

.ump-mc-code-btn.mc-ret {
    border-color: rgba(239,68,68,.5);
    background: rgba(239,68,68,.1);
}

    .ump-mc-code-btn.mc-ret .ump-mc-code-letter {
        color: #fca5a5;
        font-size: 13px;
    }

.ump-mc-code-btn.mc-sce {
    border-color: rgba(251,191,36,.4);
    background: rgba(251,191,36,.08);
}

    .ump-mc-code-btn.mc-sce .ump-mc-code-letter {
        color: #fde68a;
    }

/* Side selector inside misconduct panel */
.ump-mc-side-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.ump-mc-side-btn {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.7);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

    .ump-mc-side-btn:active {
        background: rgba(255,255,255,.18);
    }

/* (i) button in middle controls */
.ump-mc-misc {
    background: rgba(168,85,247,.08);
    color: #c084fc;
}

    .ump-mc-misc:active {
        background: rgba(168,85,247,.25);
    }

/* ── Scoresheet incident codes ── */
.ss-inc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(251,191,36,.25);
    color: #fbbf24;
    letter-spacing: .02em;
}

.ss-inc-end {
    background: rgba(239,68,68,.25);
    color: #f87171;
}

/* ── iPad optimisations ── */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Score header */
    .ump-sc-hdr {
        padding: 5px 10px;
    }

    .ump-sc-n {
        font-size: 48px;
        min-width: 52px;
    }

    .ump-sc-name {
        font-size: 12px;
    }

    .ump-sc-side {
        min-height: 44px;
    }

    /* Pills */
    .ump-pills {
        padding: 3px 10px;
    }

    /* Action row */
    .ump-action-row {
        min-height: 64px;
    }

    .ump-score-btn-plus {
        font-size: 22px;
    }

    .ump-score-btn-name {
        font-size: 10px;
    }

    /* Middle controls */
    .ump-mc-icon {
        font-size: 14px;
    }

    .ump-mc-lbl {
        font-size: 8px;
    }

    /* Scoresheet */
    .ump-ss {
        padding: 5px 8px;
    }

    .ump-ss-tbl {
        font-size: 11px;
    }
}

/* iPad landscape — tighten even more */
@media (min-width: 1024px) and (max-height: 768px) {
    .ump-sc-hdr {
        padding: 4px 10px;
    }

    .ump-sc-n {
        font-size: 40px;
    }

    .ump-pills {
        padding: 2px 10px;
    }

    .ump-action-row {
        min-height: 58px;
    }

    .ump-score-btn-plus {
        font-size: 20px;
    }
}
