/* Custom date picker for every input[type=date] and month picker for input[type=month]. */

.dp-field {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    box-sizing: border-box;
    border: 1px solid #E7E4F2;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.dp-field:focus-within {
    border-color: #7C6CF2;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .16);
}

.dash-range .dp-field {
    border-color: #E4DFEF;
    border-radius: 12px;
}

.dash-range .dp-field:focus-within {
    border-color: #7C6CF2;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .14);
}

.dp-field:has(input:disabled),
.dp-field:has(input:read-only) {
    background: #f6f5fb;
}

.dp-field.is-fluid {
    display: block;
    width: 100%;
}

.dp-field.is-fluid > input.dp-ready {
    width: 100%;
}

.dp-field > input.dp-ready,
.dp-field > input.dp-ready:focus,
body.design-v2 .dp-field > input.dp-ready,
body.design-v2 .dp-field > input.dp-ready:focus,
body.app-premium .dp-field > input.dp-ready,
body.app-premium .dp-field > input.dp-ready:focus {
    cursor: text;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    position: relative;
    z-index: 1;
    background: transparent !important;
    background-image: none !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    opacity: 1 !important;
    color: #1A1630;
    pointer-events: auto;
}

.dp-field.is-compact > input.dp-ready {
    padding-right: 22px;
}

body.app-premium .dp-field.is-month > input.form-control,
body.app-premium .dp-field.is-month > input.form-control:focus,
body.design-v2 .dp-field.is-month > input.form-control,
body.design-v2 .dp-field.is-month > input.form-control:focus,
.dp-field.is-month > input.dp-ready,
.dp-field.is-month > input.dp-ready:focus {
    padding-right: 42px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    clip-path: inset(0 40px 0 0);
}

body.app-premium .dp-field.is-month > .dp-open-btn,
body.design-v2 .dp-field.is-month > .dp-open-btn,
.dp-field.is-month > .dp-open-btn {
    display: flex !important;
    width: 40px !important;
    height: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 4;
    background: transparent !important;
    pointer-events: auto !important;
}

.dp-field.is-month > .dp-open-btn svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    overflow: visible !important;
}

.dp-field > input.dp-ready::-webkit-calendar-picker-indicator,
.dp-field > input.dp-ready::-webkit-clear-button,
.dp-field > input.dp-ready::-webkit-inner-spin-button {
    display: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    background: none !important;
}

.dp-open-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #7C6CF2;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.dp-field.is-compact .dp-open-btn {
    width: 22px;
}

.dp-open-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.dp-field.is-compact .dp-open-btn svg {
    width: 14px;
    height: 14px;
}

.dp-open-btn:hover,
.dp-field:focus-within .dp-open-btn {
    color: #6858e4;
}

.dp-field:has(input:disabled) .dp-open-btn,
.dp-field:has(input:read-only) .dp-open-btn {
    color: #b7b1c9;
    cursor: not-allowed;
}

body.portal-body .dp-field {
    border-color: rgba(232, 213, 255, .28);
    background: rgba(8, 2, 16, .45);
}

body.portal-body .dp-field > input.dp-ready {
    color: #f3e7c4;
}

body.portal-body .dp-field:focus-within {
    border-color: #c4b5fd;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .2);
}

body.portal-body .dp-open-btn {
    color: #e7d3a1;
}

body.portal-body .dp-open-btn:hover,
body.portal-body .dp-field:focus-within .dp-open-btn {
    color: #f3e7c4;
}

.dp-pop {
    position: fixed;
    z-index: 10050;
    box-sizing: border-box;
    width: 292px;
    max-width: calc(100vw - 16px);
    padding: 14px 12px 12px;
    border: 1px solid #E7E4F2;
    border-radius: 16px;
    background: #fff;
    color: #2C2840;
    box-shadow: 0 18px 48px rgba(44, 40, 64, 0.18);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    user-select: none;
    overflow: hidden;
}

.dp-pop::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7C6CF2, #A78BFA, #C084FC);
    pointer-events: none;
}

