[data-theme="light"] .calendar,
.calendar {
  --calendar-border-color: hsla(0,0%,0%,.1);
  --calendar-thead-bg: hsla(0,0%,0%,.1);
  --calendar-entry-bg: #dbdbdb;
  --calendar-today-bg: #dd0a0a;
  --calendar-entry-inactive-subtitle-color: #515151;
  --calendar-conditional-entry-bg: linear-gradient(45deg,rgba(255,255,255,.35) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.35) 50%,rgba(255,255,255,.35) 75%,transparent 75%,transparent);
  --calendar-conditional-entry-active-bg: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
  position: relative;
}

[data-theme="dark"] .calendar {
  --calendar-border-color: hsla(0,100%,100%,.05);
  --calendar-thead-bg: hsla(0,100%,100%,.05);
  --calendar-entry-bg: #2f2f2f;
  --calendar-today-bg: #970000;
  --calendar-entry-inactive-subtitle-color: #9B9B9B;
  --calendar-conditional-entry-bg: linear-gradient(45deg,rgba(255,255,255,.05) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.05) 50%,rgba(255,255,255,.05) 75%,transparent 75%,transparent);
  --calendar-conditional-entry-active-bg: linear-gradient(45deg,rgba(255,255,255,.05) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.05) 50%,rgba(255,255,255,.05) 75%,transparent 75%,transparent);
}

.calendar .card {
  padding: 0;
  overflow: hidden;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar-table tr th {
  position: relative;
  padding-top: .4rem;
  padding-bottom: .4rem;
}

.calendar-table tr th:not(:last-child):after {
  display: block;
  content: "";
  width: 1px;
  height: 9999px;
  position: absolute;
  top: 0;
  right: 0;
  border-right: 1px solid var(--calendar-border-color);
  pointer-events: none;
}

.calendar-table tr th:last-child,
.calendar-table tr td:last-child {
  width: 220px;
}

.calendar-table thead {
  position: relative;
  background: var(--calendar-thead-bg);
  text-align: center;
  z-index: 9;
}

.calendar-table tbody td {
  padding: .1rem 0;
}

.calendar-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--calendar-border-color);
}

.calendar-table tr td:last-child {
  padding: .75rem 1rem;
  vertical-align: top;
}

.calendar-table .calendar-entry-wrapper {
  display: flex;
  justify-content: space-between;
}

.calendar-table .calendar-entry-wrapper.active .calendar-entry {
  background-color: var(--color-primary);
  color: white;
  opacity: 1;

  .entry-subtitle {
    color: hsla(0,0%,100%,.8);
  }

  &.conditional {
    background-image: var(--calendar-conditional-entry-active-bg);
    background-size: 3rem 3rem;
  }
}

.calendar-table .calendar-entry {
  position: relative;
  z-index: 9;
  background: var(--calendar-entry-bg);
  padding: .45rem .5rem;
  border-radius: .25rem;
  margin-top: .15rem;
  margin-bottom: .15rem;
  min-height: 58px;
}

.calendar-table .calendar-entry .entry-title {
  font-size: 1em;
  margin-top: 0;
  margin-bottom: .1rem;
}

.calendar-table .calendar-entry .entry-subtitle {
  font-size: .9em;
  color: var(--calendar-entry-inactive-subtitle-color);
}

.calendar-table .calendar-entry.conditional {
  background-image: var(--calendar-conditional-entry-bg); 
  background-size: 3rem 3rem;
}

.calendar-table .calendar-comment-card {
  background: #f5f2eb;
  color: #44433f;
  border-radius: .15rem;
  box-shadow: none;
  margin-top: .2rem;
}

.calendar-table .calendar-comment-card .card-body {
  padding: .25rem;
  font-size: .8rem;
}

 .calendar-table .calendar-comment-card a {
  color: inherit;
}

.calendar-table .active .calendar-comment-card {
  background: #577767;
  color: #dee8e3;
}

.calendar-table .animal-name {
  font-weight: 600;
}

.calendar-table .animal-comment {
  font-size: 90%;
  color: #606060;
  padding-top: .5rem;
}

.calender-table .animal-hunting-terminated {
  background: #d92f2f;
  display: inline-block;
  padding: .15rem .45rem;
  border-radius: .25rem;
  font-size: 90%;
  color: #fff;
}

.calendar-today {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - 220px);
  height: 100%;
  pointer-events: none;
}

.calendar-today .calendar-today-line {
  position: absolute;
  top: -10px;
  left: 0;
  height: 100%;
}

.calendar-today .calendar-today-line:before {
  content: "";
  display: block;
  position: relative;
  height: calc(100% + 15px);
  border-left: 2px solid var(--calendar-today-bg);
  z-index: 99;
  top: 0;
  pointer-events: none;
}

.calendar-today .calendar-today-line span {
  position: absolute;
  top: 0;
  white-space: nowrap;
  left: 0;
  transform: translateX(-50%) translateY(-100%);
  background: var(--calendar-today-bg);
  color: white;
  padding: .15rem .55rem;
  font-size: 90%;
  font-weight: 500;
  border-radius: 1rem;
}

.hide-unhunted tbody tr:not(.has-hunted) {
  display: none;
}

.hide-unhunted .calendar-entry-wrapper:not(.active) {
  display: none;
}

[data-theme="light"] .calendar-phone,
.calendar-phone {
  --calendar-phone-bg: #fff;
  --calendar-phone-alt-bg: #f2f2f2;

  background: var(--calendar-phone-bg);
}

[data-theme="dark"] .calendar-phone {
  --calendar-phone-bg: #2f2f2f;
  --calendar-phone-alt-bg: #3a3a3a;
}

.calendar-phone table {
  width: 100%;
  border-collapse: collapse;
}

.calendar-phone table tr > td {
  vertical-align: top;
  padding: var(--spacing-2) var(--spacing-2);
}

.calendar-phone table tr:nth-child(even) {
  background: var(--calendar-phone-alt-bg);
}

.calendar-phone .period {
  margin: 1rem 0 0 0;
}

.calendar-phone td .period:first-child {
  margin-top: 0;
}

.calendar-badge {
  font-size: 80%;
  padding: 1px 4px;
  border-radius: .25rem;
  background: hsla(0,0%,100%,.15);
}

[data-theme="light"] .calendar-entry-wrapper:not(.active) .calendar-badge {
  background: hsla(0,0%,0%,.1);
}

.calendar-badge.active {
  background: #ffbf00 !important;
  color: #000;
  font-weight: 600;
}

[data-theme="light"] .calendar-phone .calendar-badge {
  background: hsla(0,0%,0%,.1);
}
