/*
 * wq.app - wq/jquery-mobile.scss
 * SASS/SCSS mixins for building custom jQuery Mobile themes
 * (c) 2012-2015 S. Andrew Sheppard
 * http://wq.io/license
 *
 * Styles adapted almost verbatim from jquery.mobile.theme.css
 * (try `diff jquery.mobile.theme-1.4.5.css jquery-mobile.scss`)
 */

/*!
* jQuery Mobile 1.4.5
* Git HEAD hash: 68e55e78b292634d3991c795f06f5e37a512decc <> Date: Fri Oct 31 2014 17:33:30 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2014 jQuery Foundation, Inc. and othercontributors
* Released under the MIT license.
* http://jquery.org/license
*
*/

@import "compass/css3";

@mixin jquery-mobile-global(
  $font:      sans-serif,
  $round:     .6em,
  $btn-round: .3125em,
)
{

/* Globals */
/* Font
-----------------------------------------------------------------------------------------------------------*/
html {
	font-size: 100%;
}
body,
input,
select,
textarea,
button,
.ui-btn {
	font-size: 1em;
	line-height: 1.3;
	font-family: $font;
}
legend,
.ui-input-text input,
.ui-input-search input {
	color: inherit;
	text-shadow: inherit;
}
/* Form labels (overrides font-weight bold in bars, and mini font-size) */
.ui-mobile label,
div.ui-controlgroup-label {
	font-weight: normal;
	font-size: 16px;
}
/* Separators
-----------------------------------------------------------------------------------------------------------*/
/* Field contain separator (< 28em) */
.ui-field-contain {
	border-bottom-color: #828282;
	border-bottom-color: rgba(0,0,0,.15);
	border-bottom-width: 1px;
	border-bottom-style: solid;
}
/* Table opt-in classes: strokes between each row, and alternating row stripes */
/* Classes table-stroke and table-stripe are deprecated in 1.4. */
.table-stroke thead th,
.table-stripe thead th,
.table-stripe tbody tr:last-child {
	border-bottom: 1px solid #d6d6d6; /* non-RGBA fallback */
	border-bottom: 1px solid rgba(0,0,0,.1);
}
.table-stroke tbody th,
.table-stroke tbody td {
	border-bottom: 1px solid #e6e6e6; /* non-RGBA fallback  */
	border-bottom: 1px solid rgba(0,0,0,.05);
}
.table-stripe.table-stroke tbody tr:last-child th,
.table-stripe.table-stroke tbody tr:last-child td {
	border-bottom: 0;
}
.table-stripe tbody tr:nth-child(odd) td,
.table-stripe tbody tr:nth-child(odd) th {
	background-color: #eeeeee; /* non-RGBA fallback  */
	background-color: rgba(0,0,0,.04);
}
/* Buttons
-----------------------------------------------------------------------------------------------------------*/
.ui-btn,
label.ui-btn {
	font-weight: bold;
	border-width: 1px;
	border-style: solid;
}
.ui-btn {
	text-decoration: none !important;
}
.ui-btn-active {
	cursor: pointer;
}
/* Corner rounding
-----------------------------------------------------------------------------------------------------------*/
/* Class ui-btn-corner-all deprecated in 1.4 */
.ui-corner-all {
        @include border-radius($round);
}
/* Buttons */
.ui-btn-corner-all,
.ui-btn.ui-corner-all,
/* Slider track */
.ui-slider-track.ui-corner-all,
/* Flipswitch */
.ui-flipswitch.ui-corner-all,
/* Count bubble */
.ui-li-count {
        @include border-radius($btn-round);
}
/* Icon-only buttons */
.ui-btn-icon-notext.ui-btn-corner-all,
.ui-btn-icon-notext.ui-corner-all {
        @include border-radius(1em);
}
/* Radius clip workaround for cleaning up corner trapping */
.ui-btn-corner-all,
.ui-corner-all {
        @include background-clip();
}
/* Popup arrow */
.ui-popup.ui-corner-all > .ui-popup-arrow-guide {
	left: $round;
	right: $round;
	top: $round;
	bottom: $round;
}
/* Shadow
-----------------------------------------------------------------------------------------------------------*/
.ui-shadow {
        @include box-shadow(0 1px 3px rgba(0,0,0,.15));
}
.ui-shadow-inset {
        @include box-shadow(inset 0 1px 3px rgba(0,0,0,.2));
}
.ui-overlay-shadow {
        @include box-shadow(0 0 12px rgba(0,0,0,.6));
}
/* Icons
-----------------------------------------------------------------------------------------------------------*/
.ui-btn-icon-left:after,
.ui-btn-icon-right:after,
.ui-btn-icon-top:after,
.ui-btn-icon-bottom:after,
.ui-btn-icon-notext:after {
	background-color: 					#666 /*{global-icon-color}*/;
	background-color: 					rgba(0,0,0,.3) /*{global-icon-disc}*/;
	background-position: center center;
	background-repeat: no-repeat;
        @include border-radius(1em);
}
/* Alt icons */
.ui-alt-icon.ui-btn:after,
.ui-alt-icon .ui-btn:after,
html .ui-alt-icon.ui-checkbox-off:after,
html .ui-alt-icon.ui-radio-off:after,
html .ui-alt-icon .ui-checkbox-off:after,
html .ui-alt-icon .ui-radio-off:after {
	background-color: 					#666 /*{global-icon-color}*/;
	background-color: 					rgba(0,0,0,.15) /*{global-icon-disc}*/;
}
/* No disc */
.ui-nodisc-icon.ui-btn:after,
.ui-nodisc-icon .ui-btn:after {
	background-color: transparent;
}
/* Icon shadow */
.ui-shadow-icon.ui-btn:after,
.ui-shadow-icon .ui-btn:after {
        @include box-shadow(0 1px 0 rgba(255,255,255,.3));
}
/* Checkbox and radio */
.ui-btn.ui-checkbox-off:after,
.ui-btn.ui-checkbox-on:after,
.ui-btn.ui-radio-off:after,
.ui-btn.ui-radio-on:after {
	display: block;
	width: 18px;
	height: 18px;
	margin: -9px 2px 0 2px;
}
.ui-checkbox-off:after,
.ui-btn.ui-radio-off:after {
	filter: unquote("Alpha(Opacity=30)");
	opacity: .3;
}
.ui-btn.ui-checkbox-off:after,
.ui-btn.ui-checkbox-on:after {
        @include border-radius(.1875em);
}
.ui-btn.ui-checkbox-off:after {
	background-color: #666;
	background-color: rgba(0,0,0,.3);
}
.ui-radio .ui-btn.ui-radio-on:after {
	background-image: none;
	background-color: #fff;
	width: 8px;
	height: 8px;
	border-width: 5px;
	border-style: solid; 
}
.ui-alt-icon.ui-btn.ui-radio-on:after,
.ui-alt-icon .ui-btn.ui-radio-on:after {
	background-color: #000;
}

/* wq.app customization: Loader moved to jquery.mobile.icons.css */

@include jquery-mobile-global2();

}