.dp-pop[hidden] {
    display: none !important;
}

.dp-head,
.dp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dp-head {
    margin-bottom: 8px;
}

.dp-title {
    display: flex;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
}

.dp-month,
.dp-year,
.dp-nav,
.dp-clear,
.dp-today,
.dp-day {
    margin: 0;
    border: 0;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
}

.dp-month,
.dp-year {
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    background: #F3F1FE;
    color: #6858e4;
    font-size: 13px;
    font-weight: 700;
}

.dp-month,
.dp-year {
    position: relative;
    padding-right: 22px;
}

.dp-month::after,
.dp-year::after {
    content: "";
    position: absolute;
    right: 9px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    pointer-events: none;
}

.dp-month.is-open::after,
.dp-year.is-open::after {
    margin-top: -1px;
    transform: rotate(225deg);
}

.dp-month {
    flex: 1 1 auto;
}

.dp-year {
    flex: 0 0 84px;
}

.dp-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    max-height: 196px;
    overflow: auto;
}

.dp-menu.is-years {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dp-week[hidden],
.dp-grid[hidden],
.dp-menu[hidden] {
    display: none !important;
}

.dp-opt {
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #2C2840;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.dp-opt:hover:not(:disabled):not(.is-selected) {
    background: #F3F1FE;
    color: #6858e4;
}

.dp-opt.is-selected,
.dp-opt.is-selected:hover {
    background: #7C6CF2;
    color: #fff;
}

.dp-opt.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1px #DDD6FE;
}

.dp-opt:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}

.dp-pop.is-month .dp-month {
    display: none;
}

.dp-pop.is-month .dp-year {
    flex: 1 1 auto;
}

.dp-nav,
.dp-clear,
.dp-today {
    border-radius: 10px;
    font-weight: 600;
}

.dp-nav {
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #F3F1FE;
    color: #6858e4;
    font-size: 20px;
}

.dp-nav:hover,
.dp-clear:hover,
.dp-today:hover:not(:disabled) {
    background: #E7E2FC;
}

.dp-week,
.dp-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.dp-week {
    margin-bottom: 4px;
    color: #6f6986;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.dp-day {
    height: 32px;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    color: #2C2840;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.dp-day.is-outside {
    color: #b7b1c9;
}

.dp-day:hover:not(:disabled):not(.is-selected) {
    background: #F3F1FE;
    color: #6858e4;
}

.dp-day.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1px #DDD6FE;
}

.dp-day.is-selected,
.dp-day.is-selected:hover {
    background: #7C6CF2;
    color: #fff;
}

.dp-day:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}

.dp-foot {
    margin-top: 8px;
}

.dp-clear,
.dp-today {
    height: 34px;
    padding: 0 12px;
}

.dp-clear {
    background: transparent;
    color: #6f6986;
}

.dp-today {
    background: #7C6CF2;
    color: #fff;
}

.dp-today:hover:not(:disabled) {
    background: #6858e4;
}

.dp-today:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.dp-pop button:focus,
.dp-pop select:focus {
    outline: none;
}

.dp-pop button:focus-visible,
.dp-pop select:focus-visible {
    box-shadow: inset 0 0 0 2px #2C2840;
}

.dp-day.is-selected:focus-visible,
.dp-today:focus-visible {
    box-shadow: inset 0 0 0 2px #fff;
}

body.design-v2 .dp-field {
    border-color: var(--drda-border);
    border-radius: 10px;
    background: #fff;
}

body.design-v2 .dp-field:has(input:disabled),
body.design-v2 .dp-field:has(input:read-only),
body.app-premium .dp-field:has(input:disabled),
body.app-premium .dp-field:has(input:read-only) {
    background: #F6F5FA;
    border-color: #E7E4F2;
    cursor: not-allowed;
}

