[date-range-picker] {
    position: relative;
}

.app-date-range-picker {
    --drp-purple: #6f4df6;
    --drp-range: rgba(107, 78, 255, 0.1);
    --drp-text: #08070b;
    --drp-muted: #9a9a9f;
    --drp-weekday: #b9b9bd;
    --drp-line: #efedf4;

    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 99999;
    width: 396px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    background: #fff;
    border: 0;
    border-radius: 5px;
    box-shadow: 0 16px 45px rgba(36, 24, 77, .10);
    padding: 0 15px 22px;
    color: var(--drp-text);
    font-family: inherit;
    user-select: none;
    padding-bottom:30px;
}

.app-date-range-picker[hidden] {
    display: none !important;
}

.app-date-range-picker__header {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    min-height: 42px;
    margin: 15px 28px 22px;
    position: relative;
    margin-bottom:36px;
}

.app-date-range-picker__header:after {
    left: 0;
    bottom: -5px;
    right: 0;
    margin: auto;
    content: '';
    height: 1px;
    width: 116px;
    background: rgba(0, 0, 0, 0.05);
    position: absolute;
    
}

.app-date-range-picker__current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.app-date-range-picker__month-select,
.app-date-range-picker__year-select {
    min-width: 0;
    height: 36px;
    border: 1px solid #efedf4;
    border-radius: 6px;
    background: #fff;
    color: var(--drp-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 8px;
}

.app-date-range-picker__month-select {
    width: 128px;
}

.app-date-range-picker__year-select {
    width: 86px;
}

.app-date-range-picker__month-select:focus-visible,
.app-date-range-picker__year-select:focus-visible {
    outline: 2px solid var(--drp-purple);
    outline-offset: 2px;
}

.app-date-range-picker__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--drp-purple);
    cursor: pointer;
    border-radius: 999px;
    padding: 0;
}

.app-date-range-picker__nav svg {
    width: 17px;
    height: 17px;
    stroke: #6B4EFF;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-date-range-picker__nav:hover,
.app-date-range-picker__nav:focus-visible {
    background: var(--drp-range);
    outline: none;
}

.app-date-range-picker__weekdays,
.app-date-range-picker__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.app-date-range-picker__weekdays {
    margin: 0 0 18px;
}

.app-date-range-picker__weekday,
.app-date-range-picker__day {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.app-date-range-picker__weekday {
    height: 20px;
    font-size: 13px;
    line-height: 20px;
    color: var(--drp-weekday);
    font-weight: 400;
}

.app-date-range-picker__day {
    position: relative;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--drp-text);
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    isolation: isolate;
    padding: 0;
}

.app-date-range-picker__day::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0px;
    bottom: 0px;
    z-index: -2;
    background: transparent;
    border-radius: 0;
}

.app-date-range-picker__day::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    z-index: -1;
    background: transparent;
}

.app-date-range-picker__day.is-other-month {
    color: var(--drp-muted);
}

.app-date-range-picker__day.is-in-range::before,
.app-date-range-picker__day.is-range-start::before,
.app-date-range-picker__day.is-range-end::before {
    background: var(--drp-range);
}

/*
 * Laat de range netjes aansluiten op het paarse start- en eindbolletje.
 * De achtergrond begint/eindigt op de buitenrand van de cirkel, zodat de range
 * als één afgeronde pil doorloopt in plaats van als een hoekige balk.
 */
.app-date-range-picker__day.is-range-start::before {
    left: calc(50% - 17px);
    right: 0;
    border-radius: 999px 0 0 999px;
}

.app-date-range-picker__day.is-range-end::before {
    left: 0;
    right: calc(50% - 17px);
    border-radius: 0 999px 999px 0;
}

.app-date-range-picker__day.is-range-start.is-range-end::before,
.app-date-range-picker__day.is-selected::before {
    left: calc(50% - 17px);
    right: calc(50% - 17px);
    border-radius: 999px;
}

.app-date-range-picker__day.is-in-range:nth-child(7n + 1)::before {
    border-radius: 4px 0 0 4px;
}