@mixin jquery-mobile-theme(
  $theme:        a,

  $page-text:    #333,
  $page-shadow:  #f3f3f3,
  $page-bg:      #f9f9f9,
  $page-border:  #bbb,

  $bar-text:     #333,
  $bar-shadow:   #eee,
  $bar-bg:       #e9e9e9,
  $bar-border:   #ddd,

  $body-text:    #333,
  $body-shadow:  #f3f3f3,
  $body-bg:      #fff,
  $body-border:  #ddd,

  $link:         #38c,
  $link-visited: #38c,
  $link-hover:   #059,
  $link-active:  #059,

  $up-text:      #333,
  $up-shadow:    #f3f3f3,
  $up-bg:        #f6f6f6,
  $up-border:    #ddd,

  $hover-text:   #333,
  $hover-shadow: #f3f3f3,
  $hover-bg:     #ededed,
  $hover-border: #ddd,

  $down-text:    #333,
  $down-shadow:  #f3f3f3,
  $down-bg:      #e8e8e8,
  $down-border:  #ddd,

  $active-text:   #fff,
  $active-shadow: #059,
  $active-bg:     #38c,
  $active-border: #1c4a70
) {

/* Swatch $theme
-----------------------------------------------------------------------------------------------------------*/
/* Bar: Toolbars, dividers, slider track */
.ui-bar-$theme,
.ui-page-theme-$theme .ui-bar-inherit,
html .ui-bar-$theme .ui-bar-inherit,
html .ui-body-$theme .ui-bar-inherit,
html body .ui-group-theme-$theme .ui-bar-inherit {
	background-color: $bar-bg;
	border-color: $bar-border;
	color: $bar-text;
        @if ($bar-shadow) {
	text-shadow: 0 1px 0 $bar-shadow;
        } @else {
        text-shadow: none;
        }
	font-weight: bold;
}
.ui-bar-$theme {
	border-width: 1px;
	border-style: solid;
}
/* Page and overlay */
.ui-overlay-$theme,
.ui-page-theme-$theme,
.ui-page-theme-$theme .ui-panel-wrapper {
	background-color: $page-bg;
	border-color: $page-border;
	color: $page-text;
        @if ($page-shadow) {
	text-shadow: 0 1px 0 $page-shadow;
        } @else {
        text-shadow: none;
        }
}
/* Body: Read-only lists, text inputs, collapsible content */
.ui-body-$theme,
.ui-page-theme-$theme .ui-body-inherit,
html .ui-bar-$theme .ui-body-inherit,
html .ui-body-$theme .ui-body-inherit,
html body .ui-group-theme-$theme .ui-body-inherit,
html .ui-panel-page-container-$theme {
	background-color: $body-bg;
	border-color: $body-border;
	color: $body-text;
        @if ($body-shadow) {
	text-shadow: 0 1px 0 $body-shadow;
        } @else {
        text-shadow: none;
        }
}
.ui-body-$theme {
	border-width: 1px;
	border-style: solid;
}
/* Links */
.ui-page-theme-$theme a,
html .ui-bar-$theme a,
html .ui-body-$theme a,
html body .ui-group-theme-$theme a {
	color: $link;
	font-weight: bold;
}
.ui-page-theme-$theme a:visited,
html .ui-bar-$theme a:visited,
html .ui-body-$theme a:visited,
html body .ui-group-theme-$theme a:visited {
	color: $link-visited;
}
.ui-page-theme-$theme a:hover,
html .ui-bar-$theme a:hover,
html .ui-body-$theme a:hover,
html body .ui-group-theme-$theme a:hover {
	color: $link-hover;
}
.ui-page-theme-$theme a:active,
html .ui-bar-$theme a:active,
html .ui-body-$theme a:active,
html body .ui-group-theme-$theme a:active {
	color: $link-active;
}
/* Button up */
.ui-page-theme-$theme .ui-btn,
html .ui-bar-$theme .ui-btn,
html .ui-body-$theme .ui-btn,
html body .ui-group-theme-$theme .ui-btn,
html head + body .ui-btn.ui-btn-$theme,
/* Button visited */
.ui-page-theme-$theme .ui-btn:visited,
html .ui-bar-$theme .ui-btn:visited,
html .ui-body-$theme .ui-btn:visited,
html body .ui-group-theme-$theme .ui-btn:visited,
html head + body .ui-btn.ui-btn-$theme:visited {
	background-color: $up-bg;
	border-color: $up-border;
	color: $up-text;
        @if ($up-shadow) {
	text-shadow: 0 1px 0 $up-shadow;
        } @else {
        text-shadow: none;
        }
}
/* Button hover */
.ui-page-theme-$theme .ui-btn:hover,
html .ui-bar-$theme .ui-btn:hover,
html .ui-body-$theme .ui-btn:hover,
html body .ui-group-theme-$theme .ui-btn:hover,
html head + body .ui-btn.ui-btn-$theme:hover {
	background-color: $hover-bg;
	border-color: $hover-border;
	color: $hover-text;
        @if ($hover-shadow) {
	text-shadow: 0 1px 0 $hover-shadow;
        } @else {
        text-shadow: none;
        }
}
/* Button down */
.ui-page-theme-$theme .ui-btn:active,
html .ui-bar-$theme .ui-btn:active,
html .ui-body-$theme .ui-btn:active,
html body .ui-group-theme-$theme .ui-btn:active,
html head + body .ui-btn.ui-btn-$theme:active {
	background-color: $down-bg;
	border-color: $down-border;
	color: $down-text;
        @if ($down-shadow) {
	text-shadow: 0 1px 0 $down-shadow;
        } @else {
        text-shadow: none;
        }
}
/* Active button */
.ui-page-theme-$theme .ui-btn.ui-btn-active,
html .ui-bar-$theme .ui-btn.ui-btn-active,
html .ui-body-$theme .ui-btn.ui-btn-active,
html body .ui-group-theme-$theme .ui-btn.ui-btn-active,
html head + body .ui-btn.ui-btn-$theme.ui-btn-active,
/* Active checkbox icon */
.ui-page-theme-$theme .ui-checkbox-on:after,
html .ui-bar-$theme .ui-checkbox-on:after,
html .ui-body-$theme .ui-checkbox-on:after,
html body .ui-group-theme-$theme .ui-checkbox-on:after,
.ui-btn.ui-checkbox-on.ui-btn-$theme:after,
/* Active flipswitch background */
.ui-page-theme-$theme .ui-flipswitch-active,
html .ui-bar-$theme .ui-flipswitch-active,
html .ui-body-$theme .ui-flipswitch-active,
html body .ui-group-theme-$theme .ui-flipswitch-active,
html body .ui-flipswitch.ui-bar-$theme.ui-flipswitch-active,
/* Active slider track */
.ui-page-theme-$theme .ui-slider-track .ui-btn-active,
html .ui-bar-$theme .ui-slider-track .ui-btn-active,
html .ui-body-$theme .ui-slider-track .ui-btn-active,
html body .ui-group-theme-$theme .ui-slider-track .ui-btn-active,
html body div.ui-slider-track.ui-body-$theme .ui-btn-active {
	background-color: $active-bg;
	border-color: $active-border;
	color: $active-text;
        @if ($active-shadow) {
	text-shadow: 0 1px 0 $active-shadow;
        } @else {
        text-shadow: none;
        }
}
/* Active radio button icon */
.ui-page-theme-$theme .ui-radio-on:after,
html .ui-bar-$theme .ui-radio-on:after,
html .ui-body-$theme .ui-radio-on:after,
html body .ui-group-theme-$theme .ui-radio-on:after,
.ui-btn.ui-radio-on.ui-btn-$theme:after {
	border-color: $active-bg;
}
/* Focus */
.ui-page-theme-$theme .ui-btn:focus,
html .ui-bar-$theme .ui-btn:focus,
html .ui-body-$theme .ui-btn:focus,
html body .ui-group-theme-$theme .ui-btn:focus,
html head + body .ui-btn.ui-btn-$theme:focus,
/* Focus buttons and text inputs with div wrap */
.ui-page-theme-$theme .ui-focus,
html .ui-bar-$theme .ui-focus,
html .ui-body-$theme .ui-focus,
html body .ui-group-theme-$theme .ui-focus,
html head + body .ui-btn-$theme.ui-focus,
html head + body .ui-body-$theme.ui-focus {
        @include box-shadow(0 0 12px $active-bg);
}

}

