/* Hide Responsive Stuff until it's time */

.mobile_nav {
	display: none;
}

/* Quick fixes to the existing site */

#findChoir select {
	height: 26px;
	border: 1px solid #000000;
}

#findChoir input {
	height: 16px;
	margin-top: 4px;
}

#findChoir input[type=image] {
	height: auto;
}

#siteSearch {
	margin-bottom: 15px;
}

#siteSearch input.textinput {
	height: 16px;
}

#membersLogin input.textinput,
#membersLogin input.textinputhover {
	height: 14px;
}

.event_image {
	clear: right;
}


/* Tablet and smaller */
@media only screen and (max-width: 1023px) {

	/* Main Layout */
	#container {
		max-width: 90%;
		background-position: -9px;
		position: relative;
	}

	#content {
		padding: 20px 20px;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	#content.home {
		padding-top: 2px;
		padding-bottom: 0px;
	}

	#leftCol {
		background: #262626;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	#footer {
		max-width: 90%;
	}


	/* Header */

	.mobile_nav {
		height: 35px;
		line-height: 35px;
		background: #333333;
		text-align: right;
		display: block;
	}

	.mobile_nav a {
		display: inline-block;
		color: #ffffff;
		font-size: 14px;
		height: 35px;
		padding: 0px 15px;
		text-decoration: none;
		cursor: pointer;
	}

	.mobile_nav a:hover {
		text-decoration: none;
	}

	.mobile_nav a span {
		display: inline-block;
		vertical-align: middle;
	}

	.mobile_nav a .hamburger {
		width: 20px;
		height: 10px;
		border-top: 2px solid #ffffff;
		border-bottom: 2px solid #ffffff;
		position: relative;
		margin-left: 10px;
	}

	.mobile_nav a .hamburger:before {
		content: '';
		position: absolute;
		top: 50%;
		left: 0px;
		width: 100%;
		border-top: 2px solid #ffffff;
		height: 0px;
		margin-top: -1px;
	}

	#mainNav {
		position: absolute;
		z-index: 101;
		right: 4px;
		top: 35px;
		height: auto;
		width: 200px;

		display: -webkit-flex;
		-webkit-flex-direction: column-reverse;

		display: flex;
		flex-direction: column-reverse;

		opacity: 0;
	    margin-top: 22px;
	    visibility: hidden;

	    transition: opacity 0.1s linear 0s, margin-top 0.1s ease-in 0s, visibility 0s linear 0.1s;
	}

	#mainNav.open {
		opacity: 1;
	    margin-top: 12px;
	    visibility: visible;

	    transition: opacity 0.1s linear 0s, margin-top 0.1s ease-out 0s, visibility 0s linear 0s;
	}

	#mainNav:before {
		content: '';
		display: block;
		position: absolute;
		bottom: 100%;
		right: 11px;
		border-width: 0px 10px 10px 10px;
		border-color: transparent transparent #333333 transparent;
		border-style: solid;
	}

	#mainNav:after {
		content: '';
		width: 100%;
		clear: both;
		height: 0px;
		display: block;
	}

	#mainNav li {
		display: block;
	}

	#mainNav li a {
		display: block;
		float: none;
	}

	#mainNav li a:hover,
	#mainNav li.down a {
		background-image: none;
	}

	.header_logo {
		position: absolute;
		display: block;
		left: 27px;
		top: -61px;
	}

	.header_logo .logo {
		margin: 0px;
	}


	/* Content */

	.top_banner {
		width: 100%;
		height: auto;
	}

	#content img {
		max-width: 100%;
		height: auto;
	}

	#content .event_image {
		max-width: 50%;
	}


	/* Map */

	.mapPara {
		display: none;
	}

	.mapParaMobile {
		display: block !important;
	}


	/* Forms */

	.msg_box {
		width: 100%;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	.onlineEnquiryTable input.textinput,
	.onlineEnquiryTable input.textinputhover,
	.onlineEnquiryTable textarea {
		width: 100%;
		max-width: 100%;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	.onlineEnquiryTable td:last-child {
		padding-right: 15px;
	}


	/* Homepage */
	.home table {
		width: 100% !important;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	.home table img {
		margin: 0px !important;
		padding: 0px !important;
		border: 0px none transparent !important;
	}

	.flexslider {
		min-height: 0px;
	}

	.banner_text p {
		line-height: 1.2;
		font-size: 2.3vw;
	}

	.home .chapter_select {
		margin: -16px -20px 18px -20px !important;
		width: calc(100% + 40px) !important;
	}

	.chapter_select td {
		vertical-align: middle !important;
	}

	.chapter_select td:nth-child(2) {
		font-size: 0px;
		text-align: center !important;
	}

	.chapter_select td:nth-child(2) a {
		display: inline-block;
		max-width: 16.666%;
	}

	.chapter_select td:nth-child(2) a img {
		max-width: 100%;
		height: auto;
	}

	#content table.homeBoxes {
		display: block;
		width: calc(100% + 10px) !important;
		margin-left: -5px !important;
		margin-right: -5px !important;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	.homeBoxes tr,
	.homeBoxes td {
		display: inline;
		font-size: 0px;
		line-height: 0px;
	}

	.homeBoxes td a {
		width: 33%;
		display: inline-block;
		padding: 5px;
		vertical-align: top;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	.homeBoxes td a img {
		max-width: 100%;
		height: auto;
		padding: 0px !important;
	}

	/* Choirs */

	.choir-search div.clear {
		display: none;
	}

	.choir-search .msg_box {
		clear: both;
	}

	.choirListContainer {
		width: 50%;
		padding-right: 20px;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}


	/* Resources */

	.resources_table {
		width: calc(100% + 40px) !important;
		margin-left: -20px !important;
		margin-right: -20px !important;
	}

	.resources_table td {
		font-size: 0px;
	}

	.resources_table a {
		display: inline-block;
		max-width: 22%;
	}

	.resources_table img {
		max-width: 100%;
		height: auto;
	}

	/* Sidebar */

	#findChoir,
	.sidebarButtons,
	#siteSearch {
		max-width: 300px;
		width: 100%;
		display: block;
		margin: 0px auto;
	}

	#findChoir .choirSearchTitle {
		background: #716558;
		text-align: center;
	}

	#findChoir .choirSearchTitle img {
		max-width: 100%;
		height: auto;
	}

	#findChoir input,
	#findChoir select {
		width: 100% !important;
		height: 26px;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	#findChoir input[type=image] {
		height: auto;
	}

	.sidebarButtons a {
		display: block;
		width: 100%;
		text-align: center;
	}

	.sidebarButtons a img {
		max-width: 100%;
		height: auto;
	}

	#siteSearch input.textinput {
		width: calc(100% - 13px);
		height: 26px;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	#siteSearch input[type=image] {
		width: 13px;
	}

	.donateButton {
		max-width: 100%;
		height: auto;
	}

	.subNav a {
		text-align: left;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}


	/* Footer */

	#membersLogin {
		width: 100%;
		margin-left: 0px;
		text-align: center;
		font-size: 0px;
	}

	#membersLogin > * {
		font-size: 12px;
	}

	#membersLogin img,
	#membersLogin input {
		float: none;
		vertical-align: middle;
	}

	#membersLogin input.textinput,
	#membersLogin input.textinputhover {
		height: 24px;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}
}


