/* ============================================================================
   persiandatepicker.css — R93 (2026-09-05)
   Base styles from the operator's uploaded picker + integration layer:
   - .pd-anchor wrappers (position:relative) so the floating panel anchors
     under its input inside modals
   - RTL placement, safe z-index above .visit-modal (1200) and Bootstrap
     modals (1055)
   - Brand theme: emerald selected/today, gold holiday numbers, Vazirmatn
   - Mobile fit: panel never exceeds the viewport minus margins
   ========================================================================== */

/* ---------- base (uploaded) ---------- */
.calendar-header {
    padding: 10px;
    text-align: center;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 10px;
}

.calendar-day {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid;
    border-color: #e6e7f2;
    text-align: center;
    cursor: pointer;
}

.calendar-month-change{
    font-size: 0.9rem;
    width: 60px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid;
    border-color: #e6e7f2;
    text-align: center;
    cursor: pointer;
    display: inline-block;
}
.calendar-change-body{
    margin: 20px 0;
}


.calendar-btn{
    cursor: pointer;
    font-size: 0.8rem;
}

.disabled {
    color: #aaa;
    pointer-events: none;
}

.day-title{
    font-size: 0.9rem;
    opacity: 0.5;
    padding: 5px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
}
.day-full-title{
    font-size: 0.65rem;
}
.calendar-arrow{
    cursor: pointer;
    background-color: unset;
    border: unset;
}

.holiday{
    color: rgb(255, 63, 63);
}

.hidden{
    display: none;
}

#change-year-month{
    cursor: pointer;
}

.year-input-parent {
    display: flex;
}
.year-input{
    display: inline-block;
    border-radius: 5px;
    padding: 10px 9px;
    outline: none;
    border: none;
    background: #f0f0f0;
    width: 60px;
    text-align: center;
}
.inputs{
    margin: 30px auto;
}
.calendar-btn-controlyear{
    height: 38px;
    width: 38px;
    cursor: pointer;
    outline: unset;
    border: none;
}

.calendar-btn-apply{
    display: block;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

/* ---------- R93 integration layer ---------- */

/* anchor wrapper: the floating panel positions under the input */
.pd-anchor {
  position: relative;
}

.pd-anchor .pd-calendar,
.pd-anchor > div[id$="Div"] {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: 2600;
  box-shadow: 0 18px 44px rgba(2, 44, 26, 0.22), 0 4px 14px rgba(2, 44, 26, 0.12);
  border: 1px solid rgba(11, 107, 82, 0.16);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  animation: pdPop 0.16s ease-out;
}

@keyframes pdPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* readonly field affordance: pointer + soft emerald focus ring */
input.pd-input[readonly],
.visit-date-input[readonly] {
  background: #f8faf9;
  cursor: pointer;
}
input.pd-input[readonly]:focus,
.visit-date-input[readonly]:focus {
  border-color: var(--brand-primary, #0B6B52);
  box-shadow: 0 0 0 0.2rem rgba(11, 107, 82, 0.15);
}

/* calendar icon at the field end */
.pd-anchor-icon {
  position: absolute;
  inset-inline-end: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-primary, #0B6B52);
  opacity: 0.65;
  pointer-events: none;
  font-size: 0.95rem;
}

/* day cells: larger touch targets + hover (deluxe feel) */
.pd-calendar .calendar-day {
  padding: 7px 5px;
  font-size: 0.86rem;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.pd-calendar .calendar-day:hover {
  background: rgba(11, 107, 82, 0.10);
  transform: translateY(-1px);
}
.pd-calendar .calendar-day.selected,
.pd-calendar .calendar-day.today {
  box-shadow: 0 3px 10px rgba(11, 107, 82, 0.35);
}
.pd-calendar .calendar-day.today:not(.selected) {
  background: rgba(201, 162, 39, 0.16);
  color: #8a6d1a;
  font-weight: 700;
}
.pd-calendar .day-title {
  font-weight: 600;
}
.pd-calendar .calendar-header {
  font-weight: 700;
  color: #143d31;
}
.pd-calendar .calendar-footer {
  padding: 6px 10px 2px;
}

@media (max-width: 575.98px) {
  .pd-anchor .pd-calendar,
  .pd-anchor > div[id$="Div"] {
    width: min(340px, calc(100vw - 48px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-anchor .pd-calendar,
  .pd-anchor > div[id$="Div"] { animation: none; }
  .pd-calendar .calendar-day { transition: none; }
}
