.pdp-popup {
    --pdp-accent: #ff523d;
    --pdp-accent-dark: #e04530;
    position: fixed;
    z-index: 20000;
    width: 328px;
    background: #fff;
    border: 0;
    border-radius: 20px;
    box-shadow:
        0 4px 8px rgba(16, 0, 44, 0.04),
        0 18px 40px rgba(16, 0, 44, 0.12),
        0 0 0 1px rgba(255, 82, 61, 0.08);
    padding: 0;
    font-family: inherit;
    color: #1f2937;
    user-select: none;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transform-origin: top center;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.pdp-popup.is-open {
    opacity: 1;
    transform: none;
}

.pdp-popup * {
    box-sizing: border-box;
}

.pdp-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 12px 16px;
    background: linear-gradient(135deg, var(--pdp-accent) 0%, var(--pdp-accent-dark) 100%);
    color: #fff;
}

.pdp-title,
.pdp-nav,
.pdp-day,
.pdp-year,
.pdp-today,
.pdp-close {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.pdp-nav {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.15s ease, transform 0.15s ease;
}

.pdp-nav svg {
    width: 14px;
    height: 14px;
    display: block;
}

.pdp-nav:hover {
    background: rgba(255, 255, 255, 0.26);
}

.pdp-nav:active {
    transform: scale(0.94);
}

.pdp-title {
    flex: 1;
    min-height: 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 2px 8px;
    transition: background 0.15s ease;
}

.pdp-title:hover {
    background: rgba(255, 255, 255, 0.14);
}

.pdp-month-name {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.pdp-year-text {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.88;
    letter-spacing: 0.02em;
}

.pdp-body {
    padding: 12px 12px 4px;
}

.pdp-weekdays,
.pdp-days,
.pdp-years {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.pdp-years {
    grid-template-columns: repeat(3, 1fr);
    min-height: 228px;
    gap: 8px;
    padding: 4px 0 8px;
}

.pdp-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    padding: 4px 0 8px;
}

.pdp-day,
.pdp-year {
    height: 38px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums lining-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    margin: 0 auto;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.pdp-year {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    font-size: 15px;
}

.pdp-day.is-empty {
    visibility: hidden;
    pointer-events: none;
}

.pdp-day.is-weekend {
    color: #9ca3af;
}

.pdp-day:hover:not(:disabled):not(.is-selected),
.pdp-year:hover:not(.is-selected) {
    background: #fff1ee;
    color: var(--pdp-accent);
}

.pdp-day.is-today:not(.is-selected) {
    box-shadow: inset 0 0 0 1.5px var(--pdp-accent);
    color: var(--pdp-accent);
}

.pdp-day.is-selected,
.pdp-year.is-selected {
    background: var(--pdp-accent);
    color: #fff;
    box-shadow: 0 8px 16px rgba(255, 82, 61, 0.32);
}

.pdp-day.is-selected:hover,
.pdp-year.is-selected:hover {
    background: var(--pdp-accent-dark);
}

.pdp-day:disabled {
    color: #d1d5db;
    cursor: default;
    background: transparent;
    box-shadow: none;
}

.pdp-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    padding: 10px 12px 12px;
    background: #fafafa;
    border-top: 1px solid #f3f4f6;
}

.pdp-today,
.pdp-close {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pdp-today {
    color: var(--pdp-accent);
    background: #fff1ee;
}

.pdp-today:hover {
    background: var(--pdp-accent);
    color: #fff;
}

.pdp-close {
    color: #6b7280;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}

.pdp-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.persian-datepicker-toggle {
    cursor: pointer;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f6 100%) !important;
    border: 1px solid #ffd7d0 !important;
    color: var(--pdp-accent, #ff523d);
    min-width: 48px;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.persian-datepicker-toggle:hover {
    background: #ff523d !important;
    color: #fff;
    box-shadow: 0 8px 16px rgba(255, 82, 61, 0.28);
}

input.persian-datepicker:focus {
    border-color: #ff523d !important;
    box-shadow: 0 0 0 3px rgba(255, 82, 61, 0.16);
}

@media (max-width: 360px) {
    .pdp-popup {
        width: min(328px, calc(100vw - 16px));
    }
}
