/* --- Global Container & Card Style --- */
#dnn_ctr_ViewCalendarAndEvent_ctlAjax {
  font-family: "Tahoma", "Vazir", "Segoe UI", sans-serif;
  direction: rtl;
  /* max-width: 800px; */
  margin: 20px auto;
  border-radius: 24px;
  border: 1px solid var(--secondary-100, #e6e7ee);
  background: var(--gray-color-100, #fff);
  box-shadow: 0 4px 56px 0 rgba(18, 18, 18, 0.08);
  padding: 25px;
  margin-bottom: 104px;
  display: flex;
  height: 720px;
}

@media (max-width: 992px) {
  #dnn_ctr_ViewCalendarAndEvent_ctlAjax {
    flex-direction: column;
  }
}


/* Reset internal tables */
.Calendar_Outer table,
.Table_Calendar,
.Cell_Calendar table {
  border-collapse: collapse;
  border: none;
  background: transparent;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* margin-bottom: 80px; */
}

.Calendar_Outer>table {
  display: flex;
  align-items: start;
}

.Table_Calendar tbody {
  position: relative;
}

@media (max-width: 992px) {
  .Table_Calendar>tbody {
    width: 332px;
  }
}

.Calendar_Outer {
  flex: 1;
  display: block;
  margin-bottom: 20px;
  display: flex;
  align-items: start;
  justify-content: center;
}

#dnn_ctr_ViewCalendarAndEvent_pceCalendar {
  display: flex;
  align-items: center;
}

/* --- Header Section (Month & Navigation) --- */
.Row_Header {
  background-color: var(--primary-100);
  /* Light grey background */
  display: block;
  /* Make it behave like a block for rounded corners */
  border-radius: 8px;
  padding: 8px 0;
  margin-bottom: 15px;
  width: 440px;
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .Row_Header {
    width: unset;
  }
}

/* Since the header is a TR, we need to make cells behave nicely */
.Row_Header td {
  display: inline-block;
  vertical-align: middle;
}

