/* ═══════════════════════════════════════════════════════════
   دهکده جوجه — تقویم لوکس (نسخه سازگار با ایتا - Float)
   ═══════════════════════════════════════════════════════════ */

.dj-calendar-wrapper {
  background: linear-gradient(145deg, #fffaf5, #ffffff);
  border: 1.5px solid #d4a437;
  border-radius: 20px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 8px 30px rgba(212,164,55,0.12);
  direction: rtl;
  box-sizing: border-box;
  width: 100%;
}

.dj-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px dashed #eaded2;
}

.dj-calendar-month {
  font-size: 17px;
  font-weight: 900;
  color: #1a4d2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dj-calendar-month-icon { font-size: 20px; }

.dj-calendar-nav { display: flex; gap: 8px; }

.dj-calendar-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid #eaded2;
  background: #fff;
  color: #1a4d2e;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dj-calendar-nav-btn:hover:not(:disabled) {
  background: #1a4d2e;
  color: #fff;
  border-color: #1a4d2e;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(26,77,46,0.25);
}

.dj-calendar-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ═══ روزهای هفته (تبدیل Grid به Float) ═══ */
.dj-calendar-weekdays {
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.dj-calendar-weekday {
  float: right !important;
  width: 13.5% !important; /* کمی کمتر از 14.28 برای ایجاد فاصله */
  margin: 0 0.3% 6px 0.3% !important;
  box-sizing: border-box !important;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #8a7565;
  padding: 8px 0;
  background: #f7f2ed;
  border-radius: 8px;
}

.dj-calendar-weekday.friday { color: #c0392b; }

/* ═══ شبکه روزها (تبدیل Grid به Float) ═══ */
.dj-calendar-grid {
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

/* سلول‌های نگهدارنده برای ایجاد فاصله (Gap) */
.dj-calendar-cell {
  float: right !important;
  width: 14.2857% !important; /* دقیقا یک هفتم */
  box-sizing: border-box !important;
  padding: 3px !important; /* ایجاد فاصله بین دکمه‌ها */
  height: 55px !important; /* ارتفاع ثابت برای جلوگیری از لهیدگی در ایتا */
}

.dj-calendar-day {
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  border: 1.5px solid #eaded2;
  background: #fff;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: #1a4d2e;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
  padding: 0;
  overflow: hidden;
  margin: 0 !important;
}

.dj-calendar-day:hover:not(:disabled):not(.empty) {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(212,164,55,0.25);
  border-color: #d4a437;
}

.dj-calendar-day.empty {
  background: transparent !important;
  border-color: transparent !important;
  cursor: default;
  pointer-events: none;
}

/* ─── امروز ─── */
.dj-calendar-day.today::after {
  content: "امروز";
  position: absolute;
  bottom: 2px;
  font-size: 8px;
  font-weight: 900;
  color: #d4a437;
  letter-spacing: -0.3px;
}

/* ─── آزاد (سبز) ─── */
.dj-calendar-day.available {
  background: linear-gradient(145deg, #f0faf4, #e8f7ee);
  border-color: #b7ddc3;
  color: #1a4d2e;
}

.dj-calendar-day.available:hover {
  background: linear-gradient(145deg, #1a4d2e, #0f3320);
  color: #fff;
  border-color: #1a4d2e;
}

/* ─── محدود/در انتظار (زرد) ─── */
.dj-calendar-day.limited {
  background: linear-gradient(145deg, #fff8e6, #fff4d6);
  border-color: #f0ddaa;
  color: #8a6914;
}

.dj-calendar-day.limited:hover {
  background: linear-gradient(145deg, #d4a437, #f0c75e);
  color: #0f3320;
  border-color: #d4a437;
}

/* ─── تکمیل/گذشته (خاکستری) ─── */
.dj-calendar-day.full {
  background: #f4f1ed;
  border-color: #e5d8cc;
  color: #b8a89a;
  cursor: not-allowed;
  position: relative;
}

.dj-calendar-day.full::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #d8c9b8;
  transform: rotate(-25deg);
  border-radius: 2px;
}

/* ─── انتخاب شده ─── */
.dj-calendar-day.selected {
  background: linear-gradient(145deg, #d4a437, #f0c75e) !important;
  color: #0f3320 !important;
  border-color: #d4a437 !important;
  transform: scale(1.08);
  box-shadow: 0 8px 22px rgba(212,164,55,0.5);
  font-weight: 900;
  border-width: 2.5px;
}

.dj-calendar-day.selected::after {
  content: "✓";
  position: absolute;
  bottom: 2px;
  font-size: 10px;
  font-weight: 900;
}

/* ─── تعطیل (جمعه) ─── */
.dj-calendar-day.friday.available {
  background: linear-gradient(145deg, #fef0f0, #fde3e3);
  border-color: #f5c6c6;
  color: #c0392b;
}

/* ═══ استایل متن وضعیت داخل دکمه ═══ */
.dj-day-status {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
  background: rgba(0,0,0,0.05);
}

.dj-calendar-day.available .dj-day-status { background: #dcfce7; color: #166534; }
.dj-calendar-day.limited .dj-day-status { background: #fef3c7; color: #92400e; }
.dj-calendar-day.full .dj-day-status { background: #e0e0e0; color: #555; }
.dj-calendar-day.selected .dj-day-status { background: #0f3320; color: #d4a437; }

/* ═══ لِجند ═══ */
.dj-calendar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px dashed #eaded2;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #765a43;
  font-weight: 700;
}

.dj-calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dj-calendar-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  border: 1.5px solid #eaded2;
}

.dj-calendar-legend-dot.available { background: linear-gradient(145deg, #f0faf4, #e8f7ee); border-color: #b7ddc3; }
.dj-calendar-legend-dot.limited { background: linear-gradient(145deg, #fff8e6, #fff4d6); border-color: #f0ddaa; }
.dj-calendar-legend-dot.full { background: #f4f1ed; border-color: #e5d8cc; }

/* ═══ ریسپانسیو ═══ */
@media (max-width: 480px) {
  .dj-calendar-wrapper { padding: 14px; border-radius: 16px; margin: 14px 0; }
  .dj-calendar-header { margin-bottom: 14px; padding-bottom: 12px; }
  .dj-calendar-month { font-size: 15px; }
  .dj-calendar-nav-btn { width: 32px; height: 32px; font-size: 14px; }
  .dj-calendar-weekday { font-size: 10px; padding: 6px 0; border-radius: 6px; }
  .dj-calendar-cell { height: 50px !important; padding: 2px !important; }
  .dj-calendar-day { font-size: 13px; border-radius: 10px; }
  .dj-calendar-day.today::after { font-size: 7px; }
  .dj-calendar-legend { gap: 10px; font-size: 10.5px; }
  .dj-calendar-legend-dot { width: 12px; height: 12px; }
}