@font-face {
  font-family: "IRANS";
  src: url("../../../sb/fonts/IRANSansWeb(FaNum).woff2") format("woff2");
}

/* Main Date Picker Container */
.dpDiv {
  font-family: "IRANS", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  direction: rtl;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Calendar Table */
.dpTable {
  font-size: 16px;
  text-align: center;
  color: #2d3748;
  background: white;
  width: 320px;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
  table-layout: fixed; /* Ensures consistent column widths */
}

/* Header Row with Month/Year and Navigation */
.dpTitleTR {
  background: linear-gradient(135deg, #667eea 0%, #4645a2 100%);
  color: white;
}

/* Days of Week Header */
.dpDayTR {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

/* Today/Close Buttons Row */
.dpTodayButtonTR {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Regular Date Cells - Fixed equal width */
.dpTD {
  border: none;
  padding: 12px 0;
  position: relative;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #4a5568;
  width: 45px; /* Equal width for all 7 columns */
  height: 45px;
  box-sizing: border-box;
}

.dpTD:hover {
  background-color: #edf2f7;
  transform: scale(1.1);
  border-radius: 8px;
  cursor: pointer;
}

/* Highlighted Day (Today/Selected) */
.dpDayHighlightTD {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
  border-radius: 10px;
  position: relative;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
  width: 14.28%;
  height: 45px;
}

.dpDayHighlightTD:hover {
  background: linear-gradient(135deg, #3182ce, #2c5aa0);
  transform: scale(1.05);
}

/* Hover State for Date Cells */
.dpTDHover {
  background-color: #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transform: scale(1.05);
  color: #2d3748;
  font-weight: 600;
}

/* Month/Year Title */
.dpTitleTD {
  padding: 16px 0;
}

/* Navigation Buttons Cells */
.dpButtonTD {
  padding: 8px;
  width: auto;
}

/* Today/Close Button Cell */
.dpTodayButtonTD {
  padding: 12px;
  text-align: center;
}

/* Days of Week Header Cells - Equal width */
.dpDayTD {
  background: #f8fafc;
  border: none;
  color: #718096;
  font-weight: 600;
  font-size: 12px;
  padding: 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 14.28%; /* Equal width for all day headers */
  box-sizing: border-box;
}

/* Month/Year Text */
.dpTitleText {
  font-size: 16px;
  color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Highlighted Day Text */
.dpDayHighlight {
  color: white;
  font-weight: 700;
}

/* Navigation Buttons */
.dpButton {
  font-family: "IRANS", sans-serif;
  font-size: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.dpButton:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Today/Close Buttons */
.dpTodayButton {
  font-family: "IRANS", sans-serif;
  font-size: 13px;
  color: #4a5568;
  background: white;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  padding: 10px 20px;
  margin: 0 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dpTodayButton:hover {
  background: #4299e1;
  color: white;
  border-color: #4299e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 153, 225, 0.3);
}

/* Persian Calendar Weekend Styling - Thursday & Friday */
/* Since it's RTL, first column is Friday, second is Thursday */
.dpDayTD:nth-child(6),
.dpTD:nth-child(6) {
  color: #e53e3e; /* Friday - Red color */
  font-weight: 600;
}

.dpDayTD:nth-child(7),
.dpTD:nth-child(7) {
  color: #e53e3e; /* Thursday - Red color */
  font-weight: 600;
}

/* Optional: Different background for weekends */
.dpDayTD:nth-child(6),
.dpDayTD:nth-child(7) {
  background: #fff5f5; /* Light red background for weekend headers */
}

.dpTD:nth-child(6):not(.dpDayHighlightTD):not(:hover),
.dpTD:nth-child(7):not(.dpDayHighlightTD):not(:hover) {
  background: #fff5f5; /* Light red background for weekend dates */
}

/* Animation for smooth transitions */
.dpTable {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus states for accessibility */
.dpButton:focus,
.dpTodayButton:focus,
.dpTD:focus {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .dpTable {
    width: 280px;
    font-size: 16px;
  }

  .dpTD {
    padding: 10px 0;
    height: 40px;
  }

  .dpDayHighlightTD {
    height: 40px;
  }
}
