// Form Styles
// ----------------------------------------

// General form styles
// ----------------------------------------
$input-font-size:		$font-size + 1px !default;
$input-font-family:		$font-family !default;

fieldset {
	border-width: 0;
	font-family: $font-family;
	font-size: $font-size;
}

input {
	font-weight: normal;
	vertical-align: middle;
	padding: 0 3px;
	font-size: $input-font-size;
	font-family: $input-font-family;
}

select {
	font-family: $input-font-family;
	font-weight: normal;
	cursor: pointer;
	vertical-align: middle;
	border: 1px solid transparent;
	border-radius: $input-border-radius;
	padding: 1px;
	font-size: $input-font-size;
}

select:focus {
	outline-style: none;
}

option {
	padding-right: 1em;
}

select optgroup option {
	padding-right: 1em;
	font-family: $input-font-family;
}

textarea {
	font-family: $post-content-font-family;
	width: 60%;
	padding: 2px;
	font-size: $post-content-font-size;
	line-height: $post-content-line-height;
	border-radius: $input-border-radius;
	-webkit-appearance: none;
}

label {
	cursor: default;
	padding-right: 5px;
}

label input {
	vertical-align: middle;
}

label img {
	vertical-align: middle;
}

// Definition list layout for forms
// ----------------------------------------
fieldset dl {
	padding: 4px 0;
}

fieldset dt {
	float: left;
	width: 40%;
	text-align: left;
	display: block;
}

fieldset dd {
	margin-left: 41%;
	vertical-align: top;
	margin-bottom: 3px;
}

// Specific layout 1
fieldset.fields1 dt {
	width: 15em;
	border-right-width: 0;
}

fieldset.fields1 dd {
	margin-left: 15em;
	border-left-width: 0;
}

fieldset.fields1 div {
	margin-bottom: 3px;
}

// Set it back to 0px for the reCaptcha divs: PHPBB3-9587
fieldset.fields1 .live-search div {
	margin-bottom: 0;
}

// Specific layout 2
fieldset.fields2 dt {
	width: 15em;
	border-right-width: 0;
}

fieldset.fields2 dd {
	margin-left: 16em;
	border-left-width: 0;
}

// Form elements
dt label {
	font-weight: bold;
	text-align: left;
}

dd label {
	white-space: nowrap;
}

dd input, dd textarea {
	margin-right: 3px;
}

dd select {
	width: auto;
}

dd select[multiple] {
	width: 100%;
}

dd textarea {
	width: 85%;
}

// Hover effects
.timezone {
	width: 95%;
}

/* Browser-specific tweaks */
button::-moz-focus-inner {
	padding: 0;
	border: 0;
}


// Quick-login on index page
fieldset.quick-login {
	margin-top: 5px;
}

fieldset.quick-login input {
	width: auto;
}

fieldset.quick-login input.inputbox {
	width: 15%;
	vertical-align: middle;
	margin-right: 5px;
}

fieldset.quick-login label {
	white-space: nowrap;
	padding-right: 2px;
}

// Display options on viewtopic/viewforum pages
fieldset.display-options {
	text-align: center;
	margin: 3px 0 5px 0;
}

fieldset.display-options label {
	white-space: nowrap;
	padding-right: 2px;
}

fieldset.display-options a {
	margin-top: 3px;
}

.dropdown fieldset.display-options {
	font-size: 1em;
	margin: 0;
	padding: 0;
}

.dropdown fieldset.display-options label {
	display: block;
	margin: 4px;
	padding: 0;
	text-align: right;
	white-space: nowrap;
}

.dropdown fieldset.display-options select {
	min-width: 120px;
}

// Display actions for ucp and mcp pages
fieldset.display-actions {
	text-align: right;
	line-height: 2em;
	white-space: nowrap;
	padding-right: 1em;
}

fieldset.display-actions label {
	white-space: nowrap;
	padding-right: 2px;
}

fieldset.sort-options {
	line-height: 2em;
}

// MCP forum selection
fieldset.forum-selection {
	margin: 5px 0 3px 0;
	float: right;
}

fieldset.forum-selection2 {
	margin: 13px 0 3px 0;
	float: right;
}

// Submit button fieldset
fieldset.submit-buttons {
	text-align: center;
	vertical-align: middle;
	margin: 5px 0;
}

fieldset.submit-buttons input {
	vertical-align: middle;
}

