/*================================
  AUTHOR
  Lynge Nielsen
  lyn@flexybox.com
==================================
  TABLE OF CONTENTS
----------------------------------
  01: DATEPICKER
  02: GRID LAYOUT
  03: FLEX LAYOUT
  04: LAYOUT
  05: THEAD
  06: NEXT & PREV BUTTON
  07: CALENDER
  08: SELECT
  09: SELECT - YEAR / MONTH 
  10: FOOTER
  11: RANGES
  12: LIST ITEM - NEUTRAL
  13: MEDIA QUERYS
=================================*/
/*================================
  01: DATEPICKER
=================================*/
.daterangepicker {
  /* Component tokens */
  --fbx-comp-datepicker-color-background: var(--background, var(--fbx-alias-color-surface-emphasis-low));
  --fbx-comp-datepicker-color-text: var(--text, var(--fbx-alias-color-surface-on-low-100));
  --fbx-comp-datepicker-color-active: var(--active, var(--fbx-alias-color-interaction-default-hover));
  --fbx-comp-datepicker-color-hover: var(--hover, var(--fbx-alias-color-interaction-default-hover));
  --fbx-comp-datepicker-color-active-on: var(--active-on, var(--fbx-alias-color-interaction-default-on));
  --fbx-comp-datepicker-color-highlight: var(--highlight, var(--fbx-alias-color-interaction-default-subtle-active));
  --fbx-comp-datepicker-color-outline: var(--outline, var(--fbx-alias-color-outline-emphasis-medium));
  --fbx-comp-datepicker-radius: var(--radius, var(--fbx-alias-radius-default-small));
  --fbx-comp-datepicker-elevation: var(--elevation, var(--fbx-global-elevation-emphasis-high-lvl-3));
  --fbx-comp-datepicker-animation: var(--animation,var(--fbx-alias-animation-duration-default));
  --fbx-comp-datepicker-margin: var(--margin, var(--fbx-alias-spacing-2x));
  --fbx-comp-datepicker-gap: var(--gap, var(--fbx-alias-gap-2x));
  /* Layout */
  display: none;
  position: absolute;
  top: 100px;
  left: 20px;
  z-index: var(--z-dropdown);
  border-radius: var(--fbx-comp-datepicker-radius);
  padding: 0;
  margin-top: var(--fbx-comp-datepicker-margin);
  overflow: hidden;
  box-sizing: border-box;
  grid-template-columns: 0px 1fr 1fr;
  justify-content: start;
  justify-items: start;
  /* Colors */
  color: var(--fbx-comp-datepicker-color-text);
  background-color: var(--fbx-comp-datepicker-color-background);
  /* Font */
  font-family: var(--fbx-global-font-family-secondary-type);
  font-size: var(--fbx-global-font-size-details);
  letter-spacing: var(--fbx-global-font-spacing-details);
  line-height: var(--fbx-global-font-lineheight-details);
  font-weight: var(--fbx-alias-font-weight-details-regular);
  /* Elevation */
  box-shadow: var(--fbx-comp-datepicker-elevation);
}

/*================================
  02: GRID LAYOUT
=================================*/
.daterangepicker:not([style*="display: none"]) {
  display: grid !important;
}

.daterangepicker.show-ranges {
  grid-template-columns: auto 1fr 1fr;
}

.daterangepicker:has(> .single).show-ranges {
  grid-template-columns: auto 1fr;
}

.daterangepicker:has(> .single) {
  grid-template-columns: 1fr;
}

@media (max-width: 640px) {
  .daterangepicker {
    grid-template-columns: 1fr 1fr;
  }
  .daterangepicker.show-ranges.rtl .ranges {
    order: 0;
  }
}
@media (max-width: 501px) {
  .daterangepicker,
  .daterangepicker.show-ranges.ltr,
  .daterangepicker.show-ranges.rtl {
    grid-template-columns: 1fr;
  }
}
/*================================
  03: FLEX LAYOUT
=================================*/
.daterangepicker .calendar-table table,
.daterangepicker .calendar-table table thead,
.daterangepicker .calendar-table table thead tr,
.daterangepicker .drp-calendar .calendar-table table thead tr th,
.daterangepicker .calendar-table table tbody,
.daterangepicker .calendar-table table tbody tr,
.daterangepicker .calendar-table table tbody tr td,
.daterangepicker .ranges ul {
  display: flex;
}

