:root {
    --paddingSite: 40px;
    --card-radius: 20px;
    --card-bg: #ffffff;
    --bg: #FDFDFD;
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --accent: #2d73ac;
    --bg-top: rgb(57, 151, 184);
    --bg-top-raw: 57 151 184;
    --accent-soft: #f0f5ff;
    --border-subtle: #d4d7e1;
    --text-main: #191919;
    --text-muted: #5e5e5e;
    --disabled-bg: #f3f4f6;
    --disabled-border: #cbd5f5;
}

/* Base */

*,
*::after,
*::before {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: "Google Sans Flex", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "wdth" 100,
        "GRAD" 0,
        "ROND" 0;
}

html,
body,
section {
    margin: 0;
    overscroll-behavior: none;
}

body {
    margin: 0;
    width: 100vw;
    background: var(--bg);
}

::selection {
    background: #0000003d;
    color: #ffffffff;
}

::-moz-selection {
    background: #a4bf4a99;
    color: #000;
}

input {
    border: none;
}

/* General numeric inputs in scoring area */
.bgSection input[type="number"] {
    font-size: 16px;
}

.nopadding {
    height: 40px;
}

/* Layout */

.bgSection {
    position: relative;
    margin-left: auto;
    /*margin: var(--paddingSite);
    width: calc(100vw - 2 * var(--paddingSite));*/
    width: 100vw;
    box-sizing: border-box !important;
    background: none;
}

/* Cards */

.headerDivTrainer {
    padding: var(--paddingSite);
    background-color: var(--bg-top);
    margin-bottom: var(--paddingSite);
    position: relative;
    z-index: 3;
}

/* headings */

.containerHeading {
    margin-top: 0;
    font-weight: 400;
    margin-bottom: 20px;
}

