/* Jalali multi-month datepicker */
.jdp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0,0,0,.35);
  display: none;
}
.jdp-overlay.jdp-open { display: block; }

.jdp-container {
  position: fixed;
  z-index: 1051;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: min(95vw, 720px);
  max-height: 85vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  font-family: font-regular, "tahoma", sans-serif;
  font-weight: normal;
  font-size: 14px;
  direction: rtl;
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: #2f2b3d;
}
.jdp-container.jdp-open { display: flex; }

/* top bar */
.jdp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 10px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-bottom: 1px solid #e5e5e5;
}
.jdp-topbar-title {
  font-family: font-bold, "tahoma", sans-serif;
  font-weight: normal;
  font-size: 15px;
  color: #000;
}
.jdp-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #5e5e5e;
  font-size: 20px;
  line-height: 1;
}

/* scrollable body — side-by-side months */
.jdp-body {
  overflow-y: auto;
  padding: 16px 24px;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

/* single month — two columns on desktop */
.jdp-month {
  width: 100%;
  max-width: 310px;
  flex-shrink: 0;
}

.jdp-month-header {
  font-family: font-bold, "tahoma", sans-serif;
  font-weight: normal;
  font-size: 14px;
  text-align: center;
  padding: 4px 0 14px;
  color: #000;
}

/* weekday header row */
.jdp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.jdp-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: font-regular, "tahoma", sans-serif;
  color: #5e5e5e;
  height: 28px;
}

/* day grid */
.jdp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}

.jdp-day {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  position: relative;
  font-family: font-regular, "tahoma", sans-serif;
}
.jdp-day-inner {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: #2f2b3d;
  transition: background .15s, color .15s;
}

.jdp-day:hover .jdp-day-inner {
  background: #f3f3f3;
}

/* friday */
.jdp-day.jdp-friday .jdp-day-inner {
  color: #e6514e;
}

/* disabled / past */
.jdp-day.jdp-disabled {
  pointer-events: none;
  cursor: default;
}
.jdp-day.jdp-disabled .jdp-day-inner {
  color: #c8c4cd;
}

/* today ring */
.jdp-day.jdp-today .jdp-day-inner {
  box-shadow: inset 0 0 0 1.5px #000;
}

/* selected */
.jdp-day.jdp-selected .jdp-day-inner {
  background: #000;
  color: #fff !important;
}
.jdp-day.jdp-selected:hover .jdp-day-inner {
  background: #1a1a1a;
}

/* empty placeholder */
.jdp-day-empty {
  aspect-ratio: 1;
}

/* bottom confirm button */
.jdp-footer {
  padding: 12px 24px;
  border-top: 1px solid #e5e5e5;
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.jdp-confirm-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-family: font-bold, "tahoma", sans-serif;
  font-weight: normal;
  font-size: 15px;
  cursor: pointer;
  transition: opacity .15s;
}
.jdp-confirm-btn:hover { opacity: .88; }
.jdp-confirm-btn:disabled {
  opacity: .4;
  cursor: default;
}

/* tooltip on hover */
.jdp-day .jdp-tooltip {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  font-size: 11px;
  font-family: font-regular, "tahoma", sans-serif;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 5;
}
.jdp-day .jdp-tooltip::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  background: #000;
}
.jdp-day:not(.jdp-disabled):not(.jdp-day-empty):hover .jdp-tooltip {
  opacity: 1;
}

/* mobile: single column, narrower */
@media (max-width: 640px) {
  .jdp-container { width: min(95vw, 380px); }
  .jdp-month { max-width: 100%; }
}
