.bs-date-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.bs-date-wrap > input {
    width: 100%;
    min-height: 2.7rem;
    box-sizing: border-box;
    padding: 0.7rem 3rem 0.7rem 0.75rem !important;
    border: 1px solid var(--border-color, #dbe2e8);
    border-radius: 0.5rem;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.35;
}

.bs-date-wrap.is-open > input,
.bs-date-wrap:focus-within > input {
    border-color: #3bbbc9 !important;
    box-shadow: 0 0 0 3px rgba(59, 187, 201, 0.16) !important;
}

.bs-date-trigger {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 0;
    border-radius: 0.5rem;
    background: #e9fbfd;
    color: #008da3;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
}

.bs-date-trigger:hover {
    background: #d8f6fa;
}

.bs-date-popup {
    position: absolute;
    left: 0;
    top: calc(100% + 0.45rem);
    z-index: 1000;
    display: none;
    width: min(21rem, calc(100vw - 2rem));
    padding: 1rem;
    border: 1px solid #c8edf2;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    color: #0f172a;
}

.bs-date-wrap.is-open .bs-date-popup {
    display: block;
}

.bs-date-head {
    display: grid;
    grid-template-columns: 2.25rem 1fr 2.25rem;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.bs-date-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 900;
    color: #0f172a;
}

.bs-date-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid #dbe7ea;
    border-radius: 0.55rem;
    background: #f8fbfc;
    color: #0f172a;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.bs-date-nav:hover {
    border-color: #3bbbc9;
    color: #008da3;
}

.bs-date-weekdays,
.bs-date-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

.bs-date-weekdays {
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.bs-date-weekdays span:first-child {
    color: #e11d48;
}

.bs-date-weekdays span:last-child {
    color: #2563eb;
}

.bs-date-day,
.bs-date-spacer {
    min-width: 0;
    aspect-ratio: 1 / 1;
}

.bs-date-day {
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
}

.bs-date-day:hover:not(:disabled) {
    background: #e9fbfd;
    border-color: #9be4ed;
    color: #007f94;
}

.bs-date-day.is-sunday {
    color: #e11d48;
}

.bs-date-day.is-saturday {
    color: #2563eb;
}

.bs-date-day.is-today {
    border-color: #3bbbc9;
}

.bs-date-day.is-selected {
    background: #3bbbc9;
    border-color: #3bbbc9;
    color: #fff;
}

.bs-date-day:disabled {
    cursor: not-allowed;
    color: #cbd5e1;
    background: transparent;
}

.bs-date-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e5edf0;
}

.bs-date-footer button {
    border: 0;
    background: transparent;
    color: #008da3;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 900;
}

.bs-date-footer button:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .bs-date-popup {
        left: 50%;
        transform: translateX(-50%);
        width: min(21rem, calc(100vw - 2rem));
    }
}
