/* Some very big stuff? Dunno... */
@media (max-width: 1024px) {
	#alerts .alert_time {
		display: none;
	}
	#alerts .alert_inline_time {
		display: block;
	}
	#recent_posts_content ul {
		grid-template-columns: 1fr;
	}
}

/* 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: 991px) {
	.board_stats {
		display: none;
	}
	#alerts .alert_time {
		display: none;
	}
	#alerts .alert_inline_time {
		display: block;
	}
}

@media (max-width: 855px) {
	#profile_menu_top .textmenu,
	#pm_menu_top .textmenu,
	#alerts_menu_top .textmenu,
	.button_login .textmenu,
	.button_signup .textmenu {
		display: none;
	}
	#pm_menu_top .main_icons,
	#alerts_menu_top .main_icons {
		display: inline-block;
	}
	#member_list .ip, #member_list .last_active, #member_list .user_name {
		display: none !important;
	}
}

@media (min-width: 720px) and (max-width: 799px) {
	#top_info .welcome {
		display: none;
	}
	/* Calendar */
	#event_time_options {
		width: 44%;
	}
	#event_title {
		padding: 0;
	}
	#evtitle {
		width: 98%;
	}
	.event_options_left, .event_options_right {
		display: block;
		max-width: unset;
		width: unset;
	}
	#event_title input[type="text"] {
		width: 100%;
	}
	#post_event #event_board select {
		width: calc(100% - 90px);
		max-width: unset;
	}
}

