/*
 * Layout adjustment for the jquery ui dialogs
 */
.ui-dialog {
    width: 400px !important;
}

.ui-dialog .ui-dialog-titlebar {
    font-size: 14px;
}

.ui-dialog .ui-dialog-content {
    padding-bottom: 0 !important;
    font-size: 1.0em;
}

.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
    float: unset !important;
    font-size: 14px;
}

/* Styles for the standard leaderboard */
/* =================================== */

.pl-table-scroll {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 4px;
    scrollbar-gutter: stable;
    scrollbar-color: #2271b1 #e2e8f0;
    scrollbar-width: auto;
    -webkit-overflow-scrolling: touch;
}

.pl-table-scroll::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

.pl-table-scroll::-webkit-scrollbar-track {
    background: #e2e8f0;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
}

.pl-table-scroll::-webkit-scrollbar-thumb {
    min-width: 48px;
    background: #2271b1;
    background-clip: padding-box;
    border: 3px solid transparent;
    border-radius: 8px;
}

.pl-table-scroll::-webkit-scrollbar-thumb:hover {
    background-color: #135e96;
}

.pl-table-scroll::-webkit-scrollbar-thumb:active {
    background-color: #0a4b78;
}

.pl-table-scroll:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

table.pl-standings {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: clamp(14px, calc(.35vw + .35vh + .35vmin), 18px);
    margin-bottom: 0;
    white-space: nowrap;
}

table.pl-standings thead th {
    padding: .5em .65em;
    text-align: center;
}

table.pl-standings thead th:first-child {
    padding-left: 5px;
    text-align: left;
}

table.pl-standings tr td {
    padding: .4em .65em;
    text-align: center;
}

table.pl-standings tr td:first-child {
    text-align: left;
}

table.pl-standings a.button {
    touch-action: manipulation;
    cursor: pointer !important;
    user-select: none;
}

table.pl-standings a {
    cursor: pointer;
}

.op-dialog-block-details {
    font-size: 14px !important;
    line-height: 1.2em !important;
}

.pl-results-table td, .pl-results-month-table td, .pl-results-year-table td {
    border:none;
    padding: 0px 0px 0px 10px;
}

.pl-results-row-table td {
    border:1px dotted lightgrey;
    padding: 4px 0px 4px 10px;
}

.pl-results-row-table tr:nth-child(odd) {
    background-color: #f2f2f2;
}

.pl-results {
    font-size: 14px !important;
    line-height: 1.2em !important;
}

.pl-results-row, .pl-results-month, .pl-results-year {
    display: none;
}

.pl-minus, .pl-minus-year, .pl-minus-month {
    display: none;
}

.pl-text-right {
    text-align: right;
}

.pl-text-left {
    text-align: left;
}

table.pl-results tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Styles for the rankingleaderboard */
/* =================================== */

table.pl-ranking  {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: clamp(14px, calc(.35vw + .35vh + .35vmin), 18px);
}

table.pl-ranking thead th {
    padding: .5em .65em;
    cursor: pointer;
    text-align: right;
}

table.pl-ranking thead th:first-child {
    text-align: left;
}

table.pl-ranking tr td {
    text-align: right;
    padding: .4em .65em;
}

table.pl-ranking tr td:first-child {
    text-align: left;
}

/* Matrix */

.pl-matrix-scroll {
    position: relative;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    font-size: var(--pl-matrix-font-size, 14px);
    border-radius: 6px;
}

.pl-matrix-table {
    width: max-content;
    min-width: max(100%, var(--pl-matrix-min-width, 100%));
    table-layout: auto;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 1px;
    background: #fff;
    font-size: inherit;
    line-height: 1.15;
}

.pl-matrix-table th,
.pl-matrix-table td {
    box-sizing: border-box;
    height: 2.15em;
    padding: .22em .3em;
    text-align: center;
    vertical-align: middle;
}

.pl-matrix-table .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.pl-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    width: 2.15em;
    min-width: 2.15em;
    max-width: 2.15em;
    height: 9em;
    padding: 0;
    vertical-align: bottom;
}

.pl-matrix-table thead th.pl-matrix-corner {
    left: 0;
    z-index: 5;
    width: auto;
    min-width: 8em;
    max-width: none;
    background: #fff;
}

.pl-matrix-column-label {
    position: absolute;
    bottom: .45em;
    left: 50%;
    display: block;
    width: 7.75em;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    transform: rotate(-90deg);
    transform-origin: left center;
    white-space: nowrap;
}

.pl-matrix-table tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 8em;
    max-width: 15em;
    padding-right: .65em;
    padding-left: .65em;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-matrix-table tbody td {
    width: 2.15em;
    min-width: 2.15em;
    max-width: 2.15em;
    font-variant-numeric: tabular-nums;
}

.pl-matrix-table tbody tr:hover th,
.pl-matrix-table tbody tr:hover td {
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .13);
}

.pl-matrix-table .pl-matrix-empty {
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .18) 0, rgba(255, 255, 255, .18) 4px, rgba(0, 0, 0, .04) 4px, rgba(0, 0, 0, .04) 8px);
}

.pl-matrix-table a.details {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65em;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.pl-matrix-table a.details:hover,
.pl-matrix-table a.details:focus-visible {
    font-weight: 700;
    text-decoration: underline;
}

.pl-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5em 1em;
    margin: -.25rem 0 1rem;
    font-size: 13px;
}

.pl-matrix-legend span {
    display: inline-flex;
    align-items: center;
    gap: .35em;
}

.pl-matrix-legend i {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 2px;
}

.pl-matrix-details-wrapper {
    position:relative;
}

.pl-matrix-details-scroll {
    max-height: 30em;
    overflow:auto;
}

.pl-matrix-details-wrapper table {
    width:100%;
}

.pl-matrix-details td {
    border: none;
}

.pl-matrix-details-double tr:nth-child(3n+1) {
    background-color: #f2f2f2;
}

.pl-matrix-details-single tr:nth-child(odd) {
    background-color: #f2f2f2;
}

.pl-matrix-details-footer {
    background: #f2f2f2;
    border: none;
}

.pl-matrix-details-footer td {
    border: none;
}

@media only screen and (max-width: 720px) {
    .pl-table-scroll {
        border-radius: 0;
    }

    .pl-matrix-table thead th {
        height: 7em;
    }

    .pl-matrix-column-label {
        width: 5.75em;
    }
}
