.parham-jalali-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    direction: rtl;
}

.parham-jalali-field__display {
    width: 100%;
    min-height: 40px;
    text-align: right;
    direction: rtl;
}

.parham-jalali-field__button {
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.parham-jalali-field__standard {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.parham-jalali-picker {
    position: absolute;
    z-index: 100000;
    top: calc(100% + 4px);
    right: 0;
    width: min(320px, 94vw);
    padding: 12px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
    color: #1d2327;
    font-family: inherit;
}

.parham-jalali-picker[hidden] {
    display: none;
}

.parham-jalali-picker__header,
.parham-jalali-picker__footer,
.parham-jalali-picker__time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.parham-jalali-picker__header button {
    padding: 4px 10px;
    border: 0;
    background: transparent;
    color: #2271b1;
    font-size: 24px;
    cursor: pointer;
}

.parham-jalali-picker__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin: 10px 0;
    text-align: center;
}

.parham-jalali-picker__weekday {
    padding: 5px 0;
    color: #646970;
    font-weight: 600;
}

.parham-jalali-picker__day {
    min-width: 32px;
    min-height: 32px;
    padding: 3px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.parham-jalali-picker__day:hover,
.parham-jalali-picker__day:focus {
    border-color: #2271b1;
    outline: none;
}

.parham-jalali-picker__day.is-selected {
    background: #2271b1;
    color: #fff;
}

.parham-jalali-picker__day.is-today:not(.is-selected) {
    border-color: #2271b1;
    font-weight: 700;
}

.parham-jalali-picker__time {
    justify-content: center;
    margin: 8px 0 12px;
    direction: ltr;
}

.parham-jalali-picker__time input,
.parham-jalali-picker__time select {
    width: 64px;
    text-align: center;
}

.parham-jalali-picker__footer button {
    padding: 5px 10px;
    border: 0;
    background: transparent;
    color: #2271b1;
    cursor: pointer;
}

body.rtl .parham-jalali-picker {
    right: 0;
    left: auto;
}

/* WordPress does not expose a public replacement hook for its Gregorian
 * PostSchedule picker. The custom control uses the official SlotFill/data store;
 * this selector only suppresses the duplicate core row on the supported version. */
body.parham-jalali-block-editor .editor-post-panel__row:has(.editor-post-schedule__panel-dropdown) {
    display: none;
}

.parham-native-post-date-slot,
.parham-native-post-date {
    width: 100%;
}

.parham-native-post-date {
    position: relative;
    display: grid;
    gap: 8px;
    direction: rtl;
}

.parham-native-post-date__label {
    font-weight: 600;
}

.parham-native-post-date__picker {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
}

body.comment-php .edit-timestamp,
body.comment-php #timestampdiv {
    display: none !important;
}

.parham-native-comment-date {
    position: relative;
}

.parham-native-comment-date__fields {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    direction: rtl;
}

.parham-native-comment-date__date-row {
    display: flex;
    gap: 6px;
}

.parham-native-comment-date__date-row input,
#parham-comment-jalali-time {
    width: 100%;
    direction: rtl;
    text-align: right;
}

.parham-native-comment-date .parham-jalali-picker {
    top: 68px;
    right: 0;
}
