/*
 * Basis-Styling. Kann in WordPress unter
 * Einstellungen > Knueppel Google Sheets > Eigenes CSS überschrieben werden.
 */

.knueppel-sheet-wrap {
    width: 100%;
    margin: 1rem 0;
    font-size: 0.88rem;
}

.knueppel-sheet-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.knueppel-sheet {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font: inherit;
}

.knueppel-sheet th,
.knueppel-sheet td {
    padding: 7px 9px;
    border: 1px solid rgba(127, 127, 127, .22);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1.25;
}

.knueppel-sheet th {
    font-weight: 700;
}

.knueppel-sheet tbody tr:nth-child(even) {
    background: rgba(127, 127, 127, .06);
}

.knueppel-sheet__month-link {
    display: block;
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.knueppel-sheet__month-link:hover,
.knueppel-sheet__month-link:focus {
    text-decoration: underline;
}

.knueppel-sheet__title {
    margin-bottom: 12px;
    font-size: 1.4em;
    font-weight: 700;
}

.knueppel-sheet-error {
    padding: 12px 14px;
    border: 1px solid currentColor;
}


.knueppel-sheet__toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
}

.knueppel-sheet__back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}

.knueppel-sheet__back-link:hover,
.knueppel-sheet__back-link:focus {
    text-decoration: underline;
}

@media (max-width: 782px) {
    .knueppel-sheet-wrap {
        font-size: 0.8rem;
    }

    .knueppel-sheet th,
    .knueppel-sheet td {
        padding: 6px 7px;
    }
}


.knueppel-sheet__sort-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    cursor: pointer;
}

.knueppel-sheet__sort-button:hover .knueppel-sheet__sort-label,
.knueppel-sheet__sort-button:focus .knueppel-sheet__sort-label {
    text-decoration: underline;
}

.knueppel-sheet__sort-icon {
    min-width: .75em;
    font-size: .65em;
    opacity: .7;
}

.knueppel-sheet__pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: .88rem;
}

.knueppel-sheet__pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.knueppel-sheet__page-button {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid rgba(127, 127, 127, .3);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.knueppel-sheet__page-button:hover:not(:disabled),
.knueppel-sheet__page-button:focus:not(:disabled),
.knueppel-sheet__page-button.is-active {
    background: rgba(127, 127, 127, .12);
}

.knueppel-sheet__page-button.is-active {
    font-weight: 700;
}

.knueppel-sheet__page-button:disabled {
    opacity: .35;
    cursor: default;
}

.knueppel-sheet__pagination-ellipsis {
    padding: 0 4px;
}

.knueppel-sheet__pagination-info {
    opacity: .75;
}

@media (max-width: 782px) {
    .knueppel-sheet__pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .knueppel-sheet__pagination-buttons {
        flex-wrap: wrap;
    }
}


.knueppel-sheet__heading {
    margin: 0 0 14px;
    padding: 0;
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 700;
}


/* Eigener, deutlich sichtbarer horizontaler Scrollbalken */
.knueppel-sheet-scroll {
    scrollbar-width: none;
}

.knueppel-sheet-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.knueppel-sheet__custom-scroll {
    width: 100%;
    padding: 7px 0 3px;
    user-select: none;
    touch-action: none;
}

.knueppel-sheet__custom-scroll-track {
    position: relative;
    width: 100%;
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e1e1e1;
    cursor: pointer;
}

.knueppel-sheet__custom-scroll-thumb {
    position: absolute;
    top: 2px;
    left: 0;
    height: 12px;
    min-width: 48px;
    border-radius: 999px;
    background: #777;
    cursor: grab;
    will-change: transform;
}

.knueppel-sheet__custom-scroll-thumb:hover {
    background: #5f5f5f;
}

.knueppel-sheet__custom-scroll-thumb.is-dragging {
    cursor: grabbing;
    background: #4d4d4d;
}


/* Native Browser-Scrollbar vollständig ausblenden */
.knueppel-sheet-scroll {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.knueppel-sheet-scroll::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.knueppel-sheet-scroll::-webkit-scrollbar-track,
.knueppel-sheet-scroll::-webkit-scrollbar-thumb,
.knueppel-sheet-scroll::-webkit-scrollbar-corner {
    display: none !important;
}

/* Tabellenrahmen etwas kräftiger */
.knueppel-sheet {
    border: 1px solid rgba(80, 80, 80, .45);
}

.knueppel-sheet th,
.knueppel-sheet td {
    border-color: rgba(80, 80, 80, .38);
}

.knueppel-sheet thead th {
    border-bottom-color: rgba(60, 60, 60, .55);
}
