@import '../../../../pickadate/lib/themes-source/base.less';
@import '../../../../pickadate/lib/themes-source/base.date.less';
@import '../../../../pickadate/lib/themes-source/base.time.less';
.pickadate-default {
  @import '../../../../pickadate/lib/themes-source/default.less';
  @import '../../../../pickadate/lib/themes-source/default.date.less';
  @import '../../../../pickadate/lib/themes-source/default.time.less';

  // Fix positioning bug on iPad
  .picker__holder {
    bottom: auto;
    height: 100%;
    right: auto; // Fix jumping page when scrollbars visible
  }

  .picker__frame {
    transition: none;
  }

  .picker__box {
    overflow: hidden;
  }

  @media (min-height: @breakpoint-medium) {
    .picker--opened .picker__frame {
      top: 50%;
      bottom: auto;
      margin-top: -@dp-height-medium/2;
      margin-bottom: auto;
    }
  }

}
.pickadate-classic {
  @import '../../../../pickadate/lib/themes-source/classic.less';
  @import '../../../../pickadate/lib/themes-source/classic.time.less';
  @import '../../../../pickadate/lib/themes-source/classic.date.less';

  .picker__holder {
    min-width: @picker-min-width;
    max-width: @picker-max-width;
  }
}

@dp-height-base: (@base-font-size * 0.75) + (@base-font-size * @base-line-height) + (@base-font-size * 0.75) + (@base-font-size * 0.75 * 1.8) + ((@base-font-size * 2.3) * 6) + (@base-font-size * 0.75) + (@base-font-size * 0.8 * @base-line-height) + ((@base-font-size * 0.8)/3 * 4) + 2px;
@dp-height-medium: round((@dp-height-base * 1.5)/2) * 2; // ensure we round to even number

@blue: @brand-primary;
@blue-hover: @border-grey-light;
@black: #000;

//
// Backgrounds
//
@bg-white: @white;
@bg-grey-light: @gray-lighter;

//
// Borders
//
@border-grey: @gray;
@border-grey-light: @gray-lighter;
@border-select: darken( @border-grey-light, 15% );

//
// Buttons
//
@clear-red: @brand-danger;

//
// Picker base
//

// Make sure nothing is above the picker.
@picker-z-index: @zindex-modal + 1;

// Focused input border color.
@input-active-border: transparent;

// Typography.
@base-font-size: @font-size-base - 1px;
@base-line-height: @line-height-base;

// Corners.
@picker-border-radius: @border-radius-large;

// Height breakpoints.
@breakpoint-tiny: 26.5em; // 424px @ 16px
@breakpoint-small: 33.875em; // 542px @ 16px
@breakpoint-medium: 40.125em; // 642px @ 16px
@breakpoint-large: 46.75em; // 748px @ 16px

// Width breakpoints.
@breakpoint-width-tiny: 24.5em; // 392px @ 16px

//
// Date picker options
//

// The year and weekday labels.
@year-weekday-label: @text-muted;

// “Today” tag indicators.
@blue-tag: @brand-warning;
@disabled-tag: @gray;

// Disabled things.. such as days, month nav, etc.
@disabled-things-bg: @border-grey-light;
@disabled-things-text: darken(@disabled-things-bg, 15%);
@disabled-highlighted-things-bg: @gray-lighter;

//
// Theme configurations
//

// The “default” min & max widths.
@picker-min-width: 260px;
@picker-max-width: 480px;

// The time picker min & max widths.
@time-min-width: @picker-min-width;
@time-max-width: 320px;

// Prevent scoll propagation
// Note: Currently doesn't work on iOS
// See: https://bugs.webkit.org/show_bug.cgi?id=153852
.pickadate-open {
  overflow: hidden;
}

.picker {
  display: none;
  &.picker--opened {
    display: block;
  }
}

.picker__footer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-radius: @picker-border-radius @picker-border-radius 0 0;
}

.picker__button--clear,
.picker__button--close,
.picker__button--today {
  line-height: 2em;
  padding: 0.5em 0;
  display: block;
  border-width: 2px;
  &:hover {
    border-color: @bg-grey-light;
  }
  &:focus,
  &:active {
    border-color: @input-border-focus;
  }
}
.picker__button--close {
  float: right;
  border-radius: 0 @picker-border-radius - 1px 0 0;
}
.picker__button--today {
  float: left;
  border-radius: @picker-border-radius - 1px 0 0 0;
}

.picker__header {
  margin-top: 3em;
}

.picker__weekday {
  text-align: center;
  font-weight: normal;
}

.picker__table td {
  border: 1px solid @border-grey-light;
}

.picker__day {
  padding: 0.5em 0;
  &:active {
    background-color: lighten(@blue, 15%);
    color: @white;
  }
}

.picker__year {
  font-style: normal;
  font-size: 1em;
  font-weight: 200;
}

.picker--focused .picker__day--selected,
.picker__day--selected,
.picker__day--selected:hover,
.picker__day--highlighted {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 1px @blue;
}
.picker__day--highlighted:not(.picker__day--selected):not(:hover) {
  background-color: transparent;
}
.picker__button--today[disabled],
.picker__button--today[disabled]:hover {
  border-color: transparent;
  background-color: transparent;
}

// Position calendar icon above pickadate input and style pickadate input like BS form-control
.date {
  @icon-padding: floor((@input-height-base - @font-size-base)/2);
  position: relative;
  .form-control {
    padding-right: @icon-padding + @font-size-base + 2px;
    &[readonly] {
      background: @white;
    }
  }
  .picker__input.picker__input--target,
  .picker__input.picker__input--active {
    @color-rgba: fade(@input-border-focus, 60%);
    border-color: @input-border-focus;
    outline: 0;
    .box-shadow(~'inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}');
  }
  .input-icon {
    position: absolute;
    bottom: 0;
    right: @icon-padding;
    padding: @icon-padding;
    text-align: center;
    color: @text-color;
    .opacity(0.5);
    .fa {
      line-height: 1em;
      display: inline;
    }
  }
  &:hover .input-icon {
    .opacity(1);
  }
}