/* Second global mixin to keep general structure of jquery.mobile.theme */
@mixin jquery-mobile-global2() {

/* Structure */
/* Disabled
-----------------------------------------------------------------------------------------------------------*/
/* Class ui-disabled deprecated in 1.4. :disabled not supported by IE8 so we use [disabled] */
.ui-disabled,
.ui-state-disabled,
button[disabled],
.ui-select .ui-btn.ui-state-disabled {
	filter: unquote("Alpha(Opacity=30)");
	opacity: .3;
	cursor: default !important;
	pointer-events: none;
}
/* Focus state outline
-----------------------------------------------------------------------------------------------------------*/
.ui-btn:focus,
.ui-btn.ui-focus {
	outline: 0;
}
/* Unset box-shadow in browsers that don't do it right */
.ui-noboxshadow .ui-shadow,
.ui-noboxshadow .ui-shadow-inset,
.ui-noboxshadow .ui-overlay-shadow,
.ui-noboxshadow .ui-shadow-icon.ui-btn:after,
.ui-noboxshadow .ui-shadow-icon .ui-btn:after,
.ui-noboxshadow .ui-focus,
.ui-noboxshadow .ui-btn:focus,
.ui-noboxshadow  input:focus,
.ui-noboxshadow .ui-panel {
        @include box-shadow(none !important);
}
.ui-noboxshadow .ui-btn:focus,
.ui-noboxshadow .ui-focus {
	outline-width: 1px;
	outline-style: auto;
}

}