/* The Middle Section (Month Title) */
.Cell_Header[colspan="5"] {
  width: 70%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Main Persian Month Title */
.hPersian {
  color: var(--primary-20);
  /* Teal Color */
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 4px;
}

/* English & Arabic Subtitles */
.hEnglish,
.hArabic {
  color: var(--Gray-40, #626262);
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

/* --- Navigation Arrows --- */
.Cell_Header:first-child,
.Cell_Header:last-child {
  width: 14%;
  text-align: center;
}

/* Style the links «« and »» to look like Chevron Icons */
.Cell_Header a[href*="doPostBack"] {
  display: inline-block;
  text-decoration: none;
  font-size: 0;
  /* Hide text */
  margin-top: 5px;
  cursor: pointer;
  position: relative;
}

.Cell_Header a[href*="doPostBack"]::before {
  content: "";
  mask: url(Images/chevron.svg);
  mask-repeat: no-repeat;
  width: 34px;
  height: 34px;
  position: absolute;
  mask-size: contain;
  background: var(--primary-20);
  left: -26px;
  top: 50%;
  transform: translateY(17%);
  rotate: 135deg;
}

/* Rotate for Right/Left */
.Cell_Header:first-child a {
  transform: rotate(45deg);
  /* Left Arrow */
}

.Cell_Header:last-child a {
  transform: rotate(-135deg);
  /* Right Arrow */
}

/* --- Weekday Names Bar --- */
.Row_DayName {
  border-radius: 4px;
  background: var(--primary-20, #006156);
  color: white;
  height: 45px;
  width: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

@media (max-width: 992px) {
  .Row_DayName {
    gap: 18px;
    width: unset;
  }

  .Cell_DayName {
    font-size: 10px !important;
  }
}

.Cell_DayName {
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  padding: 10px 0;
  /* Round the corners of the bar */
}

.Cell_DayName:first-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.Cell_DayName:last-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}


/* --- Calendar Grid Cells --- */
.Cell_Calendar {
  height: 56px;
  width: 56px;
  padding: 5px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

@media (max-width: 992px) {
  .Cell_Calendar {
    height: 54px;
    width: 42px;
  }
}

.Cell_Calendar.Cell_Free {
  background-color: transparent;
}

/* Normalize the inner table used by the CMS */
.Cell_Calendar center,
.Cell_Calendar table {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Main Number (Persian Day) */
.PersianDay {
  font-size: 24px;
  color: var(--Gray-G30, #4F4F4F);
  font-weight: 600;
  text-align: center;
  transform: translateY(4px);
}

/* Secondary Numbers (English/Arabic) */
.EnglishDay,
.ArabicDay {
  font-size: 12px !important;
  line-height: 24px;
  color: var(--Gray-60, #959595);
}

.EnglishDay {
  font-family: "Segoe UI", sans-serif !important;
  text-align: left;
  padding-left: 11px;
  font-weight: 500;
}

.ArabicDay {
  text-align: right;
  padding-right: 11px;
}

@media (max-width: 992px) {

  .EnglishDay,
  .ArabicDay {
    font-size: 10px !important;
  }

  .PersianDay {
    font-size: 18px !important;
  }

  .EnglishDay {
    padding-left: 0;
  }

  .Cell_Calendar.Cell_Today center {
    height: 54px !important;
    width: 42px !important;
  }
}

/* --- Holidays --- */
.Cell_Holiday .PersianDay,
.Cell_Holiday .EnglishDay,
.Cell_Holiday .ArabicDay {
  color: #A33107 !important;
  /* Orange/Red for holidays */
  position: relative;
}

/* .Cell_Holiday .PersianDay::before {
  content: "";
  background-color: #A33107;
  height: 5px;
  width: 5px;
  position: absolute;
  top: 0;
  left: -2px;
  border-radius: 50%;
} */

.Cell_Holiday {
  background-color: #fee;
}

@media (max-width: 992px) {
  .Cell_Holiday .PersianDay::before {
    top: -2px;
    left: 0px;
  }
}

/* --- Today / Selected State --- */
/* The image shows a border around a specific day. 
   Assuming .Cell_Today is the active day. */
.Cell_Today {
  position: relative;
}

/* Create the border around the inner content of Today */
.Cell_Today center {
  border-radius: 4px;
  border: 1px solid var(--Primary-P20, #006156);
  background: var(--Primary-P100, #F5FBFB);
  height: 56px !important;
  width: 56px !important;
  display: block;
  box-sizing: border-box;
  transform: translate(4px, -4px);
}

/* --- Events List (Bottom) --- */
.EventAlign {
  /* margin-top: 25px; */
  /* border-top: 1px solid #eee; */
  /* padding-top: 15px; */
  flex: 1;
  max-height: 668px;
  overflow-y: scroll;
}

.EventAlign::-webkit-scrollbar {
  width: 6px;
}

/* Track */

.EventAlign::-webkit-scrollbar-track {
  background: #fff;
  border-radius: 8px;
}

/* Handle */

.EventAlign::-webkit-scrollbar-thumb {
  transition: var(--transition);
  background: var(--Gray-80);
  border-radius: 8px;
}

@media (max-width: 992px) {
  .EventAlign {
    width: unset;
  }
}

.EventAlign table {
  width: 100%;
}

.EventAlign table tbody {}

.EventRowStyle,
.EventAlternatingRowStyle {
  background: transparent !important;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 32px;
}

.EventRowStyle td,
.EventAlternatingRowStyle td {
  /* padding: 8px 0; */
  font-size: 13px;
  /* border-bottom: 1px dashed #f0f0f0; */
}

/* Date Column in Event List */
.EventRowStyle td:first-child,
.EventAlternatingRowStyle td:first-child {
  width: 60px;
  text-align: right;
  vertical-align: top;
}

/* Description Column */
.EventRowStyle td:last-child,
.EventAlternatingRowStyle td:last-child {
  color: #555;
  text-align: right;
}

/* "Go to Today" Bottom Link - Image has one at bottom */
a#dnn_ctr_ViewCalendarAndEvent_pceCalendar_lbtnToday {
  display: block;
  /* Show it here if needed, or hide */
  margin-top: 15px;
  color: var(--primary-20);
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  position: absolute;
  bottom: -35px;
  padding: 4px 12px 4px 32px;
  background: var(--primary-100);
  left: 0px;
  border-radius: 4px;
}

a#dnn_ctr_ViewCalendarAndEvent_pceCalendar_lbtnToday::before {
  rotate: 0deg;
  transform: unset;
  top: 6px;
  left: 6px;
  height: 20px;
  width: 20px;
}

.Row_Date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.EventRowStyle.Cell_Holiday td,
.EventAlternatingRowStyle.Cell_Holiday td {
  color: #A33107 !important;
}

.EventRowStyle td:first-child,
.EventAlternatingRowStyle td:first-child {
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  color: var(--Gray-20, #3D3D3D);
  width: max-content;
  white-space: nowrap;
}

.EventRowStyle td:nth-child(2),
.EventAlternatingRowStyle td:nth-child(2) {
  font-size: 14px;
  line-height: 28px;
  color: var(--Gray-G50, #7A7A7A);
  /* flex: 0 0 80%; */
  /* white-space: nowrap; */
}

@media (max-width: 992px) {

  /* .EventRowStyle td:first-child,
  .EventAlternatingRowStyle td:first-child {
    flex: 0 0 28%;
  } */

  /* .EventRowStyle td:nth-child(2),
  .EventAlternatingRowStyle td:nth-child(2) {
    flex: 0 0 72%;
  } */
}