/*
 *  Copyright 2012 Research In Motion Limited.
 *
 * 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.
 */


html {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;
}

body {
    width: 100%;
    height: 100%;
}

#contextMenu {
    height: 100%;
    width: 563px;
    border-image: url('../assets/core_crosscutmenu_bg.png') 1 1 1 15 fill / 0 0 0 0 repeat;
    -webkit-box-shadow: -10px 0 25px #121212;
    box-shadow: -10px 0 25px #121212;
    -webkit-animation-timing-function: ease-out;
    position: absolute;
    right: -583px;
    top: 0;
    bottom: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    z-index: 100;
}

#contextMenuModal {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: .01;
    background: white;
}

#contextMenuDelete {
    position: absolute;
    bottom: 0;
    width: 100%;
    font-size: 2.5em;
    color: #fafafa;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    -webkit-transition: 0.25s;
    -webkit-animation-timing-function: ease-out;
 }

#contextMenuHeader {
    position: absolute;
    top: -138px;
    height: 120px;
    width: 95%;
    background-color: #292929;
    white-space: nowrap;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    padding-top: 15px;
    padding-left: 20px;
    -webkit-transition: 0.25s;
    -webkit-animation-timing-function: ease-out;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
}

#contextMenuContent {
    position: relative;
    font-size: 2.5em;
    color: #fafafa;
    width: 100%;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
}

.showMenuHeader {
    -webkit-transform: translate(0, 138px);
    transform: translate(0, 138px);
}

#contextMenuHeadText {
    height: 60px;
    font-size: 2.5em;
    color: #fafafa;
    text-overflow: ellipsis;
    overflow-x: hidden;
}

#contextMenuSubheadText {
    height: 60px;
    font-size: 1.9em;
    color: #cecece;
    text-overflow: ellipsis;
    overflow-x: hidden;
}

.peekContextMenu {
    -webkit-transform: translate(-121px, 0);
    transform: translate(-121px, 0);
}

.showContextMenu {
    -webkit-transform: translate(-569px, 0);
    transform: translate(-569px, 0);
}

.showContextMenuHandle {
    position: absolute;
    height: 119px;
    width: 121px;
    background-image: url('../assets/drag_bar.png');
}

.showMoreHandleIcon {
    height: 81px;
    width: 81px;
    position: absolute;
    top: 20px;
    left: 40px;
}

.hideContextMenuItem {
    display: none;
    -webkit-transform: translateZ(0) translate(500px,0);
    transform: translateZ(0) translate(500px,0);
}

.hideContextMenuHandle {
    -webkit-transform: translateZ(0) translate(0,1024px);
    transform: translateZ(0) translate(0,1024px);
}

.hideContextMenuDelete {
    -webkit-transform: translateZ(0) translate(0,1024px);
    transform: translateZ(0) translate(0,1024px);
}

.contextmenuItem {
    background-size: 81px 81px;
    border-bottom: 2px solid #414141;
    height: 119px;
    line-height: 119px;
    -webkit-transition-duration: 0.35s;
    -webkit-animation-timing-function: ease-out;
    white-space: nowrap;
    color: #FAFAFA;
    background-color: #000000;
    background-repeat: no-repeat;
    background-position: 20px 20px;
    padding-left: 120px;
}

.contextmenuItem:first-child {
    border-top: 2px solid #414141;
}

.showContextmenuItem {
    -webkit-transform: translateZ(0) translate(-462px,0);
    transform: translateZ(0) translate(-462px,0);
    border-image: url('../assets/core_crosscutmenu_selected.png') 2 1 2 13 / 0 0 0 5;
    z-index:101;
}

.peekItem {
    -webkit-transform: translateZ(0) translate(0, 0);
    transform: translateZ(0) translate(0, 0);
    border-image: none;
}

.fullContextmenuItem {
    -webkit-transition: background 0.25s;
    -transition: background 0.25s;
    background-color: #66ccff;
}