.daterangepicker .calendar-table table,
.daterangepicker .calendar-table table thead,
.daterangepicker .calendar-table table tbody,
.daterangepicker .ranges ul {
  flex-direction: column;
}

.daterangepicker .calendar-table table tbody {
  gap: 4px;
}

.daterangepicker .drp-calendar .calendar-table table thead tr {
  justify-content: space-between;
}

.daterangepicker .drp-calendar .calendar-table table thead tr th,
.daterangepicker .calendar-table table tbody tr td {
  align-items: center;
  justify-content: center;
}

/*================================
  04: LAYOUT
=================================*/
.daterangepicker.drop-up {
  margin-top: calc(var(--fbx-comp-datepicker-margin) * -1);
}

.daterangepicker.single .daterangepicker .ranges,
.daterangepicker.single .drp-calendar,
.daterangepicker .ranges {
  float: none;
}

.daterangepicker.single .drp-selected,
.daterangepicker.auto-apply .drp-buttons {
  display: none;
}

.daterangepicker.show-calendar .drp-calendar,
.daterangepicker.show-calendar .drp-buttons {
  display: block;
}

.daterangepicker .drp-calendar {
  display: none;
  max-width: inherit;
}

.daterangepicker .drp-calendar.left,
.daterangepicker .drp-calendar.right {
  padding: 0px;
  width: 100%;
}

.daterangepicker .drp-calendar.single .calendar-table,
.daterangepicker .calendar-table,
.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td,
.daterangepicker th.next.available,
.daterangepicker th.prev.available {
  border: none;
}

/*================================
  05: Thead
=================================*/
.daterangepicker .drp-calendar .calendar-table table thead tr:nth-child(1) {
  border-bottom: 1px solid var(--fbx-comp-datepicker-color-outline);
  padding: var(--fbx-alias-spacing-3x);
}

.daterangepicker .drp-calendar .calendar-table table thead tr th {
  cursor: default;
  font-weight: 700;
}

.daterangepicker .drp-calendar .calendar-table table thead:has(th.week) tr:nth-child(1) th:nth-child(1) {
  display: none;
}

.daterangepicker .drp-calendar .calendar-table table thead tr:nth-child(2) {
  padding: var(--fbx-alias-spacing-2x) 0;
}

.daterangepicker .drp-calendar .calendar-table table thead tr:nth-child(2) th {
  color: var(--fbx-alias-color-surface-on-low-25);
  font-weight: 600;
}

/*================================
  06: NEXT & PREV BUTTONS
=================================*/
.daterangepicker th.next.available,
.daterangepicker th.prev.available {
  --fbx-comp-datereagepicker-button-color-hover: var(--btn-hover, var(--fbx-alias-color-action-neutral-subtle-hover));
  border-radius: var(--fbx-alias-radius-default-large);
  transition: background var(--fbx-comp-datepicker-animation);
  cursor: pointer !important;
}

.daterangepicker th.next.available span::before,
.daterangepicker th.prev.available span::before {
  font-family: "FontAwesome";
  font-weight: 900;
  font-size: 16px;
  line-height: 16px;
  color: var(--fbx-comp-datepicker-color-text);
}

/* fontawesome unicode */
.daterangepicker th.next.available span::before {
  content: "\f054";
}

/* fontawesome unicode */
.daterangepicker th.prev.available span::before {
  content: "\f053";
}

/* Cheverons Hover */
.daterangepicker th.next.available:hover,
.daterangepicker th.prev.available:hover {
  background-color: var(--fbx-alias-color-interaction-ghost-hover);
}

/* Cheverons Active */
.daterangepicker th.next.available:active,
.daterangepicker th.prev.available:active {
  background-color: var(--fbx-alias-color-interaction-ghost-active);
}

/*================================
  07: CALENDER
=================================*/
.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
  width: 32px;
  height: 32px;
  font-family: var(--fbx-global-font-family-secondary-type);
  font-size: var(--fbx-global-font-size-details);
  letter-spacing: var(--fbx-global-font-spacing-details);
  line-height: var(--fbx-global-font-lineheight-details);
  font-weight: var(--fbx-alias-font-weight-details-bold);
  cursor: pointer;
  transition: background var(--fbx-comp-datepicker-animation);
}

