/*
 * Copyright (C) 2013 salesforce.com, inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

* {
    /* Those probably need to live anywhere else*/
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.surface {
    position: absolute;
    -webkit-transform-origin: center center;
    transform-origin: center center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: flat;
    transform-style: flat;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

.disable-hover,
.disable-hover * {
  pointer-events: none !important;
}

.scroller-wrapper {
    position: relative;
    overflow: hidden;
}
.scroller-wrapper.native .scroller {
    position: absolute;
    top:0;
    bottom: 0;
    width:100%;
    overflow: scroll;
    -webkit-overflow-scrolling: touch;
}

.scroller-wrapper .accesibiliy-enabled {
    overflow: auto;
}

.scroller {
    position: absolute;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    -o-text-size-adjust: none;
    text-size-adjust: none;
}

.scroll-vertical .scroller, .scroll-vertical .surface {
    width: 100%;
}
.scroll-horizontal .scroller, .scroll-horizontal .surface {
    height: 100%;
}

.pullToRefresh {
    -webkit-transform : translate3d(0,0,0);
    -moz-transform    : translate3d(0,0,0);
    -ms-transform     : translate3d(0,0,0);
    transform         : translate3d(0,0,0);
    position: absolute;
    width: 100%;
    height: 50px;
    top: -50px;
    text-align: center;
    line-height: 50px;
    overflow:hidden;
}

.pullToLoadMore {
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    height: 50px;
    width: 100%;
    text-align: center;
    line-height: 50px;
}

.pullToRefresh > .icon, .pullToLoadMore > .icon {
    display: inline-block;
    background-position: 50%;
    background-repeat: no-repeat;
    border-radius: 5px;

    -webkit-transition : -webkit-transform 300ms;
    -moz-transition    : -moz-transform 300ms;
    -ms-transition     : -ms-transform 300ms;
    transition         : transform 300ms;

    -webkit-transform : translate3d(0,0,0);
    -moz-transform    : translate3d(0,0,0);
    -ms-transform     : translate3d(0,0,0);
    transform         : translate3d(0,0,0);
    padding: 0 5px;
}
.pullToRefresh.pull  > .icon, .pullToLoadMore.pull > .icon {
    -webkit-transform : translate3d(0,0,0) rotate(180deg);
    -moz-transform    : translate3d(0,0,0) rotate(180deg);
    -ms-transform     : translate3d(0,0,0) rotate(180deg);
    transform         : translate3d(0,0,0) rotate(180deg);
}

.pullToRefresh.update > .icon, .pullToLoadMore.update > .icon {
    -webkit-animation : spin .6s linear infinite;
    -moz-animation    : spin .6s linear infinite;
    -ms-animation     : spin .6s linear infinite;
    animation         : spin .6s linear infinite;
}

@-webkit-keyframes spin { from { -webkit-transform: rotate(180deg); } to { -webkit-transform: rotate(540deg); } }
@-moz-keyframes spin    { from { -moz-transform: rotate(180deg); }    to { -moz-transform: rotate(540deg); } }
@-ms-keyframes spin     { from { -ms-transform: rotate(180deg); }     to { -ms-transform: rotate(540deg); } }
@keyframes spin         { from { transform: rotate(180deg); }         to { transform: rotate(540deg); } }
