/* ------------------------------------------------------------------
   Blue datepicker theme for jQuery UI 1.13
   Self-contained: provides both structure and skin, so no jQuery UI
   base theme (smoothness / dark-hive) needs to be loaded.
   ------------------------------------------------------------------ */

.ui-datepicker {
  display: none;
  width: 268px;
  padding: 0;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid #1f4e79;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #222;
  z-index: 9999 !important; /* must clear the form overlays */
  overflow: hidden;
}

.ui-datepicker.ui-datepicker-multi {
  width: auto;
}

/* ---- header ---- */

.ui-datepicker .ui-datepicker-header {
  position: relative;
  background: linear-gradient(#2f6fb3, #24578c);
  color: #fff;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
}

.ui-datepicker .ui-datepicker-title {
  margin: 0 32px;
  text-align: center;
  line-height: 1.4;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* the host page's form.css sets selects to width:100% - override so the
   month/year controls stay on one line inside the header */
.ui-datepicker .ui-datepicker-title select {
  color: #222;
  font-size: 13px;
  margin: 0 2px;
  padding: 2px;
  width: auto !important;
  max-width: 42%;
  display: inline-block;
  vertical-align: middle;
  height: auto;
  min-height: 0;
  float: none;
}

/* prev / next - drawn with CSS so no sprite image is needed */

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
  position: absolute;
  top: 8px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  border-radius: 4px;
  text-indent: -9999px;
  overflow: hidden;
}

.ui-datepicker .ui-datepicker-prev { left: 6px; }
.ui-datepicker .ui-datepicker-next { right: 6px; }

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ui-datepicker .ui-datepicker-prev.ui-state-disabled,
.ui-datepicker .ui-datepicker-next.ui-state-disabled {
  opacity: 0.35;
  cursor: default;
}

.ui-datepicker .ui-datepicker-prev:after,
.ui-datepicker .ui-datepicker-next:after {
  content: "";
  position: absolute;
  top: 8px;
  left: 9px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  text-indent: 0;
}

.ui-datepicker .ui-datepicker-prev:after { transform: rotate(-135deg); left: 10px; }
.ui-datepicker .ui-datepicker-next:after { transform: rotate(45deg); left: 7px; }

/* hide the sprite spans jQuery UI injects */
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
  display: none;
}

/* ---- calendar grid ---- */

.ui-datepicker table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 13px;
}

.ui-datepicker th {
  padding: 8px 0;
  text-align: center;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2f6fb3;
  background: #eef4fa;
  border: 0;
}

.ui-datepicker td {
  padding: 1px;
  border: 0;
  text-align: center;
}

.ui-datepicker td span,
.ui-datepicker td a {
  display: block;
  padding: 7px 0;
  text-align: center;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
  transition: background 0.12s ease, color 0.12s ease;
}

.ui-datepicker td a:hover {
  background: #2f6fb3;
  color: #fff;
}

/* today */
.ui-datepicker td.ui-datepicker-today a {
  background: #d9e7f5;
  color: #1f4e79;
  font-weight: bold;
}

/* selected */
.ui-datepicker td.ui-datepicker-current-day a,
.ui-datepicker td a.ui-state-active {
  background: #1f4e79;
  color: #fff;
  font-weight: bold;
}

/* weekend + unselectable */
.ui-datepicker td.ui-datepicker-week-end a { color: #8a94a0; }
.ui-datepicker td.ui-datepicker-week-end a:hover { color: #fff; }

.ui-datepicker td.ui-datepicker-unselectable span,
.ui-datepicker td.ui-state-disabled span {
  color: #c3c9d1;
}

/* ---- trigger button next to the field ---- */

img.ui-datepicker-trigger {
  cursor: pointer;
  vertical-align: middle;
  margin-left: 8px;
  border: 0;
}

/* ---- small screens ---- */

@media screen and (max-width: 480px) {
  .ui-datepicker {
    width: 92%;
    max-width: 268px;
  }
}
