.mp-picker {
  @color-primary: #009688;
  @color-text-inverted: rgba(255, 255, 255, 1);
  @color-text-inverted-secondary: rgba(255, 255, 255, .7);
  @color-text: rgba(0, 0, 0, .87);
  @color-background: #fafafa;

  @color-dark-primary: #80cbc4;
  @color-dark-text: rgba(255, 255, 255, 1);
  @color-dark-background: #424242;
  @color-dark-background-secondary: #555;
  
  .clearfix() {
    &:before,
    &:after {
      content: " ";
      display: table;
    }
    &:after {
      clear: both;
    }
  }

  .clearfix();
  font-family: 'roboto', sans-serif;
  font-size: 15px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2.5px 6px 2px rgba(0, 0, 0, .2);
  width: 350px;
  height: 12.5em;
  position: absolute;
  display: table;
  z-index: 100;
  
  @media (max-width: 650px), (max-height: 650px) {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
  
  * {
    box-sizing: border-box;
  }

  .mp-picker-choose {
    * {
      display: inline-block;
      text-align: center;
      font-weight: 500;
    }
    
    a,
    a:hover,
    a:focus {
      color: @color-text;
      text-decoration: none;
    }

    [class*="mp-picker-click"] {
      cursor: pointer;
      margin-bottom: .6em;
      border-radius: 1em;
      transition: background-color .2s ease;     
      
      &.mp-picker-choose-day {
        font-size: .8em;
        margin: 0;
        padding: .3em 0;
      }
      
      &.mp-empty {
        background-color: transparent !important;
        cursor: default;
      }

      &:hover {
        background-color: darken(@color-background, 8%);
      }

      &.today {
        color: @color-primary;
      }

      &.active {
        color: @color-text-inverted;
        background-color: @color-primary;
      }
    }
    
    .mp-picker-header {
      margin-bottom: .6em;
      font-size: .8em;
      opacity: .57;
            
      &[class*="mp-picker-header-day"] {
        width: 100% / 7;
      }
    }
  }
  
  &[data-theme="dark"] {
    .mp-picker-info {
      background: @color-dark-background-secondary;
    }
    
    .mp-picker-picker {
      background-color: @color-dark-background;
      color: @color-text-inverted;
      
      .mp-picker-site .mp-picker-site-button {
        background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIHN0eWxlPSJmaWxsOiAjZjRmNGY0OyIgZD0iTTMuNywwLjdMMS40LDNsMi4zLDIuM0wzLDZMMCwzbDMtM0wzLjcsMC43eiIvPg0KPC9nPg0KPC9zdmc+DQo=");
        opacity: 1;
        
        &:hover { background-color: lighten(@color-dark-background, 8%); }
      }
      
      [class*="mp-picker-choose-month"] {
        &:hover { background-color: lighten(@color-dark-background, 8%); }

        &.today { color: @color-dark-primary; }

        &.active {
          background-color: @color-dark-primary;
          color: @color-dark-background
        }
      }
    }
  }
  
  &[data-orientation="portrait"] {
    width: 226px;
    height: 326px;
    display: block;
    
    .mp-picker-info {
      display: block;
      width: 100%;
      height: 25%;
      
      .mp-info-second {
        word-wrap: break-word;
      }
    }
        
    .mp-picker-picker {
      display: block;
      width: 100%;
      height: 75%;
    }
  }
  
  &.mp-datepicker {
    [class*="mp-picker-choose"] span,
    [class*="mp-picker-choose"] a {
      width: 100% / 7;
    }
  }
  
  &.mp-monthpicker {
    [class*="mp-picker-choose"] span,
    [class*="mp-picker-choose"] a {
      width: 100% / 3;
    }
    
    &[data-orientation="portrait"] .mp-picker-picker {
      padding-top: 2em;
    }
  }
  
  .mp-picker-info {
    display: table-cell;
    width: 30%;
    color: @color-text-inverted;
    background: @color-primary;
    padding: 1em;
    
    .mp-info-first {
      color: @color-text-inverted-secondary;
      width: 100%;
      display: inline-block;
    }
    
    .mp-info-second {
      font-size: 1.9em;
      text-overflow: ellipsis;
      max-width: 100%;
      overflow: hidden;
      display: inline-block;
    }
  }
  
  .mp-picker-picker {
    display: table-cell;
    width: 70%;
    background: @color-background;
    color: @color-text;
    padding: 1em;
    overflow: hidden;
    
    .mp-picker-site {
      .clearfix();
      margin-bottom: 1em;
      font-size: .8em;
      
      > * {
        float: left;
      }
      
      .mp-picker-site-button {
        display: block;
        background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik0zLjcsMC43TDEuNCwzbDIuMywyLjNMMyw2TDAsM2wzLTNMMy43LDAuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K");
        background-repeat: no-repeat;
        background-size: .5em;
        background-position: center;
        height: 2em;
        width: 2em;
        margin: .25em 0;
        cursor: pointer;
        opacity: .8;
        transition: background-color .2s ease;
        border-radius: 2em;
        
        &:hover {
          background-color: darken(@color-background, 10%);
        }
      }
      
      .mp-picker-site-next {
        transform: rotate(180deg);
      }
      
      .mp-picker-site-this {
        width: ~"calc(100% - 4em)";
        text-align: center;
        font-weight: 600;
        line-height: 2em;
      }
    }
    
    .mp-picker-choose {
      .clearfix();
    }
  }
  
  .mp-animate {
    transform: translate(0);
    transition: transform .2s ease,
                opacity .2s ease;
    
    &.mp-picker-site-this {
      transition-timing-function: linear;
    }
    
    &.mp-animate-right {
      transform: translateX(10%);
      opacity: 0;
    }

    &.mp-animate-left {
      transform: translateX(-10%);
      opacity: 0;
    }
  }
}