.app-date-range-picker__day.is-in-range:nth-child(7n)::before {
    border-radius: 0 4px 4px 0;
}

.app-date-range-picker__day.is-selected,
.app-date-range-picker__day.is-range-start,
.app-date-range-picker__day.is-range-end {
    color: #fff;
    font-weight: 700;
}

.app-date-range-picker__day.is-selected::after,
.app-date-range-picker__day.is-range-start::after,
.app-date-range-picker__day.is-range-end::after {
    background: var(--drp-purple);
}

.app-date-range-picker__day:hover::after,
.app-date-range-picker__day:focus-visible::after {
    box-shadow: inset 0 0 0 2px var(--drp-purple);
}

.app-date-range-picker__day:focus-visible {
    outline: none;
}

.app-date-range-picker__footer {
    margin-top: 24px;
    text-align: center;
}

.app-date-range-picker__label {
    margin-bottom: 8px;
    color: #999999;
    
    font-weight: 400;
 
    font-size: 9px;
  
    line-height: 30px;
    letter-spacing: 3px;
    text-align: center;

    text-transform: uppercase;
}

.app-date-range-picker__summary {
    color: var(--drp-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .app-date-range-picker {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100vw - 20px);
        padding-inline: 10px;
    }

    .app-date-range-picker__header {
        margin-inline: 66px;
    }
}


.app-date-range-picker__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #8b8b8b;
    font-size: 24px;
    line-height: 28px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.app-date-range-picker__close:hover {
    background: rgba(0,0,0,0.05);
    color: #000;
}

.app-date-range-picker {
    position: absolute;
}

.app-date-range-picker__day.is-disabled {
    color: #d4d4d8;
    cursor: not-allowed;
    pointer-events: none;
}

.app-date-range-picker__day.is-disabled::before,
.app-date-range-picker__day.is-disabled::after {
    display: none;
}


@media (max-width: 767px) {
    .app-date-range-picker {
        width: calc(100vw - 20px);
        max-width: 360px;
        padding: 0 10px 24px;
    }

    .app-date-range-picker__header {
        grid-template-columns: 34px 1fr 34px;
        min-height: 38px;
        margin: 12px 14px 28px;
    }

    .app-date-range-picker__current {
        gap: 6px;
    }

    .app-date-range-picker__month-select,
    .app-date-range-picker__year-select {
        height: 34px;
        font-size: 13px;
        padding: 0 6px;
    }

    .app-date-range-picker__month-select {
        width: 112px;
    }

    .app-date-range-picker__year-select {
        width: 78px;
    }

    .app-date-range-picker__nav {
        width: 34px;
        height: 34px;
    }

    .app-date-range-picker__nav svg {
        width: 15px;
        height: 15px;
    }

    .app-date-range-picker__weekdays {
        margin-bottom: 12px;
    }

    .app-date-range-picker__weekday {
        font-size: 11px;
        height: 18px;
    }

    .app-date-range-picker__day {
        height: 36px;
        font-size: 13px;
    }

    .app-date-range-picker__day::after {
        width: 34px;
        height: 34px;
    }

    .app-date-range-picker__day.is-range-start::before {
        left: calc(50% - 14px);
    }

    .app-date-range-picker__day.is-range-end::before {
        right: calc(50% - 14px);
    }

    .app-date-range-picker__day.is-range-start.is-range-end::before,
    .app-date-range-picker__day.is-selected::before {
        left: calc(50% - 14px);
        right: calc(50% - 14px);
    }

    .app-date-range-picker__footer {
        margin-top: 18px;
    }

    .app-date-range-picker__label {
        font-size: 8px;
        line-height: 22px;
        letter-spacing: 2px;
        margin-bottom: 4px;
    }

    .app-date-range-picker__summary {
        font-size: 13px;
    }

    .app-date-range-picker__close {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 20px;
        line-height: 24px;
    }
}

.app-date-range-picker-field {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.app-date-range-picker-field > input {
    width: 100%;
}

.app-date-range-picker__input[readonly] {
    cursor: pointer;
    caret-color: transparent;
}

.app-date-range-picker__header select {
    margin:0 !important;
}

