/* iPhone Tests */
@media (max-width: 320px) {
	#pm_menu {
		margin: 0 0 0 -60px;
	}
	#alerts_menu {
		margin: 0 0 0 -150px;
	}
	#notify_dropdown {
		margin: 5px 0 0 2px;
	}
}

/* I have a Lumia with 480px screen... so ^^ */
@media (max-width: 480px) {
	/* This is general */
	.popup_window {
		width: 90%;
		min-height: 285px !important;
		max-height: 5em;
		overflow-x: hidden !important;
		overflow-y: scroll !important;
		-webkit-overflow-scrolling: touch;
		padding: 0;
		margin: 0 auto;
	}
	.button_submit {
		min-width: 15%;
		margin: 0 0 0 2px;
	}
	h1.forumtitle a, h1.forumtitle {
		padding: 5px 0 0 4px !important;
		max-width: 300px;
		margin: 10px 0;
	}
	span.board_moderators {
		display: none !important;
	}
	#alerts_menu {
		margin: 0 0 0 -175px;
	}
	#pm_menu {
		margin: 0 0 0 -85px;
	}
	#main_menu, .generic_menu {
		display: none;
	}
	#mobile_user_menu .dropmenu,
	div[id^="mobile_generic_menu_"] .generic_menu {
		display: block;
	}
	.menu_icon {
		display: inline-block;
		background: url(../images/menu_icon.svg) no-repeat;
		height: 20px;
		width: 20px;
	}
	.dropmenu li, .dropmenu li:hover,
	.dropmenu li a, .dropmenu li a:hover,
	.dropmenu li a.active, .dropmenu li a.active:hover,
	.dropmenu li ul {
		width: 100%;
		padding: 0;
		margin: 0;
		border-left: 0;
		border-right: 0;
	}
	.dropmenu li a, .dropmenu li:hover a {
		padding: 5px 0;
	}
	.dropmenu li a, .dropmenu li a:hover {
		text-indent: 10px;
		border-radius: 0;
	}
	.dropmenu li a, .dropmenu li:hover a,
	.dropmenu li a.active, .dropmenu li a.active:hover,
	.dropmenu ul li a:hover, .dropmenu li li a:hover,
	.dropmenu ul li li:hover, .dropmenu li ul,
	.dropmenu li li:hover ul, .dropmenu li li ul {
		border-left: 0;
		border-right: 0;
	}
	.dropmenu ul li a {
		width: auto !important;
	}
	.dropmenu li ul,
	.dropmenu li li:hover ul, .dropmenu li li ul {
		position: relative;
		border-radius: 0;
		left: 0;
	}
	#footer ul {
		width: 100%;
		float: none;
	}
	/* MessageIndex */
	#main_content_section .pagelinks {
		display: block;
	}
	#main_content_section .pagesection {
		margin: 5px 0;
		padding: 0;
	}
	#topic_icons p {
		display: block;
		width: 100%;
	}
	/* some new stuff for far better UX */
	.mobile_subject {
		display: block;
		padding: 9px 0;
		position: relative;
	}
	.mobile_subject .board_description {
		display: block;
		font-weight: normal;
		font-size: 0.9em;
		color: #222;
	}
	.board_description {
		display: none;
	}
	/* Register Page */
	#registration .button_submit {
		font-size: 0.67em;
	}
	dl.register_form {
		float: none !important;
		max-width: 350px !important;
	}
	dl.register_form dt, dl.register_form dd {
		float: none !important;
		min-width: 250px !important;
	}

	/* Display (Topic View) */
	.poster {
		float: none !important;
	}
	.postarea {
		margin: 0 !important;
	}
	.moderatorbar {
		margin: 0 !important;
	}
	img.bbc_img.resized {
		max-width: 250px;
		max-height: 300px;
	}
	img.icon, #forumposts .catbg img {
		display: none;
	}
	.keyinfo h5 .modified {
		float: none !important;
	}
	.subject_title input {
		width: 90%;
	}

	/* Post Section */
	#post_header dd {
		width: 55% !important;
	}
	#post_header dt {
		width: 35% !important;
	}
	img#icons {
		margin: 0 0 0 5px;
	}
	#quickReplyOptions #postmodify {
		width: 100%;
	}
	/* Poll */
	#poll_options dl.options {
		padding: 0;
	}
	#poll_options dl.options dt,
	#poll_options dl.options dd,
	dl.settings dt, dl.settings dd	{
		width: 100%;
		float: none;
	}
	.move_topic {
		width: 100%;
	}
	.bbc_float {
		max-width: 100% !important;
		margin-left: 0.5em !important;
		margin-right: 0.5em !important;
	}
	/* Stats Center */
	.half_content {
		width: 100%;
		margin: 0;
		padding: 0;
	}
	#ic_recentposts {
		margin: 0 !important;
		width: 100% !important;
	}
	#upshrinkHeaderIC p.inline, #upshrinkHeaderIC p.last {
		padding: 5px !important;
	}
	th.recentboard, th.recenttime,
	td.recentboard, td.recenttime {
		display: none;
	}

	/* Search */
	#searchform .roundframe {
		padding: 5px;
	}
	#advanced_search dt {
		text-align: left;
		float: left;
	}
	#advanced_search dl#search_options {
		width: 100%;
	}
	INPUT#searchfor.input_text, INPUT#userspec.input_text {
		width: 75%;
	}
	/* Memberlist */
	th.website_url,
	td.website_url, td.reg_group, td.reg_date, td.post_num, td.statsbar {
		display: none;
	}
	#mlist .posts {
		width: 50px;
	}
	#mlist_search dt {
		width: 100%;
		display: block;
		padding: 0;
	}
	#mlist_search dd {
		padding: 0;
		margin: 0;
	}
	#mlist_search .input_check{
		margin: 0 13px 3px 3px;
		vertical-align: middle;
	}
	/* Moderation */
	.post_note input {
		width: 75% !important;
	}
	.modbox .floatleft {
		float: none;
	}
	/* Admin */
	#live_news, #supportVersionsTable {
		width: 100% !important;
		padding: 0 !important;
		margin: 0 0 5px 0;
	}
	.admin_search {
		float: none;
		display: block;
		width: 100%;
		margin-bottom: 10px;
	}
	.admin_group a {
		width: 50% !important;
		float: left;
		margin: 0 0 5px 0;
	}
	.action_admin .navigate_section {
		display: none;
	}
	#admincenter .input_text, #quick_search .input_text,
	#admincenter select, #quick_search select {
		width: 90%;
	}

	/* Calendar */
	.event_options_left, .event_options_right {
		width: 100%;
	}
	#event_title, #event_board {
		width: 100%;
	}
	#evtitle {
		width: 98%;
	}

	/* Menu tests */
	#adm_submenus {
		padding: 0;
	}
	#adm_submenus .dropmenu li {
		float: left;
		margin: 0;
	}
	#header_member_list_user_name, #header_member_list_ip,
	#header_member_list_last_active, #header_member_list_posts,
	.hidden {
		display: none;
	}
	.msearch_details {
		width: 100% !important;
		float: none;
	}
	.msearch_details .righttext {
		text-align: left;
	}
	.msearch_details input {
		width: 90%;
	}
	.msearch_details .input_check {
		width: 5%;
	}
	/* 3rd level menu tests */
	.dropmenu li ul ul {
		margin: 0 !important;
	}
}