#listContainer {
    font-family: "Slate", "Myriad Pro", "Arial", sans-serif;
    font-size: 100px;
    color: white;
    background-color: rgba(18, 18, 18, 1);
    width: 768px;
    position: absolute;
    right: -768px;
    top: 0;
    bottom: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    z-index: 100;
    -webkit-transition-duration: 0.25s;
    -webkit-animation-timing-function: ease-out;
}

#listHeader {
    width: 100%;
    height: 100px;
    border-style: solid;
    border-width: 0 0 2px 0;
    background-color: rgba(18, 18, 18, 1);
    color: white;
    font-size: 80px;
    padding-left: 8px;
    padding-top: 5px;
}

.showList {
    display: block;
    -webkit-transform:translate(-768px, 0);
    transform:translate(-768px, 0);
}

.hideList {
    -webkit-transform:translate(0px, 0);
    transform:translate(0px, 0);
}

.listItem {
    width: 100%;
    height: 100px;
    font-size: 80px;
    border-style: solid;
    border-width: 0 0 2px 0;
    border-color: white;
    padding-left: 20px;
}


#dialog {
    text-align: center;
    position: absolute;
    overflow: hidden;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 18, 18, 0.5);
    font-size: 2.5em;
    z-index: 120;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    -webkit-box-align: center;
}

.dialog-top-third {
    -webkit-box-flex: 1;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    -webkit-box-align: center;
}

.dialog-bottom-two-thirds {
    -webkit-box-flex: 2;
}

#dialog-panel {

    /* From BB10 Dialogues v.01 */
    min-height: 317px;
    max-height: 1240px;
    min-width: 728px;
    max-width: 728px;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: justify;
    -webkit-box-align: stretch;
    word-wrap: break-word;
}

.dialog-header {
    padding: 11px 0;
    font-size: 1em;
    color: #FAFAFA;

    text-shadow: rgba(0, 0, 0, 0.2) 0 -1px;

    border-width: 14px 14px 14px 14px;
    border-image-source: url('../assets/dialogues_header_bg.png');
    border-image-slice: 14 14 14 14 fill;

}

.dialog-content {
    color: #262626;
    text-align: left;
    text-shadow: rgba(255, 255, 255, 0.5) 0 -2px;

    padding: 24px;
    background: url('../assets/dialogues_bg.png');

    border-image-source: url('../assets/dialogues_divider_solid.png');
    border-image-slice: 0 0 2 0;
    border-width: 0 0 2px 0;

    -webkit-box-flex: 1;
}

.dialog-input-container {
    margin-top: 2%;
}

.dialog-input {
    /* TODO: get visual design for this */
    color: #121212;
    background-color: #fafafa;
    padding: 2%;
    margin-top: 2%;
    margin-bottom: 2%;
    border-width: 2px;
    border-radius: 12px;
    border-color: #262626;
    border-style: solid;
    box-sizing: border-box;
    width: 100%;
    font: inherit;
    font-weight: lighter;
}

.dialog-input::-webkit-input-placeholder {
    font-style: italic;
}

.dialog-input-autofill {
    /* identical with input:-webkit-autofill */
    background-color: #FAFFBD !important;
    background-image:none !important;
    color: #000000 !important;
}

.dialog-buttons {
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-pack: center;
-webkit-box-align: stretch;

border-image-source: url('../assets/dialogues_button_bg.png');
border-image-slice: 14 14 14 14 fill;
border-width: 14px;
}

.dialog-button-divider {
width: 2px;
background-image: url('../assets/dialogues_divider_solid.png');
border-width: 14px 0;
border-image-source: url('../assets/dialogues_divider_solid.png');
border-image-slice: 1 0 1 0;
border-image-outset: 1 0 1 0;
}

.dialog-button {
color: inherit;
font: inherit;
text-shadow: rgba(255, 255, 255, 0.5) 0 -2px;
padding: 0;
margin: 0;
background: none;
line-height: 200%;
display: block;

width: 0;
-webkit-box-flex: 1;

border: 14px solid transparent;
}