.daterangepicker .calendar-table td {
  /* min-width: 32px; */
  width: 100%;
}

/* Singel select */
.daterangepicker.single .calendar-table td {
  border-radius: var(--fbx-alias-radius-default-medium);
}

/* Tabel Gap */
.daterangepicker .drp-calendar.left .calendar-table {
  padding-right: var(--fbx-alias-gap-1x);
}

.daterangepicker .drp-calendar.right .calendar-table {
  padding-left: var(--fbx-alias-gap-1x);
}

.daterangepicker.single .drp-calendar.left .calendar-table {
  padding-right: 0;
}

@media (max-width: 501px) {
  .daterangepicker .drp-calendar.left .calendar-table,
  .daterangepicker .drp-calendar.right .calendar-table {
    padding: 0;
  }
}
.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date,
.daterangepicker td.available:hover,
.daterangepicker th.available:hover,
.daterangepicker td.in-range,
.daterangepicker td.active,
.daterangepicker td.active:hover {
  background-color: transparent;
  border-color: transparent;
}

.daterangepicker .calendar-table {
  background-color: var(--fbx-comp-datepicker-color-background);
}

.daterangepicker .calendar-table table {
  width: 100%;
  margin: 0;
  border-spacing: 0;
  border-collapse: collapse;
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover,
.daterangepicker td.available.off.in-range:hover {
  background-color: var(--fbx-comp-datepicker-color-hover);
}

.daterangepicker td.week,
.daterangepicker th.week {
  font-size: 80%;
  color: var(--fbx-alias-color-surface-on-low-25);
}

.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
  color: var(--fbx-alias-color-surface-on-low-25);
}

.daterangepicker td.in-range {
  background-color: var(--fbx-comp-datepicker-color-highlight);
  color: var(--fbx-comp-datepicker-color-text);
  border-radius: 0;
}

.daterangepicker td.start-date {
  border-radius: var(--fbx-alias-radius-default-medium) 0 0 var(--fbx-alias-radius-default-medium);
}

.daterangepicker td.end-date {
  border-radius: 0 var(--fbx-alias-radius-default-medium) var(--fbx-alias-radius-default-medium) 0;
}

.daterangepicker td.start-date.end-date {
  border-radius: var(--fbx-alias-radius-default-medium);
}

/* Today */
.daterangepicker td.today {
  outline: 1.5px solid var(--fbx-comp-datepicker-color-active);
}

.daterangepicker td.today.active {
  outline: none;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background-color: var(--fbx-comp-datepicker-color-active);
  color: var(--fbx-comp-datepicker-color-active-on);
  /* position: relative;
  z-index: 1; */
}

.daterangepicker td.disabled,
.daterangepicker option.disabled {
  color: var(--fbx-alias-color-disabled-on);
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: var(--fbx-global-opacity-high);
}

/*================================
  08: SELECT 
=================================*/
.daterangepicker select {
  min-width: 50px;
  font-family: var(--fbx-global-font-family-secondary-type);
  font-size: var(--fbx-global-font-size-details);
  letter-spacing: var(--fbx-global-font-spacing-details);
  line-height: var(--fbx-global-font-lineheight-details);
  font-weight: var(--fbx-alias-font-weight-details-regular);
  outline: none;
  background: var(--fbx-alias-color-background-emphasis-low);
  color: var(--fbx-alias-color-surface-on-low-100);
  border-radius: var(--fbx-alias-radius-default-small);
  border: 1px solid var(--fbx-alias-color-outline-emphasis-medium);
  padding: var(--fbx-alias-spacing-3x);
  cursor: pointer;
  transition: background var(--fbx-comp-datepicker-animation);
}

/* Select Hover */
.daterangepicker select:hover {
  border-color: var(--fbx-alias-color-outline-emphasis-high);
}

/* Select Focus */
.daterangepicker select:focus-within {
  border-color: var(--fbx-alias-color-focus-emphasis-high);
  box-shadow: var(--fbx-alias-outline-focused);
}

