/*!
 * Datepicker for Bootstrap
 *
 * Copyright 2012 Stefan Petre
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 */
.datepicker {
  top: 0;
  left: 0;
  padding: 4px;
  margin-top: 1px;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  /* Dark mode as default - site is dark by default */
  background-color: #2b2b2b;
  border: 1px solid #404040;
  color: #e0e0e0;
}

.datepicker:before {
  content: '';
  display: inline-block;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #404040;
  position: absolute;
  top: -7px;
  left: 6px;
}

.datepicker:after {
  content: '';
  display: inline-block;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #2b2b2b;
  position: absolute;
  top: -6px;
  left: 7px;
}

.datepicker>div {
  display: none;
}

.datepicker table {
  width: 100%;
  margin: 0;
}

.datepicker td,
.datepicker th {
  text-align: center;
  width: 20px;
  height: 20px;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  color: #e0e0e0;
}

.datepicker td.day:hover {
  background: #404040;
  color: #ffffff;
  cursor: pointer;
}

.datepicker td.day.disabled {
  color: #888888;
}

.datepicker td.old,
.datepicker td.new {
  color: #9a9a9a;
}

.datepicker td.active,
.datepicker td.active:hover {
  color: #ffffff;
  background-color: #006dcc;
  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
  background-repeat: repeat-x;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
  border-color: #0044cc #0044cc #002a80;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  *background-color: #0044cc;
  /* Darken IE7 buttons by default so they stand out more given they won't have borders */

  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.datepicker td.active:hover,
.datepicker td.active:hover:hover,
.datepicker td.active:focus,
.datepicker td.active:hover:focus,
.datepicker td.active:active,
.datepicker td.active:hover:active,
.datepicker td.active.active,
.datepicker td.active:hover.active,
.datepicker td.active.disabled,
.datepicker td.active:hover.disabled,
.datepicker td.active[disabled],
.datepicker td.active:hover[disabled] {
  color: #ffffff;
  background-color: #0044cc;
  *background-color: #003bb3;
}

.datepicker td.active:active,
.datepicker td.active:hover:active,
.datepicker td.active.active,
.datepicker td.active:hover.active {
  background-color: #003399 \9;
}

.datepicker td span {
  display: block;
  width: 47px;
  height: 54px;
  line-height: 54px;
  float: left;
  margin: 2px;
  cursor: pointer;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
}

.datepicker td span:hover {
  background: #404040;
  color: #ffffff;
}

.datepicker td span.active {
  color: #ffffff;
  background-color: #006dcc;
  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
  background-repeat: repeat-x;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
  border-color: #0044cc #0044cc #002a80;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  *background-color: #0044cc;
  /* Darken IE7 buttons by default so they stand out more given they won't have borders */

  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.datepicker td span.active:hover,
.datepicker td span.active:focus,
.datepicker td span.active:active,
.datepicker td span.active.active,
.datepicker td span.active.disabled,
.datepicker td span.active[disabled] {
  color: #ffffff;
  background-color: #0044cc;
  *background-color: #003bb3;
}

.datepicker td span.active:active,
.datepicker td span.active.active {
  background-color: #003399 \9;
}

.datepicker td span.old {
  color: #9a9a9a;
}

.datepicker th.switch {
  width: 145px;
}

.datepicker th.next,
.datepicker th.prev {
  font-size: 21px;
}

.datepicker thead tr:first-child th {
  cursor: pointer;
}

.datepicker thead tr:first-child th:hover {
  background: #404040;
  color: #ffffff;
}

.input-append.date .add-on i,
.input-prepend.date .add-on i {
  display: block;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

/* Weekend styling (Saturday and Sunday columns) - dark by default */
.datepicker td.weekend {
  background-color: #383030;
  color: #c0c0c0;
}

.datepicker td.weekend:hover {
  background-color: #484040;
  color: #e0e0e0;
}

.datepicker td.weekend.disabled {
  background-color: #302828;
  color: #888888;
  cursor: not-allowed;
}

/* Holiday styling - dark by default */
.datepicker td.holiday {
  background-color: #3d2626;
  color: #ff9999;
  position: relative;
}

.datepicker td.holiday::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  height: 1px;
  background-color: #ff9999;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.datepicker td.holiday.disabled {
  background-color: #332222;
  color: #cc8888;
  cursor: not-allowed;
}

.datepicker td.holiday.disabled::after {
  opacity: 0.4;
}

/* Column header styling for weekends - dark by default */
.datepicker th.dow.weekend {
  color: #888888;
}

/* ==================== LIGHT MODE OVERRIDES ==================== */
/* When user toggles to light mode, restore traditional light styling */

[data-theme="light"] .datepicker {
  background-color: #ffffff !important;
  border: 1px solid #ccc !important;
  color: #333333 !important;
}

[data-theme="light"] .datepicker:before {
  border-bottom-color: #ccc !important;
}

[data-theme="light"] .datepicker:after {
  border-bottom-color: #ffffff !important;
}

[data-theme="light"] .datepicker td,
[data-theme="light"] .datepicker th {
  color: #333333 !important;
}

[data-theme="light"] .datepicker td.day:hover {
  background: #eeeeee !important;
  color: #333333 !important;
}

[data-theme="light"] .datepicker td.day.disabled {
  color: #cccccc !important;
}

[data-theme="light"] .datepicker td.old,
[data-theme="light"] .datepicker td.new {
  color: #999999 !important;
}

[data-theme="light"] .datepicker td span:hover {
  background: #eeeeee !important;
  color: #333333 !important;
}

[data-theme="light"] .datepicker td span.old {
  color: #999999 !important;
}

[data-theme="light"] .datepicker thead tr:first-child th:hover {
  background: #eeeeee !important;
  color: #333333 !important;
}

[data-theme="light"] .datepicker td.weekend {
  background-color: #f5f5f5 !important;
  color: #666666 !important;
}

[data-theme="light"] .datepicker td.weekend:hover {
  background-color: #eeeeee !important;
  color: #333333 !important;
}

[data-theme="light"] .datepicker td.weekend.disabled {
  background-color: #f5f5f5 !important;
  color: #cccccc !important;
}

[data-theme="light"] .datepicker td.holiday {
  background-color: #fff0f0 !important;
  color: #cc6666 !important;
}

[data-theme="light"] .datepicker td.holiday::after {
  background-color: #cc6666 !important;
}

[data-theme="light"] .datepicker td.holiday.disabled {
  color: #ddaaaa !important;
}

[data-theme="light"] .datepicker th.dow.weekend {
  color: #999999 !important;
}

/* ==================== DARK MODE STYLES ==================== */
/* Use !important to override inline styles and light mode defaults */

[data-theme="dark"] .datepicker {
  background-color: #2b2b2b !important;
  border: 1px solid #404040 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .datepicker:before {
  border-bottom-color: #404040 !important;
}

[data-theme="dark"] .datepicker:after {
  border-bottom-color: #2b2b2b !important;
}

/* Dark mode: Month/Year header and navigation arrows */
[data-theme="dark"] .datepicker th.switch {
  color: #ffffff !important;
}

[data-theme="dark"] .datepicker th.next,
[data-theme="dark"] .datepicker th.prev {
  color: #ffffff !important;
}

[data-theme="dark"] .datepicker thead tr:first-child th:hover {
  background: #404040 !important;
  color: #ffffff !important;
}

/* Dark mode: Day names (Su, Mo, Tu, etc.) */
[data-theme="dark"] .datepicker th.dow {
  color: #b0b0b0 !important;
}

[data-theme="dark"] .datepicker th.dow.weekend {
  color: #888888 !important;
}

/* Dark mode: Regular day cells */
[data-theme="dark"] .datepicker td,
[data-theme="dark"] .datepicker th {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .datepicker td.day:hover {
  background: #404040 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .datepicker td.day.disabled {
  color: #666666 !important;
}

/* Dark mode: Old/New month dates - improved contrast for legibility */
[data-theme="dark"] .datepicker td.old,
[data-theme="dark"] .datepicker td.new {
  color: #9a9a9a !important;
  background-color: transparent !important;
}

/* Dark mode: Active/selected date */
[data-theme="dark"] .datepicker td.active,
[data-theme="dark"] .datepicker td.active:hover {
  background-color: #0d6efd !important;
  background-image: linear-gradient(to bottom, #3d8bfd, #0d6efd) !important;
  color: #ffffff !important;
  border-color: #0d6efd !important;
}

/* Dark mode: Month/Year selector spans */
[data-theme="dark"] .datepicker td span {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .datepicker td span:hover {
  background: #404040 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .datepicker td span.old {
  color: #9a9a9a !important;
}

/* Dark mode: Weekend styling - improved contrast for visibility */
[data-theme="dark"] .datepicker td.weekend {
  background-color: #383030 !important;
  color: #c0c0c0 !important;
}

[data-theme="dark"] .datepicker td.weekend:hover {
  background-color: #484040 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .datepicker td.weekend.disabled {
  background-color: #302828 !important;
  color: #888888 !important;
  cursor: not-allowed !important;
}

/* Dark mode: Weekend + old/new combination - improved contrast */
[data-theme="dark"] .datepicker td.weekend.old,
[data-theme="dark"] .datepicker td.weekend.new {
  background-color: #302828 !important;
  color: #888888 !important;
}

/* Dark mode: Holiday styling - improved contrast */
[data-theme="dark"] .datepicker td.holiday {
  background-color: #3d2626 !important;
  color: #ff9999 !important;
}

[data-theme="dark"] .datepicker td.holiday::after {
  background-color: #ff9999 !important;
  opacity: 0.5 !important;
}

[data-theme="dark"] .datepicker td.holiday.disabled {
  background-color: #332222 !important;
  color: #cc8888 !important;
  cursor: not-allowed !important;
}

[data-theme="dark"] .datepicker td.holiday.disabled::after {
  opacity: 0.4 !important;
}

/* Dark mode: Today indicator */
[data-theme="dark"] .datepicker td.today {
  background-color: #4a4a00 !important;
  color: #ffff99 !important;
}

[data-theme="dark"] .datepicker td.today:hover {
  background-color: #5a5a00 !important;
  color: #ffffbb !important;
}