/* we keep this in a separate file instead of making changes to a copy of jQuery Mobile directly
because it makes it easier to update to newer versions of JQM */


.custom-split-icon .ui-btn .ui-btn-inner .ui-icon {
	width: 24px;
	height: 24px;
	margin-top: -12px;
	margin-right: -12px;
	border: 0;
}
.custom-data-icon .ui-btn .ui-btn-inner .ui-icon {
	width: 24px;
	height: 24px;
	margin-top: -12px;
	border: 0;
}
/* page header should allow more space for heading */
.ui-header .ui-title, .ui-footer .ui-title {
	margin: 0 15%;
}
/* bring listview cells' header and subheader closer together by redistributing the margins */
.ui-listview>li h1, .ui-listview>li h2, .ui-listview>li h3, .ui-listview>li h4, .ui-listview>li h5, .ui-listview>li h6 {
	margin: .6em 0 .3em 0;
}
.ui-listview>li p {
	margin: .4em 0 .8em 0;
}
/* no border on list button */
.ui-listview>li.ui-li-has-alt>.ui-btn+.ui-btn {
	border-left-width: 0;
}
/* anti-aliasing on header, dialog buttons */
.ui-header, .ui-page.ui-dialog .ui-btn {
	-webkit-font-smoothing: antialiased;
	font-smooth: always;
}
/* header with subheading should be about the same height as normal header */
.ui-header.hasSubheading .ui-title {
	padding: 0.3em 0;
}
/* no left/right border on first/last button in a navbar */ 
.ui-navbar ul li:first-child a {
	border-left: 0;
}
.ui-navbar ul li:last-child a {
	border-right: 0;
}
/* apply the same padding to selects as to input fields */
.ui-select .ui-btn {
	padding-top: 0.4em;
	padding-bottom: 0.4em;
	padding-left: 0.4em;
	border-radius: 0.8em;
	line-height: 1.4em;
}
/* adjust position of magnifying glass icon and search string in search field*/
.ui-input-search input {
	padding-left: 1em;
}
.ui-input-search:after {
	left: 0.5em;
}
/* adjust margin around filterable input */
html .ui-filterable+.ui-listview {
	margin-top: -1em;
}
html .ui-filterable {
	margin-top: -1em;
}
/* vertically center buttons in the bottom of a dialog box */
.ui-page.ui-dialog .ui-content .buttons a.ui-btn:first-child{
	margin-top: 1em;
}
.ui-page.ui-dialog .ui-content .buttons a.ui-btn:last-child{
	margin-bottom: 0;
}
/* button icons are 24px, not 22px */
/* except for jqm-own icons that we use, like the input clear icon */
.ui-btn-icon-notext:not(.ui-input-clear):after, .ui-btn-icon-left:after, .ui-btn-icon-right:after {
	margin-top: -12px;
}
/* exept for this one icon, which is 18px */
.ui-icon-common-icn_drop-down:after {
	margin-top: -9px;
}
/* no border radius for footer icons */
.ui-footer .ui-navbar .ui-btn-icon-top:after {
	border-radius: 0px;
}
/* background for switched-off checkboxes and radio buttons */
.ui-checkbox-off:after, .ui-btn.ui-radio-off:after {
	background-color: rgba(0,0,0,0.3) /*{global-icon-disc}*/;
	background-position: center center;
	background-repeat: no-repeat;
	-webkit-border-radius: 1em;
	border-radius: 1em;
	filter: Alpha(Opacity=30);
	opacity: .3;
}
/* background for search clear icon */
.ui-input-search.ui-input-has-clear .ui-btn.ui-input-clear, .ui-input-text.ui-input-has-clear .ui-btn.ui-input-clear {
	background-color: rgba(0,0,0,0.3);
}
/* solo grid affects text fields */
.ui-grid-solo .ui-input-text {
	margin-right: 5px;
	margin-left: 5px;
}
/* no border between header and first list element */
/* border-top-width:0 breaks select language screen for some reason */
.ui-listview:first-child li:first-child {
	border-top-color: #00ACED;
}
/* bigger thumbnails in listview widget */
.ui-listview .ui-li-has-thumb .ui-li-thumb, .ui-listview .ui-li-icon {
    max-height: 100%;
    max-width: 120px;
}
/* no shadow, even when focused */
.ui-input-text, .ui-select, .ui-btn {
	box-shadow: none !important;
}
/* controlgroup for text input fields */
/* add data-wrapper-class="controlgroup-textinput ui-btn" to text field for this to work */
/* additing .ui-btn to textareas disables typing on touch devices. reenable typing */
.controlgroup-textinput {
    padding-top: .22em;
    padding-bottom: .22em;
    text-align: start;
    -webkit-user-select: auto;
	-moz-user-select: auto;
	-ms-user-select: auto;
	user-select: auto;
}


/* By page */

/* fieldsets are not inset */
#editEntry fieldset.ui-controlgroup {
	margin: 0 -15px;
}

/* give some margin to search field */
.containsSearch .searchForm {
	margin-bottom: 1.5em;
}

/* search input in horizontal control group on main page should take up all available width */
/* this works if this element is the last child and all its siblings are floated */
.containsSearch .ui-controlgroup-controls {
	display: block;
}
.containsSearch .ui-controlgroup-controls .ui-input-search {
	float: none;
	display: block;
	overflow: auto;
}


/* correct height for text input fields in controlgroup */
/* Chrome trunkates font-size * line-height to an integer value, Firefox rounds it to the nearest integer so that radio buttons and text input don't align with default jqm css settings */
/* we set line-height and padding here in such a way that we don't have sub-pixel values */
/* add data-wrapper-class="controlgroup-textinput ui-btn" to text field for this to work */
.containsSearch .controlgroup-textinput {
    padding-top: 0px;
    padding-bottom: 0px;
}
.containsSearch .controlgroup-textinput.ui-input-search input, .containsSearch .ui-radio > label {
    padding-top: 11px;
    padding-bottom: 11px;
    line-height: 21px; /* 16px * 1.3 = 20.8 */
    min-height: 21px;
}


/* let's hope this is fixed in jqm at some point */
/* div wrapper of an input field in a horizontal controlgroup doesn't get set as ui-last-child, which is why we add these manually */
.containsSearch .ui-controlgroup-horizontal .ui-controlgroup-controls .ui-btn.ui-input-search {
	border-right-width: 1px;
	-webkit-border-top-right-radius: inherit;
	border-top-right-radius: inherit;
	-webkit-border-bottom-right-radius: inherit;
	border-bottom-right-radius: inherit;
}


/* fix input clear icon in a horizontal controlgroup */
.containsSearch .ui-controlgroup-horizontal .ui-controlgroup-controls .ui-btn.ui-input-search .ui-input-clear {
	padding: 0;
	width: 28px;
	height: 28px;
	border-radius: 16px;
}

/* make list cells shorter (atm same height as menu cells), unless they are New List cells */
li.list:not(.newItemCell) a.ui-btn {
	padding-top: 0;
	padding-bottom: 0;
}