@media (min-width: 481px) and (max-width: 720px) {
	/* Display (Topic View) */
	.poster {
		float: none !important;
	}
	.postarea {
		margin: 0 !important;
	}
	.moderatorbar {
		margin: 0 !important;
	}
	img.bbc_img.resized {
		max-width: 250px;
		max-height: 300px;
	}
	img.icon, #forumposts .catbg img {
		display:none;
	}
	.keyinfo h5 .modified {
		float: none !important;
	}

	/* Stats Center */
	#ic_recentposts {
		margin: 0 !important;
		width: 100% !important;
	}
	#upshrinkHeaderIC p.inline, #upshrinkHeaderIC p.last {
		padding: 5px !important;
	}

	/* Search */
	#advanced_search dt {
		text-align: left;
		width: 100%;
		float: left;
	}
	#advanced_search dd {
		width: 100%;
	}
	#advanced_search dl#search_options {
		width: 100%;
	}
	INPUT#searchfor.input_text, INPUT#userspec.input_text {
		width: 75%;
	}
}
/* We have shared things... */
@media screen and (max-width: 720px) {
	/* New Mobile Action/Mod Pop (Test) */
	.moderationbuttons_check {
		display: none;
	}
	.moderationbuttons_mobile_check {
		display: inline-block;
	}
	#mobile_action .button, #mobile_moderation .button, #mobile_action .top_menu {
		width: 100% !important;
		padding: 5px 0;
		margin: 0;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		text-indent: 5px;
	}
	#mobile_action .notify_dropdown {
		top: 0 !important;
		left: 0 !important;
		position: relative;
	}
	#mobile_action .top_menu {
		width: 95%;
		padding: 0;
		margin: 0 auto;
	}
	#mobile_action .notify_dropdown a {
		border-bottom: 1px solid #999;
	}
	#mobile_action .notify_dropdown a:last-of-type {
		border-bottom: none;
	}
	#mobile_action .notify_dropdown span {
		display: none;
	}
	.mobile_buttons {
		margin: 5px 0;
	}
	.mobile_buttons .button {
		margin: 0;
	}
	.pagesection .buttonlist, #moderationbuttons {
		display: none;
	}
	.mobile_buttons {
		display: block;
	}

	/* Stuff */
	.infolinks {
		display: inline-block;
		margin: 5px 7px 0 0;
	}
	#registration .field_icons {
		float: left;
		margin: 5px 0 0 3px;
	}
	dl.register_form dt span {
		display: inline;
	}
	.button_submit.qaction {
		width: 10%;
		margin: 0;
	}
	.qaction {
		width: 40%;
		margin: 0 5px 0 0;
	}

	/* Menu */
	.quickbuttons li:hover ul {
		display: none;
	}

	/* General */
	.action_home {
		width: 100% !important;
	}
	#wrapper {
		width: 100% !important;
		border-left: 0;
		border-right: 0;
		border-radius: 0;
	}
	#top_section, #footer {
		padding-left: 0;
		padding-right: 0;
	}
	#header {
		margin-left: 0;
		margin-right: 0;
	}
	#upper_section, #inner_section, #content_section {
		border-radius: 0;
	}
	#boardindex_table .stats {
		display: none;
	}
	.login {
		width: 100%;
	}
	.top_menu {
		width: 23em !important;
	}
	.unread_links {
		width: 95%;
		float: left !important;
	}
	.unread_links a {
		padding: 5px 0 5px 0 !important;
		margin-right: 3px;
	}

	/* BoardIndex */
	.board_stats {
		display: none;
	}
	div.lastpost {
		width: 100%;
		padding: 0;
		display: block;
		min-height: 2em !important;
	}
	.lpr_border {
		border-top: 1px solid #DDD;
	}
	div.lastpost p {
		margin: 5px;
	}
	span.postby {
		display: inline-block;
	}

	/* MessageIndex */
	#messageindex .board_icon, #messageindex .lastpost {
		display: none;
	}
	#messageindex .info {
		padding: 0 5px 0 5px;
	}
	.info_block {
		display: block;
		width: 95%;
	}
	.moderation a {
		padding: 3px;
	}

	/* Display (Topics) */
	.user_info li {
		display: inline-block;
	}
	.user_info li.avatar, .user_info li.poster_ip {
		display: none;
	}
	#moderationbuttons_strip a {
		float: left;
		width: 40%;
		max-width: 90px;
		margin: 0 5px 7px 0 !important; /* Extra margin for fat fingers like Kindred */
	}
	.button.button_strip_mark_unread {
		display: none;
	}
	.button.mobile {
		margin: 0 0 5px 0;
	}

	/* Profile */
	#admin_content .content {
		padding: 0;
	}
	#creator dt {
		width: 33%;
	}
	#creator dd {
		width: 65%;
	}
	#basicinfo, #detailedinfo {
		width: 100%;
		box-sizing: border-box;
	}
	#basicinfo {
		margin: 0 0 5px 0; /* For UX */
	}
	/* Post Screen */
	form#postmodify .roundframe, #post_event .roundframe {
		padding: 5px !important;
	}
	#post_header input {
		width: 100%;
	}
	#post_confirm_buttons .smalltext {
		display: none;
	}
	.sceditor-container {
		width: 100% !important;
	}
	ul.post_options {
		padding: 0;
		margin: 0;
	}
	ul.post_options li {
		margin: 2px 5px 0 0;
		width: 48%;
	}
	/* Hide me */
	#inner_wrap, #search_form, #smflogo, #message_index_jump_to, .nextlinks, #display_jump_to,
	#siteslogan, th.id_group, th.registered, td.reg_group, td.reg_date,
	td.lefttext.id_group, td.lefttext.registered, td.posts, td.statsbar.posts,
	#main_content_section .navigate_section, a.topbottom, .pagesection.top, .time, .hidden,
	#header_custom_profile_fields_field_type, #header_custom_profile_fields_active,
	#header_custom_profile_fields_placement {
		display: none !important;
	}

	/* Admin */
	.table_grid.half_content {
		width: 100%;
		margin: 0;
		padding: 0;
	}
	#private, #enclose {
		width: 95%;
	}
}

@media (min-width: 480px) and (max-width: 560px) {
	/* Calendar */
	#event_time_options {
		width: 40%;
	}
	#event_title, #event_board {
		width: 100%;
	}
	#evtitle {
		width: 98%;
	}
}

@media (min-width: 720px) and (max-width: 799px) {
	/* Calendar */
	#event_time_options {
		width: 44%;
	}
	#event_title, #event_board {
		width: 100%;
	}
	#evtitle {
		width: 98%;
	}
}

/* Still not enough data or people to test this... */
/* This needs more data and this range is probably for iPad Air (alike) tablets... */
@media (min-width: 721px) and (max-width: 855px) {
	div.lastpost {
		margin: 0 0 0 20px !important;
	}
	.board_stats {
		display: none;
	}
}

/* Some very big stuff? Dunno... */
@media (min-width: 856px) and (max-width: 1024px) {
	div.lastpost {
		width: 20% !important;
		margin: 3px 0 0 5px;
	}
}