/* Belegungskalender der Leih-Zapfanlage. Steht in .wmw der Mietseite und nutzt deren Farben
   (--g Akzent je Shop, --ink, --sf, --line, --mut); Ersatzwerte für den Fall ohne .wmw.
   Kompakt, immer ein Monat: ab 768 px links Titel/Legende/Auswahl/Knopf, rechts der Monat;
   darunter alles untereinander. */
.wm-mk {
    --mk-g: var(--g, #f8bf00);
    --mk-ink: var(--ink, #1c1d20);
    --mk-sf: var(--sf, #f1efeb);
    --mk-line: var(--line, #e4e1db);
    --mk-mut: var(--mut, #5a5f67);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "cal" "foot";
    gap: 12px;
    max-width: 680px;
    margin: 4px 0 8px;
    padding: 18px 20px;
    border: 1px solid var(--mk-line);
    border-radius: 16px;
    background: #fff;
}
@media (min-width: 768px) {
    .wm-mk {
        grid-template-columns: 240px minmax(0, 1fr);
        grid-template-areas: "head cal" "foot cal";
        grid-template-rows: auto 1fr;
        gap: 6px 32px;
    }
}
.wm-mk-head { grid-area: head; }
.wm-mk-cal { grid-area: cal; position: relative; }
.wm-mk-foot { grid-area: foot; display: flex; flex-direction: column; gap: 10px; }

.wmw .wm-mk h2 {
    margin: 0 0 2px;
    font-size: 21px;
}
.wmw .wm-mk .wm-mk-hint {
    margin: 0;
    color: var(--mk-mut);
    font-size: 14px;
    line-height: 1.4;
}

/* Blättern: Pfeile links und rechts auf Höhe der Monatsnamen */
.wm-mk-prev,
.wm-mk-next {
    position: absolute;
    top: -3px;
    z-index: 1;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--mk-line);
    border-radius: 50%;
    background: #fff;
    color: var(--mk-ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.wm-mk-prev { left: 0; }
.wm-mk-next { right: 0; }
.wm-mk-prev:hover:not(:disabled),
.wm-mk-next:hover:not(:disabled) { border-color: var(--mk-ink); }
.wm-mk-prev:disabled,
.wm-mk-next:disabled { opacity: .3; cursor: default; }

.wm-mk-months {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}
.wmw .wm-mk .wm-mk-mname {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 15px;
    line-height: 24px;
    text-align: center;
    text-transform: capitalize;
}
.wm-mk-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}
.wm-mk-wd {
    padding: 2px 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--mk-mut);
}
.wm-mk-d {
    position: relative;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: var(--mk-sf);
    color: var(--mk-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 30px;
    cursor: pointer;
    touch-action: manipulation;
}
.wm-mk-d:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--mk-ink); }
.wm-mk-d:focus-visible { outline: 2px solid var(--mk-ink); outline-offset: 1px; }
.wm-mk-d.is-today::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 3px;
    height: 3px;
    margin-left: -1.5px;
    border-radius: 50%;
    background: currentColor;
}
.wm-mk-d.is-past {
    background: transparent;
    color: #b9b6b0;
    font-weight: 400;
    cursor: default;
}
.wm-mk-d.is-busy {
    background: repeating-linear-gradient(-45deg, #e9e6e1 0 4px, #dcd8d1 4px 8px);
    color: #8d8a84;
    font-weight: 400;
    text-decoration: line-through;
    cursor: not-allowed;
}
.wm-mk-d.is-pre { background: color-mix(in srgb, var(--mk-g) 35%, #fff); }
.wm-mk-d.is-sel { background: var(--mk-g); }
.wm-mk-d.is-start,
.wm-mk-d.is-end { background: var(--mk-ink); color: #fff; }

.wm-mk-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    font-size: 13px;
    color: var(--mk-mut);
}
.wmw .wm-mk-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.wm-mk-legend i {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--mk-sf);
}
.wm-mk-legend i.is-busy { background: repeating-linear-gradient(-45deg, #e9e6e1 0 3px, #dcd8d1 3px 6px); }
.wm-mk-legend i.is-sel { background: var(--mk-g); }

.wmw .wm-mk .wm-mk-sum {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
.wmw .wm-mk .wm-mk-sum.is-warn { color: #b3261e; }
.wmw .wm-mk .wm-mk-act {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0;
}
.wmw .wm-mk a.wmr-btn {
    padding: 10px 20px;
    font-size: 15px;
}
.wm-mk-reset {
    padding: 0;
    border: 0;
    background: none;
    color: var(--mk-mut);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}
.wm-mk-reset[hidden] { display: none; }
.wmw .wm-mk .wm-mk-note {
    margin: 0;
    color: var(--mk-mut);
    font-size: 12px;
    line-height: 1.4;
}
@media (min-width: 768px) {
    .wmw .wm-mk .wm-mk-note { margin-top: auto; }
}
@media (max-width: 575px) {
    .wm-mk { padding: 14px 12px; }
    .wm-mk-d { height: 34px; line-height: 34px; font-size: 14px; }
    .wmw .wm-mk .wm-mk-act .wmr-btn { flex: 1 1 auto; text-align: center; }
}
