/*
 * SayLife — calendar of the date fields on a computer (assets/js/date-picker.js), shared by the advisor space, the
 * portal and the questionnaire. Standalone: prefix slap-dp, every rule carried by .slap-dp:not(#\#) so a theme or an
 * Elementor kit cannot reach it. The field keeps its own look; only its icon changes (the browser's grey picker
 * icon becomes the module's calendar).
 */

/* The field: the browser's picker icon is replaced by the module's (Chromium, mouse or trackpad) */
@media (hover: hover) and (pointer: fine) {
    .slap-dp-ready input[type="date"]:not([data-native-date])::-webkit-calendar-picker-indicator { display: none; }
    .slap-dp-ready input[type="date"]:not([data-native-date]) {
        cursor: pointer;
        padding-right: 40px !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234E5F80' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 12px center !important;
        background-size: 18px !important;
    }
    .slap-dp-ready input[type="date"]:not([data-native-date])::-webkit-datetime-edit { cursor: text; }
}

.slap-dp:not(#\#) {
    --dp-accent: #237AFC;
    --dp-ink: #111A2E;
    --dp-soft: #5D6577;
    --dp-mute: #9AA1AE;
    --dp-ease: cubic-bezier(0.23, 1, 0.32, 1);
    position: fixed;
    inset: auto;
    z-index: 100010;
    box-sizing: border-box;
    width: 296px;
    margin: 0;
    padding: 12px 12px 8px;
    color: var(--dp-ink);
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 18px 40px -12px rgba(17, 26, 46, 0.28), 0 4px 12px -6px rgba(17, 26, 46, 0.12);
    overflow: visible;
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
    pointer-events: none;
    visibility: hidden;
}
.slap-dp:not(#\#) *, .slap-dp:not(#\#) *::before, .slap-dp:not(#\#) *::after { box-sizing: border-box; }
.slap-dp.is-open:not(#\#) {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 160ms var(--dp-ease), transform 200ms var(--dp-ease);
}
.slap-dp.is-leaving:not(#\#) { visibility: visible; transition: opacity 120ms ease-out, transform 120ms ease-out; }

/* Buttons: no theme style (font, colour, border, shadow, uppercase) */
.slap-dp:not(#\#) button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    font: inherit;
    letter-spacing: 0;
    text-transform: none;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.slap-dp:not(#\#) button:focus { outline: none; }
.slap-dp:not(#\#) button:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: 1px; }
.slap-dp:not(#\#) button:disabled { cursor: default; }
.slap-dp:not(#\#) button[hidden] { display: none; }

.slap-dp:not(#\#) .slap-dp__head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.slap-dp:not(#\#) .slap-dp__title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.slap-dp:not(#\#) .slap-dp__title::first-letter { text-transform: uppercase; }
.slap-dp:not(#\#) .slap-dp__nav { width: 32px; height: 32px; color: var(--dp-accent); transition: background-color 140ms ease; }
.slap-dp:not(#\#) .slap-dp__nav:hover { background: rgba(35, 122, 252, 0.1); }
.slap-dp:not(#\#) .slap-dp__nav:active { transform: scale(0.94); }

.slap-dp:not(#\#) .slap-dp__week,
.slap-dp:not(#\#) .slap-dp__row { display: grid; grid-template-columns: repeat(7, 1fr); }
.slap-dp:not(#\#) .slap-dp__week span { padding: 4px 0 6px; font-size: 11px; font-weight: 600; color: var(--dp-mute); text-align: center; }

.slap-dp:not(#\#) .slap-dp__day {
    width: 36px;
    height: 36px;
    margin: 1px auto;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    transition: background-color 120ms ease, color 120ms ease;
}
.slap-dp:not(#\#) .slap-dp__day:hover:not(:disabled):not(.is-chosen) { background: rgba(118, 118, 128, 0.12); }
.slap-dp:not(#\#) .slap-dp__day:active:not(:disabled) { transform: scale(0.92); }
.slap-dp:not(#\#) .slap-dp__day.is-out { color: var(--dp-mute); }
.slap-dp:not(#\#) .slap-dp__day.is-today { color: var(--dp-accent); font-weight: 600; }
.slap-dp:not(#\#) .slap-dp__day.is-chosen { color: #fff; font-weight: 600; background: var(--dp-accent); }
.slap-dp:not(#\#) .slap-dp__day:disabled { color: var(--dp-mute); opacity: 0.4; text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, 0.25); }

.slap-dp:not(#\#) .slap-dp__foot { display: flex; justify-content: space-between; margin: 6px 0 0; padding: 8px 4px 0; border-top: 0.5px solid rgba(0, 0, 0, 0.1); }
.slap-dp:not(#\#) .slap-dp__link { padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--dp-accent); transition: background-color 140ms ease; }
.slap-dp:not(#\#) .slap-dp__link:hover:not(:disabled) { background: rgba(35, 122, 252, 0.1); }
.slap-dp:not(#\#) .slap-dp__link:disabled { color: var(--dp-mute); }
.slap-dp:not(#\#) .slap-dp__link--quiet { color: var(--dp-soft); }

@media (prefers-reduced-motion: reduce) {
    .slap-dp:not(#\#), .slap-dp.is-open:not(#\#) { transform: none; transition: opacity 120ms ease; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .slap-dp:not(#\#) { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
    .slap-dp:not(#\#) { box-shadow: 0 0 0 1px #111A2E, 0 18px 40px -12px rgba(17, 26, 46, 0.28); }
}