.dialog-button:active { /* all current dialogs have at most two buttons, so this is unused atm */
border-image-source: url('../assets/dialogues_button_pressed_center.png');
border-image-slice: 1 0 1 0 fill;
border-image-outset: 1 0 1 0;
}

.dialog-button:first-child:active { /* TODO: RTL */
border-image-source: url('../assets/dialogues_button_pressed_left.png');
border-image-slice: 14 0 14 14 fill;
border-image-width: 1 0 1 1;
border-image-outset: 1 0 1 1;
}

.dialog-button:last-child:active { /* TODO: RTL */
border-image-source: url('../assets/dialogues_button_pressed_right.png');
border-image-slice: 14 14 14 0 fill;
border-image-width: 1 1 1 0;
border-image-outset: 1 1 1 0;
}

.dialog-button:only-child:active {
border-image-source: url('../assets/dialogues_button_pressed_only.png');
border-image-slice: 14 14 14 14 fill;
border-image-width: 1 1 1 1;
border-image-outset: 1 1 1 1;
}
.hidden {
        display: none !important;
            visibility: hidden !important;
}



/*
    Screen CSS
 */

.screenInner {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    width: 100%;
    height: 100%;
    position: absolute;
    top:0;
    left:0;
    background-color: #f8f8f8;
    color: #262626;
}

.screenSlide {
    -webkit-transition: -webkit-transform 0.25s ease-out
}

.removed {
    display: none;
}

.hidden {
    display: none;
    visibility: hidden;
}

/*
    Activity Indicator CSS
 */

 @-webkit-keyframes spin {
     from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
     to { -webkit-transform: rotate(360deg); transform: rotate(360deg);}
 }

#targetLoader {
    -webkit-box-flex: 1;
    display: -webkit-box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    -webkit-box-orient: vertical;
    margin: 20px;
}

#targetLoaderActivity {
    margin: 0 0 20px 0;
}

.activityIndicator {
    background-image: url('../assets/core_activityindicator_swirl_large.png'), url('../assets/core_activityindicator_bg_large.png');
    width: 184px;
    height: 184px;
    -webkit-animation: spin 1s infinite linear;
}

/*
    Invocation List Container / Item CSS
 */

.invocationListContainer {
    font-family: "Slate", "Myriad Pro", "Arial", sans-serif;
    font-size: 40px;
    position: relative;
    width: 100%;
    bottom: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    z-index: 100;
    background-color: #f8f8f8;
    color: #262626;
    height: 100%;
}

.targetList {
    -webkit-box-flex: 1;
    width: 100%;
    position: relative;
    overflow: scroll;
}

.invocationListItem {
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    border-bottom: 2px solid #c5c5c5;
    background-color: inherit;
    height: 119px;
    display: -webkit-box;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    -webkit-box-orient: horizontal;
    -webkit-transition: background 0.1s;
}

.invocationListItemText {
    overflow: hidden;
    padding: 0 20px;
    height: 119px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    -webkit-box-flex: 1;
}

.invocationListItemIconDiv {
    background-size: cover;
    background-repeat: no-repeat;
    width: 119px;
    height: 119px;
}

.invocationListItem:active {
    background-color: #66ccff;
}

/*
    Cancel Titlebar CSS
 */

.cancelTitlebar {
    background: -webkit-gradient(linear, left bottom, left top, from(#d5d5d5), to(#f2f2f2));
    background: gradient(linear, left bottom, left top, from(#d5d5d5), to(#f2f2f2));
    border-width: 0 0 10px;
    border-image: url('../assets/core_titlebar_shadow.png') 0 0 10 0 stretch stretch;
    height: 121px;
    width: 100%;
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-align: center;
    -webkit-box-pack: center;
    -webkit-user-select: none;
    user-select: none;
}

.cancelTitlebarTitle {
    -webkit-box-flex: 2;
    text-align: center;
    font-size: 40px;
}

.cancelTitlebar > button {
    min-width: 185px;
    max-width: 214px;
    height: 80%;
    font-size: 36px;
    margin-left: 10px;
    -webkit-box-pack: start;
}
