/* Lightweight Jalali datepicker dropdown — fixed to viewport */
.jdp-wrap {
  position: relative;
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
}
.jdp-wrap > input.jalali-date-input {
  width: 100%;
  min-width: 0;
}
.jdp-popup {
  display: none;
  position: fixed;
  z-index: 4000;
  width: 280px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow: auto;
  background: #fff;
  border: 1px solid #d7dde5;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 32, 51, 0.18);
  padding: 0.7rem;
  direction: rtl;
  box-sizing: border-box;
}
.jdp-popup.open { display: block; animation: jdpIn 0.15s ease; }
@keyframes jdpIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.jdp-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.4rem; margin-bottom: 0.55rem;
}
.jdp-header button {
  font: inherit; border: 1px solid #d7dde5; background: #f8fafc;
  border-radius: 8px; width: 2rem; height: 2rem; cursor: pointer;
  color: #1f3a5f;
}
.jdp-header button:hover { background: #e8eef7; }
.jdp-title { font-weight: 700; font-size: 0.95rem; color: #142033; }
.jdp-weekdays, .jdp-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.jdp-weekdays span {
  text-align: center; font-size: 0.72rem; color: #5b6b7c; padding: 0.25rem 0;
}
.jdp-days button {
  font: inherit; border: none; background: transparent;
  border-radius: 8px; height: 2rem; cursor: pointer; color: #142033;
}
.jdp-days button:hover:not(:disabled) { background: #e8eef7; }
.jdp-days button.muted { color: #a0aec0; }
.jdp-days button.selected { background: #1f3a5f; color: #fff; font-weight: 700; }
.jdp-days button.today { box-shadow: inset 0 0 0 1px #0f766e; }
.jdp-days button:disabled { cursor: default; visibility: hidden; }
.jdp-footer {
  display: flex; justify-content: space-between; gap: 0.4rem; margin-top: 0.55rem;
}
.jdp-footer button {
  font: inherit; font-size: 0.82rem; border: 1px solid #d7dde5;
  background: #fff; border-radius: 8px; padding: 0.35rem 0.6rem; cursor: pointer;
}
.jdp-footer button.primary { background: #1f3a5f; color: #fff; border-color: #1f3a5f; }