.divLiveSyncronisation {
    padding: var(--paddingSite);
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Hide native checkbox but keep it accessible */
.checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Custom box */
.checkbox-ui {
    width: 16px;
    height: 16px;
    border: 1px solid #777;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}


/* Checked state */
.checkbox input:checked+.checkbox-ui {
    background: var(--bg-top);
    border-color: var(--bg-top);
}

/* Focus state */
.checkbox input:focus-visible+.checkbox-ui {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.headingPanelDiv {
    display: flex;
    flex-direction: column;
}

.headingPanelDiv>* {
    color: var(--bg);
}

.headingPanel {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 200;
}

.headingPanelUser {
    margin: 0;
    font-weight: 700;
}

#wsInfo {
    margin: 0;
    font-weight: 300;
    opacity: 0;
    transition: all 2s ease;
}

td a {
    position: relative;
    color: var(--bg-top);
    text-decoration: none;
    padding: 6px 12px;
}

td a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--bg-top);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

td a:hover::after {
    transform: scaleX(1);
}

.payed {
    color: #099d1f;
}

.notPayed,
.inProcess {
    color: #9d1d09;
}

/* Kampfrichter header layout */

.headerDivTrainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Turnerinnen table */

table {
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    width: 100%;
}

.wkvsTabelle th {
    color: #424242;
    border-bottom: solid 1px #0000007d;
    font-weight: 600;
    padding: 14px 15px;
    font-size: 16px;
}

.wkvsTabelle td {
    background-color: #ffffff;
    color: #191919;
    font-weight: 400;
    padding: 14px 15px;
    background: none;
    text-align: center;
}

.wkvsTabelle td:last-child {
    text-align: right;
}

.wkvsTabelle td:not(.totalTd, .totalValue) {
    border-bottom: solid 1px #6262624d;
}

/*.wkvsTabelle .totalValue {
    border-bottom: double 3px #626262d1;
    font-weight: 600;
}*/

.wkvsTabelle .widefat input {
    min-width: 60px;
    display: flex;
    margin: auto;
    background: none;
    text-align: center;
}

@keyframes stiftWackler {
    25% {
        transform: rotate(-10deg) scale(1.05);
    }

    75% {
        transform: rotate(10deg) scale(1.15);
    }

    100% {
        transform: rotate(0deg) scale(1.2);
    }
}

.wkvsTabelle tr:not(.totalTr):hover {
    background-color: #f4f4f4;
}

/*.allTurnerinenDiv tr.notHeaderRow:hover td{
    -webkit-text-stroke: 0.75px currentColor;
    color: currentColor;
}*/

/* Panel with inputs (new style, light) */

.containerDiv {
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

.editContainerDivInner>form {
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.editContainerDivInner>form>input,
.editContainerDivInner>form>select,
.bulkSelect,
.emptyEditForm {
    border: 1px dashed #777;
    max-width: 300px;
    border-radius: 3px;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 300;
}

.editContainerDivInner>form>input:focus,
.editContainerDivInner>form>select:focus,
.bulkSelect:focus {
    border: 1px solid var(--bg-top);
    outline: none;
    /*font-weight: 600;*/
}

.editContainerDivInner>form>input,
.emptyEditForm,
.bulkSelect {
    padding: 6px 10px;
}

.editContainerDivInner>form>label {
    margin-bottom: 10px;
}

.emptyEditForm {
    text-align: center;
}

#submitScorNumber,
.bulkSelectSubmit {
    text-align: center;
    border: 1px solid #7878788e;
    background: none;
    color: #4d4d4de3;
    transition: border 0.3s ease, background 0.3s ease, font-weight 0.3s ease;
}

.emptyEditForm:hover {
    border: 1px solid var(--bg-top);
    background: #f00;
    font-weight: 600;
}

#submitScorNumber:hover,
.bulkSelectSubmit:hover {
    border: 1px solid var(--bg-top);
    color: var(--bg);
    background: var(--bg-top);
    font-weight: 600;
}

.checkoutButton,
.bulkSelectSubmit {
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 300;
}

.labelBulkSelect {
    font-weight: 300;
    margin-bottom: 6px;
}

/* Titles inside edit card */

.heading_fv_selturnerin {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: baseline;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}

.current-turnerin-name {
    font-weight: 600;
    color: var(--accent);
}

.heading_fv_nextturnerin {
    margin: 1.5rem 0 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.fv_nextturnerin:hover {
    font-size: 1.1rem;
}

/* Tables container inside edit card */

.all_vaules_div,
.all_edit_vaules_div {
    display: inline-flex;
    /* makes the box shrink to fit */
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.all_vaules_div {
    flex-direction: column;
}

/* Individual small tables */

.editkampfrichter_user {
    border-collapse: collapse;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    min-width: 180px;
    box-shadow: 0 0 0 1px rgba(209, 213, 219, 0.9);
}

.editkampfrichter_user th,
.editkampfrichter_user td {
    padding: 0.6rem 0.75rem;
    text-align: center;
    white-space: nowrap;
}

a {
    text-decoration: none;
}

.editkampfrichter_user th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    background: #f3f4f6;
}

.table_endnote_edit {
    margin-top: 1rem;
    width: 100%;
}

/* Tight cell for pure input */

.nopadding {
    padding: 0.25rem 0.5rem !important;
}

/* Inputs inside edit card */

.fullinput {
    width: 100%;
    box-sizing: border-box;
    /*padding: 0.45rem 0.6rem;*/
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.3;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    text-align: center;
}

.fullinput:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(45, 115, 172, 0.25);
    background: #ffffff;
}

/* Strong & clear disabled style */

.fullinput:disabled,
.fullinput[readonly] {
    background: none;
    border: none;
    color: #6b7280;
    opacity: 1;
    cursor: not-allowed;
}

.fullinput:disabled:hover,
.fullinput:disabled:focus,
.fullinput[readonly]:hover,
.fullinput[readonly]:focus {
    box-shadow: none;
    border-color: var(--disabled-border);
}

/* Computed result fields even clearer */

/*[id^="e-note-"]:disabled {
    background: #fff7d6;
    background: repeating-linear-gradient(
        135deg,
        #ffefb0,
        #ffefb0 6px,
        #fff7d6 6px,
        #fff7d6 12px
    );
    border-color: #f59e0b;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.7);
    color: #92400e;
    font-weight: 800;
    text-align: center;
}*/

[id^="note-user-"]:disabled {
    background: none;
    border: none;
    color: var(--top-bg);
    font-weight: 600;
    text-align: center;
}

/* Remove number arrows where supported */

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* Burger + menu (unchanged from your style) */

.trainerBurgerMenuDiv, .trainerBurgerMenuDiv svg {
    width: 100%;
    height: 100%;
    width: 28px;
    height: 28px;
}

.trainerBurgerMenuDiv svg {
    transition: transform 0.3s ease;
    stroke: #fff;
    color: #fff;
}

.trainerBurgerMenuDiv:hover svg {
    transform: scale(1.02);
}

.trainerBurgerMenuDiv:active svg {
    transform: scale(0.95);
}

.internMenuDiv {
    background-color: #fff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    position: fixed;
    right: 0;
    top: 150px;
    width: 90vw;
    height: 200px;
    max-width: 400px;
    transform: translateX(0%);
    z-index: 100;
    padding: 20px;
    transition: transform 0.45s cubic-bezier(.4, 0, .2, 1);
    opacity: 1;
    border-radius: 20px 0 0 20px;
}

.internMenuDiv.open {
    transform: translateX(100%);
    box-shadow: none;
}

.innerInternMenuDiv {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100dvh;
    overflow-y: auto;
    padding-bottom: 80px;
}

.text_akt_abt {
    font-size: 1rem;
    color: #555;
    text-align: center;
    line-height: 1.6;
}

.innerInternMenuDiv form {
    margin: 0;
}

.innerInternMenuDiv input[type="submit"],
.innerInternMenuDiv select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.innerInternMenuDiv input[type="submit"]:focus,
.innerInternMenuDiv select:focus {
    outline: none;
    border-color: #2d73ac;
    box-shadow: 0 0 6px rgba(45, 115, 172, 0.3);
}

.innerInternMenuDiv .button-secondary {
    background: linear-gradient(135deg, #2d73ac, #1f4f75);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 18px;
    transition: transform 0.2s ease, background 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.innerInternMenuDiv .button-secondary:hover {
    background: linear-gradient(135deg, #245d8a, #163b5a);
    transform: translateY(-2px);
}

.gruppennav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f9fafc;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gruppennav p {
    margin: 0 6px;
    font-weight: 600;
    color: #333;
}

.button_gruppe {
    border: none;
    background: #2d73ac;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.button_gruppe:hover {
    background: #245d8a;
    transform: scale(1.05);
}

.labelnamekr {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 14px;
    display: block;
    color: #222;
}

.inputnamekr {
    margin-bottom: 12px;
}

.footerInternMenu {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: absolute;
    bottom: 12px;
    gap: 40px;
    width: calc(100% - 40px);
}

.footerInternMenu>* {
    display: flex;
}

.menuBg {
    position: fixed;
    inset: 0;
    z-index: 98;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    /*background: rgba(0, 0, 0, 0.15);*/
}

.menuBg.menuTransition {
    transition: opacity 0.6s ease-out;
}

/*.menuBg.open {
    opacity: 1;
    pointer-events: auto;
    user-select: all;
}*/

.menuTransition {
    transition: all 0.6s ease-out;
}

.menuTransition>.trainerBurgerMenuLine {
    transition: all 0.3s ease-out;
}

.closeInternMenuMobileDiv {
    display: none;
    width: 5vw;
    height: 100px;
    position: absolute;
    top: 30px;
    right: -5vw;
    background-color: #09090966;
    border-radius: 0 10px 10px 0;
}

/* Mobile tweaks */

@media (max-width: 480px) {
    .internMenuDiv {
        max-width: 95vw;
    }

    .internMenuDiv.open .closeInternMenuMobileDiv {
        display: block;
    }
}

@media (max-width: 600px) {
    .containerDiv {
        padding: var(--paddingSite) calc(var(--paddingSite) * 0.75);
        margin-bottom: var(--paddingSite);
    }

    .notMobile {
        display: none;
    }

    .wkvsTabelle th {
        padding: 12px 6px;
    }

    .wkvsTabelle td {
        padding: 10px 6px;
    }

    .ranglisteExportBMDesktop {
        display: none;
    }

    .ranglisteExportBMMobile {
        display: block;
    }
}

@media (min-width: 601px) {
    .containerDiv {
        padding: var(--paddingSite) calc(var(--paddingSite) * 1.5);
        margin-bottom: var(--paddingSite);
    }

    .ranglisteExportBMDesktop {
        display: block;
    }

    .ranglisteExportBMMobile {
        display: none;
    }
}

.buttonNextAbt,
.buttonPrevAbt,
.button_gruppe {
    line-height: 0;
}

.all_e_vaules_div {
    display: grid;
    gap: 1rem;
}

.titleWidthNormalInput {
    width: 309.398px;
}

.flexRow {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

.fullHeightRectangle {
    display: flex;
}

.msgDiv {
    position: fixed;
    bottom: 50px;
    right: 20px;
    display: flex;
    align-items: end;
    flex-direction: column-reverse;
    gap: 10px;
}

.msgBox {
    transform: translateX(calc(100% + 40px));
    padding: 10px 15px;
    color: #fff;
    background-color: #5b5b5b98;
    border-left: 4px solid;
    border-radius: 2px;
    transition: all 0.5s ease;
}

.msgBox.show {
    transform: translateX(0);
}

.playcontrolDiv {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.noKampfrichterDiv {
    display: none;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    height: 100%;
    background-color: #e9eef6a0;
    backdrop-filter: blur(3px);
    z-index: 2;
}

.noKampfrichterDiv>h1 {
    color: var(--top-bg);
}

.adminButtonDiv input,
.buttonNewAdminStyle {
    background-color: var(--top-bg);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 200;
    cursor: pointer;
    padding: 12px 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.adminButtonDiv input {
    margin: 10px 0 0 10px;
}

.adminButtonDiv input:hover {
    filter: brightness(1.2);
}

.titleSingleProg {
    font-weight: 400;
    color: var(--top-bg);
}

.adminButtonDiv {
    display: block;
}

table.widefat {
    table-layout: auto;
}

.singleProgDiv:not(:last-child) {
    margin-bottom: 60px;
}

.tableStartgebueren td {
    padding: 8px 4px;
}

.tableStartgebueren th {
    text-align: left;
}

tr.rowStartgebuer {
    position: relative;
}

tr.rowStartgebuer::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-bottom: 1px dashed #777;
}

.hideIfEmptyBasket,
.hideIfNotEmptyBasket {
    display: none;
}

.cellStartgebuer[data-type="delete"] svg {
    display: flex;
    margin: auto;
}

.updateMusicDiv {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.editDiv {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.editDiv>*,
.editDiv button {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.tableStartgebueren {
    max-height: 60vh;
    overflow-x: hidden;
    overflow-y: auto;

    /* Prevent scroll chaining to body */
    overscroll-behavior-x: contain;

    /* Smooth scrolling on touch devices */
    -webkit-overflow-scrolling: touch;
}

.tableWraperOverflowY {
    overflow-x: auto;
    overflow-y: hidden;

    /* Prevent scroll chaining to body */
    overscroll-behavior-x: contain;

    /* Smooth scrolling on touch devices */
    -webkit-overflow-scrolling: touch;
}

.bezahltOverrideInfo {
    display: block;
    font-size: 8px;
    font-weight: 300;
}

.referenzDiv {
    margin-bottom: 40px;
}

.referenzDivInputDiv,
#submitScorNumber,
.bulkSelectSubmit {
    display: inline-flex;
    border: 1px dashed #777;
    padding: 6px 10px;
    gap: 4px;
    border-radius: 3px;
}

.referenzDivInputDiv:hover,
.referenzDivInputDiv input:focus+.referenzDivInputDiv {
    border: 1px solid var(--bg-top);
}

.referenzDivInputDiv input:focus {
    outline: none;
}

.referenzDivInputDiv input,
.referenzDivInputDiv span {
    font-size: 14px;
    padding: 0px;
}

#submitScorNumber,
.bulkSelectSubmit {
    text-align: left;
    font-size: 14px;
    width: 100px;
}

.chartjs-tooltip {
    font-size: 12px;
}


.chartjs-tooltip th {
    font-weight: 500;
}

.chartjs-tooltip td {
    font-weight: 200;
}

.customSelect {
  position: relative;
  width: 240px;
  font-family: system-ui, sans-serif;
}

.customSelect > * {
    margin: 0;
}

.bulkSelectDiv {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 30px;
}

.bulkSelect:focus .selectArrow {
    rotate: 180deg
}

.selectTrigger {
  width: 100%;
  border: 1px solid #ccc;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.selectOptions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0;
  border: 1px solid #ccc;
  border-top: none;
  list-style: none;
  background: #fff;
  display: none;
  z-index: 1000;
}

.selectOptions li {
  padding: 10px 12px;
  cursor: pointer;
}

.selectOptions li:hover,
.selectOptions li.selected {
  background-color: #f2f2f2;
}

.buttonDownload {
    padding: 10px;
    border-radius: 10px;
    background-color: var(--bg-top);
    color: #fff;
    border-top: 2px solid #727272;
    border-left: 2px solid #727272;
    border-bottom: 2px solid #2c2c2c;
    border-right: 2px solid #2c2c2c;
    transition: transform 0.3s ease;
}

.buttonDownload:hover {
    transform: scale(1.015);
}

.buttonDownload:active {
    transform: scale(0.95);
}

select {
    appearance: none;
    /* Standard */
    -webkit-appearance: none;
    /* WebKit */
    -moz-appearance: none;
    /* Firefox */

    width: 100%;
    padding: 12px 35px 12px 14px !important;
    font-size: 16px;

    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;

    background-image: url("data:image/svg+xml;utf8,\<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'>\<path d='M6 9L12 15L18 9' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/>\</svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;

    cursor: pointer;
}

select:open {
    background-image: url("data:image/svg+xml;utf8,\<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'>\<path d='M18 15L12 9L6 15' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/>\</svg>");
}