body.design-v2 .dp-field:has(input:disabled) .dp-open-btn,
body.design-v2 .dp-field:has(input:read-only) .dp-open-btn,
body.app-premium .dp-field:has(input:disabled) .dp-open-btn,
body.app-premium .dp-field:has(input:read-only) .dp-open-btn {
    background: #F6F5FA;
    color: #b7b1c9;
    cursor: not-allowed;
}

body.design-v2 .dp-field:focus-within {
    border-color: var(--drda-accent);
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .16);
}

body.design-v2 .dp-open-btn {
    color: #5E4B8B;
}

body.design-v2 .dp-open-btn:hover,
body.design-v2 .dp-field:focus-within .dp-open-btn {
    color: #C5A66A;
}

body.design-v2 .dp-pop {
    border-color: #E7E4F2;
    border-radius: 16px;
    color: #2C2840;
    box-shadow: 0 16px 40px rgba(53, 34, 72, .16);
    font-family: var(--drda-font, "Plus Jakarta Sans", "Segoe UI", sans-serif);
}

body.design-v2 .dp-pop::before {
    background: linear-gradient(90deg, #5E4B8B, #C5A66A, #7C6CF2, #E7D3A1, #5E4B8B);
}

body.design-v2 .dp-month,
body.design-v2 .dp-year,
body.design-v2 .dp-nav {
    background: #F8F4EC;
    color: #5E4B8B;
}

body.design-v2 .dp-nav:hover,
body.design-v2 .dp-clear:hover,
body.design-v2 .dp-today:hover:not(:disabled) {
    background: #F3E6F1;
}

body.design-v2 .dp-week {
    color: #8A6A32;
}

body.design-v2 .dp-day:hover:not(:disabled):not(.is-selected) {
    background: #F8F4EC;
    color: #5E4B8B;
}

body.design-v2 .dp-day.is-today:not(.is-selected),
body.design-v2 .dp-opt.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1px #C5A66A;
}

body.design-v2 .dp-day.is-selected,
body.design-v2 .dp-day.is-selected:hover,
body.design-v2 .dp-opt.is-selected,
body.design-v2 .dp-opt.is-selected:hover,
body.design-v2 .dp-today {
    background: #5E4B8B;
    color: #fff;
}

body.design-v2 .dp-opt:hover:not(:disabled):not(.is-selected) {
    background: #F8F4EC;
    color: #5E4B8B;
}

body.design-v2 .dp-today:hover:not(:disabled) {
    background: #46367A;
}

body.design-v2 .dp-clear {
    color: #6E6884;
}

body.portal-body .dp-pop {
    border-color: rgba(231, 211, 161, .45);
    background: #1a1024;
    color: #f6f1e8;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
}

body.portal-body .dp-pop::before {
    background: linear-gradient(90deg, #8a6a32, #e7d3a1, #f3e7c4, #e7d3a1, #8a6a32);
}

body.portal-body .dp-month,
body.portal-body .dp-year,
body.portal-body .dp-nav {
    background: rgba(231, 211, 161, .14);
    color: #f3e7c4;
}

body.portal-body .dp-week,
body.portal-body .dp-clear,
body.portal-body .dp-day.is-outside {
    color: rgba(243, 231, 196, .55);
}

body.portal-body .dp-day {
    color: #f6f1e8;
}

body.portal-body .dp-day:hover:not(:disabled):not(.is-selected) {
    background: rgba(231, 211, 161, .16);
    color: #f3e7c4;
}

body.portal-body .dp-opt.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1px rgba(231, 211, 161, .75);
}

body.portal-body .dp-day.is-selected,
body.portal-body .dp-day.is-selected:hover,
body.portal-body .dp-opt.is-selected,
body.portal-body .dp-opt.is-selected:hover,
body.portal-body .dp-today {
    background: #e7d3a1;
    color: #2a0a4a;
}

body.portal-body .dp-opt {
    color: #f6f1e8;
}

body.portal-body .dp-opt:hover:not(:disabled):not(.is-selected) {
    background: rgba(231, 211, 161, .16);
    color: #f3e7c4;
}

body.portal-body .dp-today:hover:not(:disabled) {
    background: #f3e7c4;
}