/* Tablet Only */
@media only screen and (min-width: 768px) and (max-width: 1023px) {

	/* Main Layout */
	#content {
		width: calc(100% - 230px);
		border-left: 2px solid #ffffff;
	}

	#leftCol {
		width: 230px;
		padding: 15px;
	}

	/* Events */

	.featured_event {
		width: 50%;
	}
}

@media only screen and (max-width: 767px) {
	#container {
		background-image: none;
		margin-top: 20px;
	}

	#content {
		width: 100%;
		clear: both;
	}

	#leftCol {
		width: 100%;
		padding: 20px;
		text-align: center;
	}


	/* Header */

	.header_logo {
		position: absolute;
		left: 10px;
		top: -20px;
	}

	.header_logo img {
		width: 60px;

	}


	/* Homepage */

	#homeBanner {
		clear: both;
	}

	.home table p {
		margin-bottom: 0px !important;
	}

	.chapter_select {
		padding: 10px 0px !important;
	}

	.chapter_select p {
		margin-bottom: 0px !important;
	}


	/* Tables */

	.responsive_table {
		display: block;
		margin-bottom: 0px !important;
		width: 100%;
	}

	.responsive_table thead {
		display: none;
	}

	.responsive_table tbody {
		display: block;
	}

	.responsive_table tr {
		display: block;
		margin-bottom: 15px;
		border-top: 2px solid #EEE;
	}

	.responsive_table td {
		display: block;
		width: 100% !important;
		border-top: 0px none transparent !important;
		padding-left: 25% !important;
		min-height: 30px;
		position: relative;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	.responsive_table td:before {
		text-align: right;
		content: attr(data-title);
		font-weight: bold;
		position: absolute;
		left: 0px;
		top: 0px;
		padding: 5px;
		width: calc(25% - 10px);
	}
}