/* We have shared things... */
@media screen and (max-width: 991px) {
	/* Remove some content from the hooks table */
	#list_integration_hooks th#header_list_integration_hooks_function_name, #list_integration_hooks td.function_name,
	#list_integration_hooks th#header_list_integration_hooks_remove, #list_integration_hooks td.remove {
		display: none;
	}
	.pagesection {
		flex-wrap: wrap;
		gap: 5px;
	}
	/* New Mobile Action/Mod Pop (Test) */
	.moderationbuttons_check {
		display: none;
	}
	.moderationbuttons_mobile_check {
		display: inline-block;
	}
	.buttonlist > .top_menu.dropmenu {
		max-width: 100%;
	}
	#mobile_action .button, #mobile_moderation .button, #mobile_action .top_menu {
		width: 100%;
		margin: 0;
	}
	#mobile_action .button, #mobile_moderation .button {
		line-height: 2.8em;
		height: auto;
	}
	#mobile_action .notify_dropdown {
		top: 0 !important;
		left: 0 !important;
		position: relative;
	}
	.buttonlist > .top_menu.dropmenu.notify_dropdown a {
		min-height: 30px;
	}
	#mobile_action .top_menu {
		margin: -2px 5px 0;
		padding: 5px;
	}
	#mobile_action .notify_dropdown a {
		border-bottom: 1px solid #999;
	}
	#mobile_action .notify_dropdown a:last-of-type {
		border-bottom: none;
	}
	.pagesection > div.mobile_buttons {
		display: block;
		text-align: right;
	}
	.mobile_buttons a.button {
		margin: 0;
		display: inline-block;
	}
	.pagesection .buttonlist, #moderationbuttons {
		display: none;
	}

	/* 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;
	}
	#quick_actions {
		display: flex;
		justify-content: flex-end;
	}
	#quick_actions > * {
		flex: 0 1 auto;
		margin: 0 5px 0 0;
		max-width: 40%;
		white-space: nowrap;
	}
	#quick_actions > .button.qaction {
		flex: 0 0 auto;
		margin: 0 !important;
	}

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

	/* General */
	.action_home {
		width: 100% !important;
	}
	#wrapper {
		border-left: 0;
		border-right: 0;
		border-radius: 0;
	}
	#footer {
		padding: 10px;
	}
	#top_section .inner_wrap, #wrapper, #header, #footer .inner_wrap {
		width: 100%;
	}
	#upper_section, #inner_section, #content_section {
		border-radius: 0;
	}
	#boardindex_table .stats {
		display: none;
	}
	.login {
		width: 100%;
	}
	#inner_wrap {
		flex-flow: row wrap;
	}
	#inner_wrap .user,
	#inner_wrap .news {
		width: auto;
		max-width: initial;
	}
	#languages_form {
		padding-right: 10px;
	}

	/* BoardIndex */
	.board_stats {
		display: none;
	}
	.boardindex_table .info {
		flex-grow: 1;
	}
	.lastpost {
		width: 100%;
		padding: 0;
		display: block;
		min-height: 2em;
	}
	.boardindex_table .lastpost {
		display: flex;
		width: calc(100% - 32px);
		font-size: 0.8em;
		line-height: 1.3em;
		padding: 2px 10px;
		border-width: 1px 0 0;
		border-style: solid;
	}
	.boardindex_table .lastpost p span {
		display: inline;
	}
	.boardindex_table .lastpost a.avatar,
	.boardindex_table .lastpost img.avatar_dot {
		width: 32px;
		height: 32px;
	}
	span.postby {
		display: inline-block;
	}
	/* Stats Center */
	#ic_recentposts {
		margin: 0;
		width: 100%;
	}
	#upshrink_stats p.inline, #upshrink_stats p.last {
		padding: 5px;
	}

	/* MessageIndex */
	#messageindex .board_icon, #messageindex .lastpost {
		display: none;
	}
	#messageindex .info {
		padding: 8px 10px;
	}
	.info_block {
		display: block;
		width: 95%;
	}
	.moderation a {
		padding: 3px;
	}
	#topic_container .moderation .main_icons {
		display: none;
	}
	/* Unread */
	#unread .board_icon, #unread .lastpost, #unreadreplies .board_icon, #unreadreplies .lastpost {
		display: none;
	}
	#unread .info, #unreadreplies .info {
		padding-left: 5px;
	}

	/* Display (Topics) */
	.custom_fields_above_member,
	.poster .user_info li.custom,
	.poster .user_info li.postcount,
	.poster .user_info li.profile,
	.poster .user_info li.bottom_poster,
	.poster .user_info li.blurb,
	.poster .user_info li.poster_ip,
	.poster .user_info li.icons,
	.poster .user_info li.postgroup {
		display: none;
	}
	.post_wrapper {
		grid-template-columns: 1fr;
	}
	.post_wrapper .poster,
	.poster {
		float: none;
		width: auto;
		min-height: 75px;
		position: relative;
		grid-row-end: 1;
		text-align: left;
		padding: 5px 5px 5px 89px;
	}
	.poster ul.user_info li.avatar {
		position: absolute;
		left: 10px;
		top: 3px;
	}
	.poster ul.user_info li.avatar img.avatar {
		width: 64px;
		height: 64px;
		border-radius: 50%;
		margin: 0 5px 0 0;
	}
	.postarea {
		margin: 0;
	}
	.moderatorbar {
		margin: 0;
	}
	.keyinfo .postinfo {
		font-weight: normal;
	}
	.keyinfo .postinfo .smalltext,
	.keyinfo .page_number {
		opacity: 0.6;
	}
	.keyinfo .postinfo a.smalltext:hover {
		opacity: 1;
	}
	img.icon, #forumposts .catbg img {
		display: none;
	}
	.poster h4 {
		display: block;
	}
	.user_info {
		width: auto;
	}
	.button.mobile {
		margin: 0 0 5px 0;
	}
	.pagelinks {
		margin: 0;
	}

	/* Profile */
	#admin_content .content {
		padding: 0;
	}
	#creator dt {
		width: 33%;
	}
	#creator dd {
		width: 65%;
	}
	#profileview {
		grid-template-columns: 1fr;
	}
	#basicinfo, #detailedinfo {
		width: 100%;
	}
	#basicinfo {
		margin: 0 0 5px 0; /* For UX */
	}
	/* Buddies & Ignore List */
	#edit_buddies .buddy_custom_fields {
		display: none;
	}
	/* PersonalMessages */
	#personal_messages .pm_time, #personal_messages .pm_from_to {
		display: none;
	}
	#personal_messages .pm_inline_time {
		display: block;
	}
	/* Alerts Page */
	#alerts .alert_text, #alerts .alert_time, #alerts .alert_buttons {
		display: block;
	}
	#alerts .alert_time {
		float: left;
	}
	#alerts .alert_text {
		margin: 11px 0 0;
	}
	#alerts .alert_buttons .quickbuttons {
		margin: 0 0 11px;
		display: block;
	}
	#alerts .alert_image {
		width: 60px;
	}
	/* Post Screen */
	form#postmodify .roundframe, #post_event .roundframe {
		padding: 5px;
	}
	#post_header input {
		width: 100%;
	}
	#post_confirm_buttons .smalltext {
		display: none;
	}
	ul.post_options {
		padding: 0;
		margin: 0;
	}
	ul.post_options li {
		margin: 2px 5px 0 0;
		width: 48%;
	}
	/* Search */
	#searchform .roundframe {
		padding: 5px;
	}
	#advanced_search dt {
		text-align: left;
		width: 100%;
		float: left;
	}
	#advanced_search dd {
		width: auto;
	}
	#advanced_search dl#search_options {
		width: 100%;
	}
	input#searchfor, input#userspec {
		width: 75%;
	}
	/* Hide me */
	#inner_wrap.hide_720, #inner_wrap time, #inner_wrap .news,
	#search_form, #smflogo, #message_index_jump_to, .nextlinks, #display_jump_to,
	#siteslogan, th.id_group, th.registered, th.posts, th.reg_group, th.reg_date, td.reg_group, td.reg_date,
	td.id_group, td.registered, td.posts:not(.unique), td.statsbar.posts,
	#member_list .ip, #member_list .last_active, #member_list .user_name,
	#approve_list .ip, #approve_list .date_registered, #group_members .date_registered,
	#main_content_section .navigate_section, .time,
	#header_custom_profile_fields_field_type, #header_custom_profile_fields_active,
	#header_custom_profile_fields_placement, #custom_profile_fields .active, #custom_profile_fields .field_type, #custom_profile_fields .placement {
		display: none !important;
	}
	/* Generic Lists */
	#topic_notification_list .last_post, #topic_notification_list .started_by,
	#request_list .time_applied, #file_list .date, #ban_list .notes, #ban_list .reason, #ban_log .email,
	#mail_queue .priority, #attachments .posted {
		display: none;
	}

	/* Admin */
	.admin_search {
		float: none;
		width: 100%;
		margin-bottom: 10px;
	}
	.table_grid.half_content {
		width: 100%;
		margin: 0;
		padding: 0;
	}
	#private, #enclose {
		width: 95%;
	}
	/* Edit Language */
	#language_list .character_set {
		display: none;
	}
	/* Generic Classes for Customizations */
	.hide_720 {
		display: none;
	}
	.block_720 {
		display: block;
	}
	.inlineblock_720 {
		display: inline-block;
	}
	#info_center_blocks #block-forum_stats {
		flex-direction: row;
	}
	#info_center_blocks #block-forum_stats div:not(.sub_bar) {
		flex-basis: 100%;
	}
	#info_center_blocks #block-forum_stats > span {
		text-align: center;
	}
}