.daterangepicker .calendar-time {
  text-align: center;
  margin: 8px auto 8px auto;
}

.daterangepicker .calendar-time select.disabled,
.daterangepicker select.disabled:focus-within {
  color: var(--fbx-alias-color-disabled-on);
  background-color: var(--fbx-alias-color-background-emphasis-medium);
  border-color: var(--fbx-alias-color-disabled-emphasis-high);
  cursor: not-allowed;
  box-shadow: none;
}

/*================================
  09: SELECT - YEAR / MONTH 
=================================*/
.daterangepicker th.month,
.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
  width: auto;
  font-size: var(--fbx-global-font-size-label);
  line-height: var(--fbx-global-font-lineheight-label);
  font-weight: 700;
}

.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
  margin: 0;
  border: none;
  box-shadow: none;
}

/* Select Gap */
.daterangepicker select.monthselect {
  margin-right: var(--fbx-alias-gap-1x);
}

/* Select Hover */
.daterangepicker select.monthselect:hover,
.daterangepicker select.yearselect:hover {
  background-color: var(--fbx-alias-color-interaction-ghost-hover);
}

/* Select Active */
.daterangepicker select.monthselect:active,
.daterangepicker select.yearselect:active {
  background-color: var(--fbx-alias-color-interaction-ghost-active);
}

/*================================
  10: FOOTER 
=================================*/
.daterangepicker .drp-buttons {
  text-align: right;
  padding: 8px;
  border-top: 1px solid var(--fbx-comp-datepicker-color-outline);
  display: none;
  line-height: 12px;
  grid-column: 1/-1;
  width: 100%;
  box-sizing: border-box;
  order: 4;
}

.daterangepicker .drp-selected {
  display: inline-block;
  font-size: 12px;
  padding-right: 8px;
}

.daterangepicker .drp-buttons .btn {
  margin-left: 8px;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
}

.daterangepicker.auto-apply .drp-buttons {
  display: none;
}

/*================================
  11: RANGES 
=================================*/
.daterangepicker .ranges {
  width: 100%;
}

.daterangepicker.show-ranges.single.rtl .drp-calendar.left,
.daterangepicker.show-ranges.rtl .drp-calendar.right {
  border-right: 1px solid var(--fbx-comp-datepicker-color-outline);
}

.daterangepicker.show-ranges.single.ltr .drp-calendar.left,
.daterangepicker.show-ranges.ltr .drp-calendar.left {
  border-left: 1px solid var(--fbx-comp-datepicker-color-outline);
}

.daterangepicker .ranges,
.daterangepicker.show-calendar .ranges,
.daterangepicker .ranges ul {
  margin: 0;
}

.daterangepicker .ranges ul {
  gap: 4px;
  padding: var(--fbx-alias-spacing-3x);
  list-style: none;
}

/*================================
 12: LIST ITEM - NEUTRAL
=================================*/
.daterangepicker .ranges li {
  font-size: var(--fbx-global-font-size-label);
  line-height: var(--fbx-global-font-lineheight-label);
  font-weight: var(--fbx-alias-font-weight-label-regular);
  letter-spacing: var(--fbx-global-font-spacing-label);
  padding: var(--fbx-alias-spacing-3x);
  border-radius: var(--fbx-alias-radius-default-small);
  transition: background var(--fbx-comp-datepicker-animation);
  cursor: pointer;
}

/* list-item Hover */
.daterangepicker .ranges li:hover,
.daterangepicker .ranges li.active:hover {
  background-color: var(--fbx-alias-color-interaction-ghost-hover);
}

/* list-item Pressed */
.daterangepicker .ranges li:active {
  background-color: var(--fbx-alias-color-interaction-ghost-active);
}

/* list-item Active */
.daterangepicker .ranges li.active {
  background-color: var(--fbx-alias-color-interaction-ghost-selected);
  color: var(--fbx-comp-datepicker-color-text);
}

/*================================
 13: MEDIA QUERYS
=================================*/
@media (max-width: 640px) {
  .daterangepicker .ranges {
    width: 100%;
    grid-column: 1/-1;
  }
}
@media (max-width: 501px) {
  .daterangepicker .drp-calendar {
    width: 100%;
  }
  .daterangepicker .ranges {
    width: 100%;
  }
}
