/* The main calendar widget.  DIV containing a table. */

div.calendar {
  position: relative;
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(29, 24, 20, 0.22);
  overflow: hidden;
}

.calendar, .calendar table {
  border: 1px solid #f0d9c8;
  font-size: 13px;
  color: #1f2933;
  cursor: default;
  background: #fffdfb;
  font-family: Arial, Helvetica, sans-serif;
}

.calendar table {
  border-collapse: separate;
  border-spacing: 0;
}

/* Header part -- contains navigation buttons and day names. */

.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
  text-align: center;    /* They are the navigation buttons */
  padding: 8px 10px;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.calendar .nav {
  background: #fff4eb;
  color: #2b3440;
  font-weight: bold;
  min-width: 34px;
}

.calendar thead .title { /* This holds the current "month, year" */
  font-weight: bold;
  text-align: center;
  background: linear-gradient(90deg, #ff7a00 0%, #ff9f2f 100%);
  color: #fff;
  padding: 10px 12px;
}

.calendar .calendar-title-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar .calendar-title-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.calendar .calendar-title-chip:hover {
  background: rgba(255, 255, 255, 0.26);
}

.calendar .calendar-title-chip:after {
  content: "▼";
  font-size: 9px;
  margin-left: 8px;
  opacity: 0.85;
}

.calendar thead .headrow { /* Row <TR> containing navigation buttons */
  background: #fff;
  color: #1f2933;
}

.calendar thead .daynames { /* Row <TR> containing the day names */
  background: #fff4eb;
}

.calendar thead .name { /* Cells <TD> containing the day names */
  border-bottom: 1px solid #f0d9c8;
  padding: 8px 6px;
  text-align: center;
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
}

.calendar thead .weekend { /* How a weekend day name shows in header */
  color: #d96a00;
}

.calendar thead .hilite { /* How do the buttons in header appear when hover */
  background-color: #ffecd9;
  color: #ff7a00;
  box-shadow: inset 0 0 0 1px #ffc089;
}

.calendar thead .active { /* Active (pressed) buttons in header */
  background-color: #ffd3ad;
  color: #c95f00;
}

/* The body part -- contains all the days in month. */

.calendar tbody .day { /* Cells <TD> containing month days dates */
  width: 2em;
  min-width: 34px;
  height: 34px;
  color: #364152;
  text-align: center;
  padding: 0;
  border-radius: 8px;
}
.calendar tbody .day.othermonth {
  font-size: 85%;
  color: #c6b9ad;
}
.calendar tbody .day.othermonth.oweekend {
  color: #e6b591;
}

.calendar table .wn {
  padding: 8px 6px;
  border-right: 1px solid #f0d9c8;
  background: #fff7f1;
  color: #8a5d35;
}

.calendar tbody .rowhilite td {
  background: #fff7f1;
}

.calendar tbody .rowhilite td.wn {
  background: #fff1e4;
}

.calendar tbody td.hilite { /* Hovered cells <TD> */
  background: #ffe9d6;
  color: #c95f00;
}

.calendar tbody td.active { /* Active (pressed) cells <TD> */
  background: #ffd3ad;
  color: #9f4c00;
}

.calendar tbody td.selected { /* Cell showing today date */
  font-weight: bold;
  background: #ff7a00;
  color: #fff;
}

.calendar tbody td.weekend { /* Cells showing weekend days */
  color: #d96a00;
}

.calendar tbody td.today { /* Cell showing selected date */
  font-weight: bold;
  box-shadow: inset 0 0 0 2px #ffb066;
}

.calendar tbody .disabled {
  color: #c7bdb4;
  background: transparent;
}

.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
  visibility: hidden;
}

.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
  display: none;
}

/* The footer part -- status bar and "Close" button */

.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
  text-align: center;
  background: #fff7f1;
  color: #8a5d35;
}

.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
  background: #fff;
  color: #7b4f28;
  border-top: 1px solid #f0d9c8;
  padding: 6px 8px;
  font-size: 12px;
}

.calendar tfoot .hilite { /* Hover style for buttons in footer */
  background: #ffe9d6;
  color: #c95f00;
}

.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
  background: #ffd3ad;
  color: #9f4c00;
}

/* Combo boxes (menus that display months/years for direct selection) */

.calendar .combo {
  position: absolute;
  display: none;
  top: 0px;
  left: 0px;
  min-width: 140px;
  cursor: default;
  border: 1px solid #f0d9c8;
  background: #fff;
  color: #1f2933;
  font-size: 12px;
  z-index: 1000;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(29, 24, 20, 0.18);
  padding: 6px;
}

.calendar .months-combo {
  width: 186px;
}

.calendar .years-combo {
  width: 148px;
}

.calendar .combo .label,
.calendar .combo .label-IEfix {
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.calendar .combo .label-IEfix {
  width: auto;
}

.calendar .months-combo .label,
.calendar .months-combo .label-IEfix {
  display: inline-block;
  width: calc(33.333% - 6px);
  margin: 3px;
  box-sizing: border-box;
}

.calendar .years-combo .label,
.calendar .years-combo .label-IEfix {
  display: inline-block;
  width: calc(50% - 6px);
  margin: 3px;
  box-sizing: border-box;
}

.calendar .combo .hilite {
  background: #ffe9d6;
  color: #c95f00;
}

.calendar .combo .active {
  background: #fff4eb;
  color: #ff7a00;
  font-weight: bold;
  box-shadow: inset 0 0 0 1px #ffc089;
}

.calendar td.time {
  border-top: 1px solid #f0d9c8;
  padding: 8px 0px;
  text-align: center;
  background-color: #fff7f1;
}

.calendar td.time .hour,
.calendar td.time .minute,
.calendar td.time .ampm {
  padding: 4px 8px;
  border: 1px solid #f0d9c8;
  font-weight: bold;
  background-color: #fff;
  border-radius: 8px;
}

.calendar td.time .ampm {
  text-align: center;
}

.calendar td.time .colon {
  padding: 0px 2px 0px 3px;
  font-weight: bold;
}

.calendar td.time span.hilite {
  border-color: #ffb066;
  background-color: #ffe9d6;
  color: #fff;
}

.calendar td.time span.active {
  border-color: #ff7a00;
  background-color: #ff7a00;
  color: #fff;
}