@media (min-width: 768px) 
{
	#mobile_user_menu.popup_container {
		display: block !important;
	}
	div[id^="mobile_generic_menu_"].popup_container {
		display: block !important;
	}

	#main_menu .popup_window,
	#genericmenu .popup_window,
	#adm_submenus .popup_window {
		box-shadow: none;
		border-width: 0;
		background: none;
	}
}

@media (max-width: 767px)
{
	.navigate_section ul li:not(:last-child, :first-child, :nth-child(2)) {
		display: none;
	}
	.navigate_section ul li.show {
		display: flex;
	}
	#header {
		flex-direction: column;
	}
	#header h1.forumtitle {
		position: relative;
	}
	.custom_search {
		border-width: 0;
		top: 36px;
		padding: 0;
	}
	#header h1.forumtitle {
		bottom: -10px;
		padding: 0;
		display: flex;
		align-items: center;
	}
	/* This is general */
	#main_menu .popup_container,
	#genericmenu .popup_container,
	#adm_submenus .popup_container {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(40, 64, 80, 0.5);
		z-index: 5;
	}
	#main_menu .popup_heading,
	#genericmenu .popup_heading,
	#adm_submenus .popup_heading {
		display: block;
	}
	.popup_window,
	#main_menu .popup_window,
	#genericmenu .popup_window,
	#adm_submenus .popup_window {
		top: 15%;
		width: 95vw;
		min-height: auto;
		max-height: 90vh;
		overflow-x: hidden;
		overflow-y: scroll;
	}
	#adm_submenus {
		padding: 0;
	}
	#adm_submenus .dropmenu li {
		float: left;
		margin: 0;
	}
	.generic_menu {
		display: none;
	}
	#mobile_user_menu .dropmenu,
	div[id^="mobile_generic_menu_"] .generic_menu {
		display: block;
	}
	a.mobile_user_menu,
	a[class^="mobile_generic_menu_"] {
		display: flex;
		align-items: center;
		margin: 0 0 4px 0;
		text-decoration: none;
	}
	a[class^="mobile_generic_menu_"] {
		margin: 8px 0;
	}
	.menu_icon {
		display: inline-block;
		font-style: normal;
		font-variant: normal;
		text-rendering: auto;
		-webkit-font-smoothing: antialiased;
		font-family: "Font Awesome 5 Free";
		font-size: 1.1em;
		font-weight: 900;
		color: var(--body-txt-color);
	}
	.menu_icon:hover {
		text-decoration: none;
	}
	.menu_icon::before {
		content: "\f0c9";
		width: auto;
		height: auto;
		margin-right: 10px;
	}
	.dropmenu li, .dropmenu li:hover,
	.dropmenu li a, .dropmenu li a:hover,
	.dropmenu li a.active, .dropmenu li a.active:hover, .dropmenu li:hover a.active,
	.dropmenu li ul, .dropmenu li li, .dropmenu li li a {
		width: 100%;
		margin: 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.subsections > a::after {
		position: absolute;
		padding: 5px 0;
		right: 10px;
		font: 83.33%/150% Arial, sans-serif;
		content: "\25bc" !important;
	}
	.dropmenu li ul,
	.dropmenu li li:hover ul, .dropmenu li li ul {
		position: relative;
		border-radius: 0;
		left: 0;
	}
	/* 3rd level menu tests */
	.dropmenu li ul ul {
		margin: 0 !important;
	}
	footer .footer_links {
		flex-direction: column-reverse;
	}
	footer ul.copyright{
		width: 100%;
	}
	footer ul.copyright,
	footer div.footer-other{
		text-align: center;
		align-items: center;
	}
	#info_center_blocks #block-forum_stats div {
		flex-basis: 100%;
	}
	#info_center_blocks #block-forum_stats > span {
		margin: 0 auto;
	}
	nav#main_nav ul.menu_nav,
	nav#main_nav ul.menu_nav li {
		gap: 2px;
		flex-direction: column;
	}
	nav#main_nav ul.menu_nav li {
		min-height: 35px;

	}
	nav#main_nav ul.menu_nav ul {
		padding: 5px 3px;
		top: 0;
	}
	nav#main_nav ul.menu_nav ul li {
		width: 100%;
	}
	.post_wrapper .postarea .keyinfo,
	.post_wrapper .postarea .under_message {
		flex-basis: 100%;
		flex-grow: 1;
	}
	.post_wrapper .postarea .under_message {
		margin: 5px 0 2px;
		padding: 7px 2px 2px;
	}
	.st-theme-information {
		/* display: grid; */
		grid-template-columns: 1fr;
	}
}

