/* Simple modern date range picker modal - Russian */
.datepicker-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s ease, visibility 0s .2s;
    color: #333;
}

.datepicker-modal.open {
    visibility: visible;
    opacity: 1;
    transition: opacity .2s ease
}

.dp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45)
}

.dp-content {
    position: relative;
    background: #fff;
    color: #333;
    border-radius: 10px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    z-index: 1;
    padding: 0;
    transform: translateY(8px);
    transition: transform .22s ease, opacity .18s ease;
    overflow: visible;
}

.datepicker-modal.open .dp-content {
    transform: none
}

/* Variant header styles */
.datepicker-modal--danger .dp-header { background: linear-gradient(90deg, #ef4444, #dc2626); }
.datepicker-modal--success .dp-header { background: linear-gradient(90deg, #10b981, #059669); }
.datepicker-modal--info .dp-header { background: linear-gradient(90deg, #0284c7, #06b6d4); }
.datepicker-modal--accent .dp-header { background: linear-gradient(90deg, #7c3aed, #4b1dff); }

.dp-close {
    position: absolute;
    right: -22px;
    top: -22px;
    border: none;
    background: transparent;
    color: inherit;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
    padding: 6px;
    margin: 0;
    transition: background .12s ease, transform .06s ease;
    z-index: 10;
}

.dp-close:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: scale(1.03);
}

.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    background: linear-gradient(90deg, #5b21b6, #7c3aed);
    color: #fff;
    border-radius: 10px 10px 0 0;
}

.dp-header .dp-month {
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    flex: 1;
    color: #fff;
}

.dp-prev,
.dp-next {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s ease;
}

.dp-prev:hover,
.dp-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dp-calendar {
    display: grid;
    grid-template-columns: repeat(7, 40px);
    gap: 6px;
    justify-content: center;
    padding: 12px;
    background: #fff;
}

.dp-calendar .dp-weekday {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 6px 0
}

.dp-calendar .dp-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer
}

.dp-day.disabled {
    color: #bbb;
    cursor: default;
    background: transparent
}

.dp-day:hover:not(.disabled) {
    background: #f3f7ff
}

.dp-day.start,
.dp-day.end {
    background: linear-gradient(90deg, #6d28d9, #9333ea);
    color: #fff;
}

.dp-day.start:hover, .dp-day.end:hover {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.dp-day.in-range {
    background: #e0d4ff;
    border-radius: 6px;
}

.dp-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    background: #f6f7fb;
    border-radius: 0 0 10px 10px;
}

.dp-reset,
.dp-accept {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: transform .06s ease, box-shadow .12s ease;
}

.dp-reset:active,
.dp-accept:active {
    transform: translateY(1px);
}

.dp-reset {
    background: #fff;
    color: #374151;
    border-color: #e6e7eb;
}

.dp-reset:hover {
    background: #f8fafc;
}

.dp-accept {
    background: linear-gradient(90deg, #6d28d9, #9333ea);
    color: #fff;
}

.dp-accept:hover {
    filter: brightness(.98);
}

@media (max-width:520px) {
    .datepicker-modal {
        padding: 12px;
    }
    
    .dp-content {
        margin: 0 auto;
        max-width: calc(100% - 24px);
    }

    .dp-calendar {
        grid-template-columns: repeat(7, calc((100% - 36px)/7));
        gap: 4px
    }

    .dp-day {
        width: 100%;
        height: 36px
    }
    
    .dp-footer {
        padding: 12px;
    }
}

@media (max-width:420px) {
    .dp-calendar {
        grid-template-columns: repeat(7, calc((100% - 36px)/7));
        gap: 4px
    }

    .dp-day {
        width: 100%;
        height: 36px
    }
}