.rf-calendar-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2316d7aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 18px 18px;
    padding-right: 2.6rem;
}

.rf-calendar {
    position: absolute;
    z-index: 2500;
    width: 320px;
    max-width: calc(100vw - 16px);
    padding: 0.85rem;
    border: 1px solid rgb(23 33 61 / 10%);
    border-radius: 18px;
    background: #fff;
    color: #17213d;
    font-family: var(--rf-font, "Poppins", system-ui, sans-serif);
    box-shadow: 0 22px 48px rgb(23 33 61 / 22%);
    animation: rf-calendar-in 0.18s ease-out;
}

.rf-calendar[hidden] {
    display: none;
}

@keyframes rf-calendar-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rf-calendar__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.rf-calendar__nav {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgb(23 33 61 / 10%);
    border-radius: 10px;
    background: #fff;
    color: #17213d;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.rf-calendar__nav:hover:not(:disabled) {
    background: rgb(22 215 170 / 14%);
    box-shadow: 0 6px 14px rgb(23 33 61 / 14%);
    transform: translateY(-1px);
}

.rf-calendar__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rf-calendar__select {
    flex: 1 1 0;
    min-width: 0;
    height: 34px;
    padding: 0 0.5rem;
    border: 1px solid rgb(23 33 61 / 10%);
    border-radius: 10px;
    background: #fff;
    color: #17213d;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.rf-calendar__select:hover {
    border-color: #16d7aa;
}

.rf-calendar__weekdays,
.rf-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.rf-calendar__weekdays {
    margin-bottom: 4px;
}

.rf-calendar__weekday {
    padding: 0.25rem 0;
    color: #6b7489;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.rf-calendar__day {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #17213d;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.rf-calendar__day:hover:not(:disabled) {
    background: rgb(22 215 170 / 16%);
    box-shadow: 0 6px 14px rgb(23 33 61 / 14%);
    transform: translateY(-1px);
}

.rf-calendar__day:focus-visible {
    outline: 2px solid #16d7aa;
    outline-offset: 1px;
}

.rf-calendar__day.is-outside {
    color: #a3abbd;
}

.rf-calendar__day.is-today {
    border-color: #16d7aa;
    font-weight: 700;
}

.rf-calendar__day.is-selected,
.rf-calendar__day.is-selected:hover:not(:disabled) {
    border-color: #16d7aa;
    background: #16d7aa;
    color: #fff;
    box-shadow: 0 10px 22px rgb(22 215 170 / 34%);
}

.rf-calendar__day:disabled {
    opacity: 0.32;
    cursor: not-allowed;
}

.rf-calendar__foot {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgb(23 33 61 / 8%);
}

.rf-calendar__action {
    padding: 0.3rem 0.8rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #17213d;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.rf-calendar__action:hover:not(:disabled) {
    background: rgb(22 215 170 / 16%);
    box-shadow: 0 4px 12px rgb(23 33 61 / 12%);
}

.rf-calendar__action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 575.98px) {
    .rf-calendar {
        width: min(340px, calc(100vw - 16px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .rf-calendar {
        animation: none;
    }
}
