@import "./picker";
@import "./picker.ios.vars";

// iOS Picker
// --------------------------------------------------

.picker-ios {
  font-family: $picker-ios-font-family;
}

.picker-ios .picker-wrapper {
  height: $picker-ios-height;

  border-top: 1px solid $picker-ios-border-color;

  background: $picker-ios-background-color;
}

.picker-ios .picker-toolbar {
  display: flex;

  height: $picker-ios-toolbar-height;

  border-bottom: $hairlines-width solid $picker-ios-border-color;

  background: $picker-ios-toolbar-background-color;
}

.picker-ios .picker-toolbar-button {
  @include text-align(end);

  flex: 1;
}

.picker-ios .picker-toolbar-button:last-child .picker-button {
  font-weight: $picker-ios-button-strong-font-weight;
}

.picker-ios .picker-toolbar-button:first-child {
  @include text-align(start);

  font-weight: normal;
}

.picker-ios .picker-button,
.picker-ios .picker-button.activated {
  @include margin(0);
  @include padding($picker-ios-button-padding-top, $picker-ios-button-padding-end, $picker-ios-button-padding-bottom, $picker-ios-button-padding-start);

  height: $picker-ios-button-height;

  font-size: $picker-ios-button-font-size;
  color: $picker-ios-button-text-color;
  background: $picker-ios-button-background-color;
}

.picker-columns {
  height: $picker-ios-height - $picker-ios-toolbar-height - 1;

  perspective: $picker-ios-column-perspective;
}

.picker-ios .picker-col {
  @include padding($picker-ios-column-padding-top, $picker-ios-column-padding-end, $picker-ios-column-padding-bottom, $picker-ios-column-padding-start);

  transform-style: preserve-3d;
}

.picker-ios .picker-prefix,
.picker-ios .picker-suffix,
.picker-ios .picker-opts {
  top: $picker-ios-option-offset-y;

  font-size: $picker-ios-option-font-size;
  line-height: $picker-ios-option-height;
  color: $picker-ios-option-text-color;

  transform-style: preserve-3d;

  pointer-events: none;
}

.picker-ios .picker-opt {
  @include padding(
    $picker-ios-option-padding-top,
    $picker-ios-option-padding-end,
    $picker-ios-option-padding-bottom,
    $picker-ios-option-padding-start);
  @include margin(0);
  @include transform-origin(center, center);

  height: 46px;

  font-size: $picker-ios-option-font-size;
  line-height: $picker-ios-option-height;
  color: $picker-ios-option-text-color;

  background: transparent;
  transform-style: preserve-3d;
  transition-timing-function: ease-out;

  backface-visibility: hidden;

  pointer-events: auto;
}

.picker-ios .picker-above-highlight {
  @include position(0, null, null, 0);
  @include transform(translate3d(0, 0, 90px));

  position: absolute;
  z-index: 10;
  display: block;

  width: 100%;
  height: $picker-ios-option-offset-y + 4px;

  border-bottom: 1px solid $picker-ios-border-color;

  background: linear-gradient(to bottom,
                            $picker-ios-top-background-color 20%,
                            $picker-ios-bottom-background-color 100%);
}

.picker-ios .picker-below-highlight {
  @include position($picker-ios-option-offset-y + $picker-ios-option-height - 4, null, null, 0);
  @include transform(translate3d(0, 0, 90px));

  position: absolute;

  z-index: 11;
  display: block;

  width: 100%;
  height: $picker-ios-option-offset-y + $picker-ios-option-height;

  border-top: 1px solid $picker-ios-border-color;

  background: linear-gradient(to top,
                           $picker-ios-top-background-color 30%,
                           $picker-ios-bottom-background-color 100%);
}
