.koledar-strip {
    --koledar-strip-primary: var(--brand-primary-color, #3f7932);
    --koledar-strip-hover: var(--brand-secondary-color, #315e26);
    --koledar-strip-deep: color-mix(in srgb, var(--koledar-strip-primary) 55%, #000);
    --koledar-strip-tint: color-mix(in srgb, var(--koledar-strip-primary) 9%, #fff);
    --koledar-strip-radius: var(--brand-radius, 8px);
    margin: 0;
    font-family: var(--brand-font-family, 'Open Sans'), 'Open Sans', Arial, sans-serif;
}

.koledar-strip__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin-bottom: 14px;
}

.koledar-strip__title {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--theme-heading-color, #2e2e2e);
    font-family: Raleway, var(--brand-font-family, 'Open Sans'), sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.koledar-strip__more {
    margin-right: auto;
    color: var(--koledar-strip-primary);
    font-weight: 600;
    white-space: nowrap;
}

.koledar-strip__more:hover,
.koledar-strip__more:focus {
    color: var(--koledar-strip-hover);
}

.koledar-strip__nav:not([hidden]) {
    display: flex;
    gap: 8px;
}

.koledar-strip__arrow {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--koledar-strip-primary);
    border-radius: 50%;
    background: #fff;
    color: var(--koledar-strip-primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.koledar-strip__arrow:hover:not(:disabled),
.koledar-strip__arrow:focus-visible {
    background: var(--koledar-strip-primary);
    color: #fff;
}

.koledar-strip__arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.koledar-strip__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 16px;
    margin: 0 0 0 -6px;
    padding: 6px 6px 14px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 6px;
    scrollbar-width: thin;
}

.koledar-strip__item {
    display: flex;
    min-width: 0;
    scroll-snap-align: start;
}

.koledar-strip__card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--koledar-strip-primary) 18%, transparent);
    border-radius: var(--koledar-strip-radius);
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.koledar-strip__card:hover,
.koledar-strip__card:focus {
    border-color: var(--koledar-strip-primary);
    box-shadow: 0 6px 18px rgba(34, 65, 27, 0.12);
    color: inherit;
    text-decoration: none;
}

.koledar-strip__card:focus-visible {
    outline: 3px solid var(--koledar-strip-primary);
    outline-offset: 2px;
}

.koledar-strip__media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--koledar-strip-tint);
}

.koledar-strip__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.koledar-strip__date {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 54px;
    overflow: hidden;
    border-radius: calc(var(--koledar-strip-radius) / 2 + 2px);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    color: var(--koledar-strip-deep);
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.koledar-strip__month {
    align-self: stretch;
    padding: 4px 6px 3px;
    background: var(--koledar-strip-deep);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.koledar-strip__day {
    padding: 5px 6px 3px;
    font-size: 24px;
    font-weight: 700;
}

.koledar-strip__time {
    padding: 0 6px 5px;
    font-size: 12px;
    font-weight: 600;
}

.koledar-strip__until {
    padding: 0 6px 5px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.koledar-strip__date--ongoing .koledar-strip__until {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
}

.koledar-strip__body {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 16px;
}

.koledar-strip__place,
.koledar-strip__name + .koledar-strip__status {
    margin-top: auto;
}

.koledar-strip__card--text .koledar-strip__body {
    flex-grow: 0;
}

.koledar-strip__name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--koledar-strip-deep);
    font-family: Raleway, var(--brand-font-family, 'Open Sans'), sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.koledar-strip__card:hover .koledar-strip__name {
    color: var(--koledar-strip-hover);
}

.koledar-strip__place {
    overflow: hidden;
    color: #5e6959;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.koledar-strip__status {
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff6e0;
    color: #8a5a00;
    font-size: 12px;
    font-weight: 600;
}

.koledar-strip__status--cancelled {
    background: #fef3f2;
    color: #b42318;
}

.koledar-strip__card--text .koledar-strip__date {
    position: static;
    display: grid;
    flex: 1 0 auto;
    grid-template-columns: auto 1fr;
    grid-template-areas: "day day" "month time";
    align-content: end;
    justify-items: start;
    column-gap: 5px;
    min-width: 0;
    padding: 18px 16px 12px;
    border-radius: 0;
    background: var(--koledar-strip-tint);
    box-shadow: none;
    text-align: left;
}

.koledar-strip__card--text .koledar-strip__name {
    min-height: 2.6em;
}

.koledar-strip__card--text .koledar-strip__day {
    grid-area: day;
    padding: 0 0 4px;
    font-size: 44px;
}

.koledar-strip__card--text .koledar-strip__month {
    grid-area: month;
    align-self: auto;
    padding: 0;
    background: none;
    color: var(--koledar-strip-deep);
    font-size: 13px;
}

.koledar-strip__card--text .koledar-strip__time {
    grid-area: time;
    padding: 0;
    color: #5e6959;
    font-size: 13px;
}

.koledar-strip__card--text .koledar-strip__time::before {
    content: "· ";
}

.koledar-strip__card--text .koledar-strip__until {
    grid-column: 1 / -1;
    padding: 2px 0 0;
    color: #5e6959;
    font-size: 13px;
}

.koledar-strip__card--text .koledar-strip__date--ongoing .koledar-strip__until {
    padding: 0;
    color: var(--koledar-strip-deep);
    font-size: 24px;
    line-height: 1.2;
}

.koledar-strip__item--all {
    align-items: center;
    justify-content: center;
    border-radius: var(--koledar-strip-radius);
    background: var(--koledar-strip-tint);
}

@media (max-width: 575px) {
    .koledar-strip__more {
        flex-basis: 100%;
    }
}

@media (min-width: 576px) {
    .koledar-strip__track {
        grid-auto-columns: 260px;
    }
}

@media (min-width: 768px) {
    .koledar-strip__title {
        font-size: 24px;
    }
}