// Posting page styles
// ----------------------------------------

// Buttons used in the editor
.format-buttons {
	margin: 15px 0 2px 0;
}

.format-buttons input, .format-buttons select {
	vertical-align: middle;
}

// Main message box
.message-box {
	width: 80%;
}

.message-box textarea {
	font-family: $post-content-font-family;
	width: 450px;
	height: 270px;
	min-width: 100%;
	max-width: 100%;
	font-size: $post-content-font-size;
	line-height: $post-content-line-height;
	resize: vertical;
	outline: 3px dashed transparent;
	outline-offset: -4px;
	-webkit-transition: all .5s ease, height 1ms linear;
	-moz-transition: all .5s ease, height 1ms linear;
	-ms-transition: all .5s ease, height 1ms linear;
	-o-transition: all .5s ease, height 1ms linear;
	transition: all .5s ease, height 1ms linear;
}

// Emoticons panel
.smiley-box {
	width: 18%;
	float: right;
}

.smiley-box img {
	margin: 3px;
}

// Input field styles
// ----------------------------------------
.inputbox {
	border: 1px solid transparent;
	padding: 2px;
	border-radius: $input-border-radius;
	-webkit-appearance: none;
}

.inputbox:hover, .inputbox:focus {
	border: 1px solid transparent;
	outline-style: none;
}

input.inputbox	{ width: 85%; }
input.medium	{ width: 50%; }
input.narrow	{ width: 25%; }
input.tiny	{ width: 150px; }

textarea.inputbox {
	width: 85%;
}

.autowidth {
	width: auto !important;
}

input[type="number"] {
	-moz-padding-end: 0;
}

input[type="search"] {
	-webkit-appearance: none;
	-webkit-box-sizing: content-box;
}

input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration {
	display: none;
}

input[type="search"]::-webkit-search-cancel-button {
	cursor: pointer;
}

// Form button styles
// ----------------------------------------
input.button1, input.button2 {
	font-size: $input-button-font-size;
}

a.button1, input.button1, input.button3, a.button2, input.button2 {
	width: auto !important;
	padding-top: 1px;
	padding-bottom: 1px;
	font-family: $input-button-font-family;
	background: transparent none repeat-x top left;
	line-height: 1.5;
	border-radius: $button-border-radius;
	font-size: $input-button-font-size;
	.format-buttons & {
		font-size: $bbcode-button-font-size;
	}
}

a.button1, input.button1 {
	font-weight: bold;
	border: 1px solid transparent;
}

input.button3 {
	padding: 0;
	margin: 0;
	line-height: 5px;
	height: 12px;
	background-image: none;
	font-variant: small-caps;
}

input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"], .search-results li {
	cursor: pointer;
}

// Alternative button
a.button2, input.button2, input.button3 {
	border: 1px solid transparent;
}

// <a> button in the style of the form buttons
a.button1, a.button2 {
	text-decoration: none;
	padding: 0 3px;
	vertical-align: text-bottom;
}

// Hover states
a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
	border: 1px solid transparent;
}

input.disabled {
	font-weight: normal;
}

// Focus states
input.button1:focus, input.button2:focus, input.button3:focus {
	outline-style: none;
}

// Topic and forum Search
.search-box {
	float: left;
}

.search-box .inputbox {
	background-image: none;
	border-right-width: 0;
	border-radius: $big-button-border-radius 0 0 $big-button-border-radius;
	float: left;
	height: $button-outer-height;
	padding: 3px;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	.rtl & {
		border-radius: 0 $big-button-border-radius $big-button-border-radius 0;
	}
}

// Search box (header)
// ---------------------------------------------
.search-header {
	border-radius: $big-button-border-radius;
	border: 1px solid transparent;
	@if $tabbed-navigation {
		.navbar.not-static + .navbar.with-search & {
			margin-top: 1px;
			margin-right: -5px;
			.rtl & {
				margin-right: 0;
				margin-left: -5px;
			}
		}
	}
	.headerbar & {
		display: block;
		position: absolute;
		top: 50%;
		right: 5px;
		margin-top: -13px;
	}
}

.search-header .inputbox { border: 0; }

.navbar .linklist > li.responsive-search { display: none; }

.full { width: 95%; }
.medium { width: 50%;}
.narrow { width: 25%;}
.tiny { width: 10%;}