/* Tricky menu */
@media (min-width: 481px) {
	.boardslist {
		columns: 2;
	}

	.boardslist ul {
		page-break-inside: avoid;
	}
}

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

/* Entry level phones */
@media (max-width: 480px) {
	#pm_menu, #alerts_menu, #profile_menu {
		min-width: initial;
		max-width: calc(100vw - 17px);
		left: 0;
		right: 0;
		border-radius: 0;
	}
	.pagesection > div {
		flex-basis: 100%;
	}
	#info_center_blocks {
		flex-direction: column;
	}
	#info_center_blocks ul {
		flex-direction: row;
		margin: 0 15px;
	}
	#info_center_blocks .ui-tabs-nav li.title_bar.ui-tabs-active {
		background: var(--titlebg-bg);
	}
	#info_center_blocks .ui-tabs-nav li:last-child {
		border-bottom-left-radius: 0;
		border-top-right-radius: 4px;
	}
	#info_center_blocks ul li.ui-tabs-active {
		border-width: 3px 0 0;
	}
	.forum_date {
		display: none;
	}
	.social_icons {
		justify-content: center;
	}
	h1.forumtitle a, h1.forumtitle {
		max-width: 300px;
	}
	.board_moderators {
		display: none;
	}
	#top_info .welcome {
		display: none;
	}
	#footer {
		text-align: center;
	}
	#footer ul {
		width: 100%;
		float: none;
	}
	#footer li {
		display: block;
		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 {
		position: relative;
	}
	fieldset {
		max-width: 100%;
		min-width: unset;
	}
	/* Register Page */
	#registration .button {
		font-size: 0.67em;
	}
	dl.register_form, dl.register_form dt, dl.register_form dd {
		float: none;
		width: 100%;
	}
	/* Login Page */
	.login dt, .login dd {
		float: none;
		width: 100%;
		text-align: left;
	}
	.login #ajax_loginuser, .login #ajax_loginpass, .login #loginuser, .login #loginpass, .login select {
		width: 100%;
	}

	/* Display (Topic View) */
	.subject_title input {
		width: 90%;
	}
	#quickreply_options .roundframe {
		padding: 8px 10px 12px 10px;
	}

	/* Post Section */
	#post_header dd {
		width: 55%;
	}
	#post_header dt {
		width: 35%;
	}
	img#icons {
		margin: 0 0 0 5px;
	}
	#quickreply_options #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,
	#creator .settings dt, #creator .settings dd,
	div#report_form dl.settings dd, div#report_form dl.settings dt,
	#tracking dt, #tracking dd,
	#detailedinfo dt, #detailedinfo dd,
	#advanced_search dt, #advanced_search dd {
		width: 100%;
		float: none;
	}
	#post_draft_options dl.settings dt, #post_draft_options dl.settings dd {
		width: 50%;
		float: left;
	}
	dl.settings dd textarea, #report_comment {
		width: 100%;
	}
	.move_topic {
		width: 100%;
	}
	.bbc_float {
		max-width: 100% !important;
		margin-left: 0.5em !important;
		margin-right: 0.5em !important;
	}
	/* PersonalMessages */
	#personal_messages .pm_icon {
		display: none;
	}
	#personal_messages div.labels {
		clear: both;
	}
	/* Alerts page */
	#alerts .alert_image {
		width: 40px;
		padding-left: 6px;
	}
	#alerts .alert_image .avatar {
		display: none;
	}
	#alerts .alert_image .avatar + .alert_icon {
		position: static;
	}
	/* Buddies & Ignore List */
	#edit_buddies .buddy_email {
		display: none;
	}
	/* Stats Center */
	.half_content {
		width: 100%;
		margin: 0;
		padding: 0;
	}
	th.recentboard, th.recenttime,
	td.recentboard, td.recenttime {
		display: none;
	}
	.sceditor-container {
		min-height: 375px;
	}

	/* Memberlist */
	th.website_url,
	td.website_url, td.reg_group, td.reg_date, td.post_num {
		display: none;
	}
	#mlist .post_count {
		width: 50px;
	}
	#mlist .post_count .generic_bar {
		border: 0;
		background: transparent;
		color: inherit;
	}
	#mlist .post_count .generic_bar .bar {
		background: transparent;
		box-shadow: none;
	}
	#mlist_search dt {
		width: 100%;
		display: block;
		padding: 0;
	}
	#mlist_search dd {
		padding: 0;
		margin: 0;
	}
	#mlist_search input[type="checkbox"] {
		margin: 0 13px 3px 3px;
		vertical-align: middle;
	}
	/* Moderation */
	.post_note input {
		width: 75%;
	}
	.modbox .floatleft {
		float: none;
	}
	#warning_list .reason, #moderation_log_list .position, #moderation_log_list .ip, #group_members .last_active,
	#group_request_list .date, #group_lists .icons, #regular_membergroups_list .icons, #post_count_membergroups_list .icons, #watch_user_list .last_login {
		display: none;
	}
	/* Admin */
	#live_news, #support_info {
		width: 100%;
		padding: 0;
		margin: 0 0 5px 0;
	}
	fieldset.admin_group a {
		width: 50%;
		float: left;
		margin: 0 0 5px 0;
	}

	.error_info, #fatal_error {
		width: 100% !important;
		padding: 0 !important;
		float: none;
	}

	/* Calendar */
	.event_options_left, .event_options_right {
		width: 100%;
	}
	#event_title, #event_board {
		width: 100%;
	}
	#evtitle {
		width: 98%;
	}
	#header_news_lists_preview, tr[id^="list_news_lists_"] td:nth-child(even),
	#header_smiley_set_list_default, #header_smiley_set_list_url, #header_smiley_set_list_check,
	tr[id^="list_smiley_set_list_"] td:nth-child(odd),
	#header_mail_queue_priority,
	tr[id^="list_mail_queue_"] td:nth-child(odd),
	#header_member_list_user_name, #header_member_list_ip,
	#header_member_list_last_active, #header_member_list_posts {
		display: none;
	}
	tr[id^="list_mail_queue_"] td:first-of-type,
	tr[id^="list_mail_queue_"] td:last-of-type {
		display: table-cell;
	}
	.msearch_details {
		width: 100% !important;
		float: none;
	}
	.msearch_details .righttext {
		text-align: left;
	}
	.msearch_details input {
		width: 90%;
	}
	.msearch_details input[type="checkbox"] {
		width: 5%;
	}
	/* Generic Lists */
	#request_list .time_applied,
	#track_user_list .date, #track_user_list .date2, #file_list .filesize, #file_list .downloads,
	#ban_list .added, #ban_list .num_triggers, #ban_log .date, #mail_queue .age, #attachments .subject {
		display: none;
	}
	/* Likes */
	#likes li .like_time {
		display: none;
	}
	/* Generic Classes for Customizations */
	.hide_480 {
		display: none;
	}
	.block_480 {
		display: block;
	}
	.inlineblock_480 {
		display: inline-block;
	}
	#recent_posts_content ul li span.poster_link {
		display: block;
	}
	.custom_search input[name="search"]:focus {
		width: 9em;
	}
	#info_center_blocks #block-forum_stats div span.title > span.block-title {
		display: none;
	}
}