/* ----------------------------------
 * Time selector
 * ---------------------------------- */

/* Main dialog setup */
[role="dialog"][data-type="time-selector"] {
  background: url(time_selector/images/ui/pattern.png) repeat left top, url(time_selector/images/ui/gradient.png) no-repeat left top / 100% 100%;
  overflow: hidden;
  position: absolute;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 0 7rem;
  color: #fff;
  font-family: sans-serif;
}

[role="dialog"][data-type="time-selector"] h1 {
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 4.8rem;
  color: #fff;
  border-bottom: 0.1rem solid #616262;
  background: rgba(0 ,0, 0, .2);
  margin: 0;
  padding: 0 3rem 1rem;
  height: 4.8rem;
  -moz-box-sizing: border-box;
}

/* Time Selector */
[role="dialog"][data-type="time-selector"] .picker-container {
  -moz-box-sizing: border-box;
  position: relative;
  width: calc(100% - 5rem);
  height: 22.5rem;
  margin: 5.4rem auto 0;
  padding-top: 8.8rem;
  border-left:  0.1rem solid #111;
  border-right: 0.1rem solid #111;
  overflow: hidden;
}

[role="dialog"][data-type="time-selector"] .picker-container:before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  border-top: solid 0.7rem;
  -moz-border-top-colors:
    rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.3)
    rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.1)
    rgba(0, 0, 0, 0.05);
  z-index: 10;
}

[role="dialog"][data-type="time-selector"] .picker-container:after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-bottom: solid 0.7rem;
  -moz-border-bottom-colors:
    rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.3)
    rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.1)
    rgba(0, 0, 0, 0.05);
  z-index: 10;
}

[role="dialog"][data-type="time-selector"] .picker-bar-background {
  position: absolute;
  top: 0;
  right: 0;
  width: calc(100% / 3);
  height: 100%;
  background: url(time_selector/images/ui/pattern-time.png);
}

#time-picker.format24h .picker-bar-background {
  display: none;
}

[role="dialog"][data-type="time-selector"] .value-picker-hours-wrapper,
[role="dialog"][data-type="time-selector"] .value-picker-minutes-wrapper,
[role="dialog"][data-type="time-selector"] .value-picker-hour24-wrapper {
  -moz-box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / 3);
  height: 100%;
  padding-top: 8.3rem;
  border-right: solid 0.2rem;
  -moz-border-right-colors: #1d1d1d #4a4a4a;
}

[role="dialog"][data-type="time-selector"] .format12h .value-picker-minutes-wrapper {
  left: calc(100% / 3);
}

[role="dialog"][data-type="time-selector"] .format12h .value-picker-hour24-wrapper {
  left: auto;
  right: 0;
  border: none;
}

[role="dialog"][data-type="time-selector"] .format24h .value-picker-hours-wrapper,
[role="dialog"][data-type="time-selector"] .format24h .value-picker-minutes-wrapper,
[role="dialog"][data-type="time-selector"] .format24h .picker-bar-background {
  width: 50%;
}

[role="dialog"][data-type="time-selector"] .format24h .value-picker-minutes-wrapper {
  left: auto;
  right: 0;
  border: none;
}

[role="dialog"][data-type="time-selector"] .format24h .value-picker-hour24-wrapper {
  display: none;
}

[role="dialog"][data-type="time-selector"] .value-picker-hours,
[role="dialog"][data-type="time-selector"] .value-picker-minutes,
[role="dialog"][data-type="time-selector"] .value-picker-hour24-state {
  -moz-user-select: none;
  position: relative;
  width: 100%;
  z-index: 1;
}

[role="dialog"][data-type="time-selector"] .value-indicator {
  position: absolute;
  width: 100%;
  height: 4.6rem;
  background-color: #00A5C5;
  box-shadow: 0 0 0.7rem rgba(0,0,0, .4);
  opacity: .99;
  pointer-events: none;
}

[role="dialog"][data-type="time-selector"] .value-indicator > .value-indicator-colon {
  position: absolute;
  width: calc(100% - (100% / 3));
  height: 100%;
  font: 2.2rem/4.4rem Sans-serif;
  text-align: center;
  background-color: #00A5C5;
  pointer-events: none;
}

[role="dialog"][data-type="time-selector"] .format24h .value-indicator-colon {
  display: none;
}

[role="dialog"][data-type="time-selector"] .animation-on {
  transition-duration: 0.5s;
  transition-property: transform;
}

[role="dialog"][data-type="time-selector"]  .picker-unit {
  position: relative;
  font: 2.2rem/5.6rem Sans-serif;
  color: #fff;
  text-align: center;
  vertical-align: middle;
  width: 100%;
  height: 5.6rem;
  pointer-events: none;
}


/* Menu & buttons setup */
[role="dialog"][data-type="time-selector"] menu {
  white-space: nowrap;
  margin: 0;
  padding: 1.5rem;
  border-top: solid 0.1rem rgba(255, 255, 255, 0.1);
  background: #2d2d2d url(time_selector/images/ui/pattern.png) repeat left top;
  display: block;
  overflow: hidden;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

[role="dialog"][data-type="time-selector"] menu button::-moz-focus-inner {
  border: none;
  outline: none;
}

[role="dialog"][data-type="time-selector"] menu button {
  width: calc((100% - 1rem) / 2);
  height: 3.8rem;
  margin: 0 0 1rem;
  padding: 0 1.5rem;
  -moz-box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background: #fafafa url(time_selector/images/ui/default.png) repeat-x left bottom/ auto 100%;
  border: 0.1rem solid #a6a6a6;
  border-radius: 0.3rem;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 3.8rem;
  color: #333;
  text-align: center;
  text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3);
  text-decoration: none;
  outline: none;
}

/* Press (default & affirmative) */
[role="dialog"][data-type="time-selector"] menu button:active,
[role="dialog"][data-type="time-selector"] menu button.affirmative:active {
  border-color: #008aaa;
  color: #333;
}

/* affirmative */
[role="dialog"][data-type="time-selector"] menu button.affirmative {
  background-image: url(time_selector/images/ui/affirmative.png);
  background-color: #00caf2;
  border-color: #008eab;
}

[role="dialog"][data-type="time-selector"] menu button:last-child {
  margin-left: 1rem;
}

[role="dialog"][data-type="time-selector"] menu button,
[role="dialog"][data-type="time-selector"] menu button:first-child {
  margin: 0;
}

[role="dialog"][data-type="time-selector"] menu button.full {
  width: 100%;
}
