/* PHONES */
@media screen and (max-width: 767px) {
	.cUserHovercard {
		min-width: 0;
	}

	html[dir="ltr"] .cTopContributors .ipsDataItem_main {
		margin-left: 30px;
	}
	html[dir="rtl"] .cTopContributors .ipsDataItem_main {
		margin-right: 30px;
	}
	
	/* This element is overlaid by the user photo, so we need to raise this to the top of the stack */
	#elEditProfile {
		z-index: 3050;
	}

	#elGuestTerms .cGuestTerms_contents {
		margin-bottom: 15px;
	}
	#elGuestTerms .ipsButton {
		line-height: 32px;
	}

	/* Google MFA */
	#elGoogleAuthenticator .ipsGrid_span8 {
		margin-top: 0;
		margin-bottom: 10px;
	}

	/* Guest Sign In */
	.cGuestTeaser .ipsPad.ipsBox {
		padding: 15px;
	}

	.cGuestTeaser .ipsButton {
		width: 100%;
	}

	.cGuestTeaser_social {
		width: 100%;
	}
	
		.cGuestTeaser_social a {
			margin: 0 auto;
		}

	html[dir] .cGuestTeaser_left {
		border-left: 0;
		border-right: 0;
		border-bottom: 2px solid rgba( var(--theme-text_dark), 0.05 );
		margin-bottom: 15px;
		padding-bottom: 15px;
	}

	/* Reset guest teaser on mobile back to normal layout from tablet flex layout */
	.cGuestTeaser .ipsGrid {
		display: block !important;
	}
		.cGuestTeaser .ipsGrid_span6 {
			display: block !important;
		}

	/* EMJOI */
	ul.cEmojiMenu.ipsMenu > li {
		min-width: 0;
		width: 100%;
		margin-bottom: 3px;
	}
}

/* BOTH */
@media screen and (max-width: 979px) {
	
	html[dir="ltr"] #elInboxContent .ipsDataItem_main {
		margin-right: 40px !important;
	}
	html[dir="rtl"] #elInboxContent .ipsDataItem_main {
		margin-left: 40px !important;
	}
	
	.cMessage > .ipsDataItem_main {
		margin-right: 75px;
	}

	.cMessage > .ipsDataItem_generic {
		width: 75px;
		display: inline-block;
		position: absolute;
		top: 7px;
	}

	html[dir="ltr"] .cMessage > .ipsDataItem_generic {
		right: var(--sp-4);
	}
	html[dir="rtl"] .cMessage > .ipsDataItem_generic {
		left: var(--sp-4);
	}
	
	#elWidgetControls {
		display: none;
	}

	.cPollList_choices li {
		margin-bottom: 15px;
	}

	.cPollVoteBar {
		margin: 5px 0;
	}

	.cPollList .ipsGrid > [class*="ipsGrid_span"] {
		min-height: 0;
	}
	
	.cPollChoices .ipsDataItem {
		padding: 7px 0 !important;
	}

		.cPollChoices .ipsDataItem:first-child {
			display: none;
		}

	.cPollChoices .cPollChoiceNumber {
		width: 30px;
		min-width: 0;
		float: left;
		font-size: 20px;
		line-height: 28px;
	}
	html[dir="rtl"] .cPollChoices .cPollChoiceNumber {
		float: right;
	}

	html[dir="ltr"] .cPollChoices .ipsDataItem_main {
		margin: 0 30px 5px 40px;
	}
	html[dir="rtl"] .cPollChoices .ipsDataItem_main {
		margin: 0 40px 5px 30px;
	}

	html[dir="ltr"] .cPollChoices .ipsDataItem_main + .ipsDataItem_generic {
		margin-left: 40px;
	}
	html[dir="rtl"] .cPollChoices .ipsDataItem_main + .ipsDataItem_generic {
		margin-right: 40px;
	}

		.cPollChoices .ipsDataItem_main + .ipsDataItem_generic:after {
			content: attr( data-voteText );
			font-size: 13px;
		}

		.cPollChoices .ipsDataItem_main + .ipsDataItem_generic input {
			max-width: 50px;
		}
		html[dir="ltr"] .cPollChoices .ipsDataItem_main + .ipsDataItem_generic input {
			margin-right: 5px;
		}
		html[dir="rtl"] .cPollChoices .ipsDataItem_main + .ipsDataItem_generic input {
			margin-left: 5px;
		}

	.cPollChoices [data-action="removeChoice"] {
		position: absolute;
		top: 7px;
	}
	html[dir="ltr"] .cPollChoices [data-action="removeChoice"] {
		right: 0;
	}
	html[dir="rtl"] .cPollChoices [data-action="removeChoice"] {
		left: 0;
	}

	html[dir="ltr"] #elNotifyContent .ipsDataItem_main {
		margin-left: 55px;
	}
	html[dir="rtl"] #elNotifyContent .ipsDataItem_main {
		margin-right: 55px;
	}
	
	/* This element is overlaid by the user photo, so we need to raise this to the top of the stack */
	#elEditProfile {
		z-index: 3050;
	}

	/* Use flex to ensure positioning in guest teaser for tablet */
	.cGuestTeaser .ipsGrid {
		display: flex;
	}
		.cGuestTeaser .ipsGrid_span6 {
			display: flex;
			flex: 1;
			flex-direction: column;
		}
			.cGuestTeaser .ipsGrid_span6 a {
				margin-top: auto;
			}
}

/* MY ATTACHMENTS */
@media (max-width: 979px){
	[data-pagecontroller="attachments"] .ipsAttach  > *,
	[data-pagecontroller="warnings"] .ipsDataList  > *{
		width: auto;
	}
	[data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_size3{
		flex: 0 0 60px;
		margin-right: 10px;
	}
	[dir='rtl'] [data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_size3{
		margin-right: 0;
		margin-left: 10px;
	}

		[data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_size3 .ipsPos_right {
			float: none;
			margin-left: var(--sp-8);
			margin-top: var(--sp-1);
		}

		[data-pagecontroller="attachments"] .ipsAttach .ipsThumb_small,
		[data-pagecontroller="warnings"] .ipsDataList .ipsThumb_small{
			max-width: 100%;
		}

	[data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_main,
	[data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_main{
		flex: 1 1 10%;
	}

	[data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_size9{
		flex-basis: 250px;
		margin: 0 20px;
	}

	[data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_stats,
	[data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_modCheck,
	[data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_stats,
	[data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_modCheck{
		flex-shrink: 0;
	}

	[data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_modCheck,
	[data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_modCheck{
		right: 10px;
		left: auto;
		top: 50%;
		transform: translateY(-50%);
	}
		[dir='rtl'] [data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_modCheck,
		[dir='rtl'] [data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_modCheck{
			right: auto;
			left: 10px;
		}
}

@media (max-width: 767px){
	[data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_main,
	[data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_main{
		flex-basis: 70%;
	}
	[dir='ltr'] [data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_size9,
	[dir='ltr'] [data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_size9{
		margin-left: 70px;
	}
		[dir='rtl'] [data-pagecontroller="attachments"] .ipsAttach .ipsDataItem_size9,
		[dir='rtl'] [data-pagecontroller="warnings"] .ipsDataList .ipsDataItem_size9{
			margin-right: 70px;
		}
}