/* Jalali (Shamsi) date picker — shared by the public site and the control panel. */

.jp-pop {
  position: fixed;
  z-index: 9000;
  display: none;
  width: 274px;
  border: 1px solid var(--line, #e7e7e2);
  border-radius: 16px;
  padding: 12px;
  background: var(--paper, #fff);
  box-shadow: 0 22px 48px rgba(35, 39, 29, .18);
  direction: rtl;
  color: var(--ink, #34382f);
  font-family: "Vazirmatn", Tahoma, sans-serif;
}

.jp-pop.is-open { display: block; }

.jp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.jp-title {
  flex: 1;
  color: var(--ink-strong, #24271f);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.jp-nav {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line, #e7e7e2);
  border-radius: 9px;
  background: var(--paper-soft, #fafaf7);
  color: var(--purple-deep, #5736ba);
  font-size: 15px;
  line-height: 1;
  place-items: center;
}

.jp-nav:hover { background: var(--purple-soft, #f0edff); }

.jp-week,
.jp-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.jp-week {
  margin-bottom: 4px;
  color: var(--muted, #70746b);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.jp-week span { padding: 4px 0; }

.jp-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink, #34382f);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  transition: background .15s, color .15s;
}

.jp-day:hover { background: var(--purple-soft, #f0edff); color: var(--purple-deep, #5736ba); }

.jp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--yellow, #f4c928); }

.jp-day.is-selected {
  background: var(--purple, #7254dc);
  color: #fff;
  box-shadow: none;
}

.jp-blank { aspect-ratio: 1; }

.jp-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  border-top: 1px solid var(--line, #e7e7e2);
  padding-top: 10px;
}

.jp-today {
  flex: 1;
  border: 0;
  border-radius: 9px;
  padding: 8px;
  background: var(--purple-soft, #f0edff);
  color: var(--purple-deep, #5736ba);
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
}

.jp-today:hover { background: var(--purple, #7254dc); color: #fff; }

.jp-time {
  width: 74px;
  border: 1px solid var(--line, #e7e7e2);
  border-radius: 9px;
  padding: 8px;
  background: var(--paper-soft, #fafaf7);
  color: var(--ink, #34382f);
  font-family: inherit;
  font-size: 11px;
  text-align: center;
  direction: ltr;
}

.jp-time:focus,
.jp-nav:focus-visible,
.jp-day:focus-visible,
.jp-today:focus-visible {
  outline: 2px solid var(--yellow, #f4c928);
  outline-offset: 1px;
}

/* The field itself: keep the Latin-digit value readable and aligned. */
input.jalali-date-input {
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
}

@media (max-width: 420px) {
  .jp-pop { width: min(274px, calc(100vw - 24px)); }
}