@media only screen and (max-width: 549px) {

	/* Homepage */

	.chapter_select {
		padding: 0px;
	}

	.chapter_select td:nth-child(2) {
		width: 75%;
	}

	.chapter_select td:nth-child(2) a {
		width: 100%;
		max-width: 33.333%;
	}

	.homeBoxes td a {
		width: 50%;
	}


	/* Forms */

	.onlineEnquiryTable {}

	.onlineEnquiryTable:after {
		content: '';
		display: block;
		clear: both;
		width: 100%;
		height: 0px;
	}

	.onlineEnquiryTable,
	.onlineEnquiryTable tbody,
	.onlineEnquiryTable tr,
	.onlineEnquiryTable td {
		display: block;
	}

	.onlineEnquiryTable td {
		display: block;
		text-align: left;
		max-width: 100%;

		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		-ms-box-sizing: border-box;
		-o-box-sizing: border-box;
		box-sizing: border-box;
	}

	.onlineEnquiryTable td:nth-child(1),
	.onlineEnquiryTable td:nth-child(2) {
		float: left;
		padding-top: 5px;
		padding-bottom: 0px;
	}

	.onlineEnquiryTable td:nth-child(1) {
		padding-left: 15px;
		font-weight: bold;
	}

	.onlineEnquiryTable td:nth-child(2) {
		padding-left: 5px;
	}

	.onlineEnquiryTable td:nth-child(3) {
		width: 100%;
		clear: both;
		padding-top: 0px;
		padding-bottom: 10px;
	}

	.onlineEnquiryTable .required img {
		vertical-align: middle !important;
	}

	.onlineEnquiryTable td:only-child {
		width: 100%;
		clear: both;
	}

	.onlineEnquiryTable #captcha {
		max-width: 90px;
		height: auto;
	}


	/* Choirs */

	.choirListContainer {
		width: 100%;
		padding-right: 0px;
	}

	.choirViewIMGcell,
	.choirViewDetails {
		display: block;
		padding-left: 0px;
		width: 100%;
	}


	/* Tables */

	.responsive_table td {
		padding-left: 30% !important;
	}

	.responsive_table td:before {
		width: calc(30% - 10px);
	}


	/* Events */

	#content .event_image {
		width: 100%;
		max-width: 100%;
		margin-left: 0px;
		height: auto;
	}

	.featured_event {
		width: 50%;
	}

	.event_view h1 {
		padding-right: 0px;
	}

	.event_view .addthis_toolbox,
	#content .event_view .addthis_toolbox {
		float: none;
		margin-top: 0px;
	}


	/* Footer */

	#membersLogin {
		margin-bottom: 20px;
		margin-top: -10px;
	}

	#membersLogin img,
	#membersLogin input {
		display: block;
		margin: 0px auto;
	}

	#membersLogin .textinput,
	#membersLogin .textinputhover {
		margin-bottom: 4px;
		width: 100%;
	}

	#membersLogin br {
		display: none;
	}
}

@media only screen and (max-width: 479px) {
	#homeBanner .flex-control-nav {
		display: none;
	}

	#findChoir {
		width: 100%;
	}


	/* Events */

	.featured_event {
		width: 100%;
	}


	/* Tables */

	.responsive_table td {
		padding-left: 40% !important;
	}

	.responsive_table td:before {
		width: calc(40% - 10px);
	}


	#content.national-council table:not(.resources_table),
	#content.national-council table:not(.resources_table) tbody,
	#content.national-council table:not(.resources_table) tr,
	#content.national-council table:not(.resources_table) td,
	#content.australian-composers table:not(.resources_table),
	#content.australian-composers table:not(.resources_table) tbody,
	#content.australian-composers table:not(.resources_table) tr,
	#content.australian-composers table:not(.resources_table) td {
		display: block;
		padding: 0px !important;
		height: auto !important;
	}

	#content.national-council table:not(.resources_table) img,
	#content.australian-composers table:not(.resources_table) img {
		margin: 0px 0px 20px 0px !important;
		float: none !important;
	}
}