/**
 * WooCommerce Composite Products
 */

/**
 * Imports
 */

@import "bourbon";
@import "../../sass/utils/variables";
@import "../../sass/utils/mixins";
@import "susy";
@import "../../sass/vendors/modular-scale";

/**
 * Base
 */

.composite_summary .summary_element {

	.summary_element_wrapper {

		box-shadow: 0 0 0 4px rgba(0, 0, 0, 0);

		&.selected,
		&.selected:hover {
			box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
		}

		&:hover {
			box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03);
		}

		&.disabled,
		&.disabled:hover {
			box-shadow: 0 0 0 4px rgba(0, 0, 0, 0);
		}
	}
}

.composite_form {

	.component {

		.component_summary {

			.content {
				margin-bottom: ms(3);
			}

			.composited_product_details_wrapper {

				padding-left: 0;

				.composited_product_images {

					margin-left: 0;

					a {
						margin: 0 !important;
					}

					img {
						width: 100%;
						height: auto;
						margin-bottom: 0;
					}
				}
			}
		}

		&:not(.selection_thumbnail_hidden) .component_summary {

			.composited_product_details_wrapper > .details {
				padding: 0;
			}
		}

		.component_option_thumbnails {

			.component_option_thumbnail {

				box-shadow: 0 0 0 4px rgba(0, 0, 0, 0);

				&.selected,
				&.selected:hover {
					box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
				}

				&.selected:not(.loading) button {
					border-radius: 50%;
					width: 0;
					box-sizing: content-box;
				}

				&:hover {
					box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03);
				}

				&.disabled,
				&.disabled:hover {
					box-shadow: 0 0 0 4px rgba(0, 0, 0, 0);
				}
			}
		}

		.select_label {
			display: block;
			margin-bottom: 1em;
		}
	}
}

.woocommerce,
.woocommerce-page {

	#content div.product,
	div.product {

		.component .composited_product_images {

			@include span( 2 of 10 );
		}
	}
}

.composite_form {

	.component {

		&:not(.selection_thumbnail_hidden) .component_summary {

			.composited_product_details_wrapper > .details {

				@include span( last 8 of 10 );
			}
		}
	}
}

.component_table_item {

	.product-name {
		padding-left: 4rem;
	}
}

table.shop_table_responsive tr.component_table_item {
	display: none;
}

/**
 * Desktop
 */

@include susy-media($desktop) {

	.component_container_table_item dl.composite_configuration {
		display: none;
	}

	table.shop_table_responsive tr.component_table_item {
		display: table-row;
	}

	.sp-product-gallery-stacked,
	.storefront-full-width-content,
	.page-template-template-fullwidth-php {

		#content div.product,
		div.product {

			.component .composited_product_images {

				@include span( 2 of 8 );
			}
		}

		.composite_form {

			.component {

				&:not(.selection_thumbnail_hidden) .component_summary {

					.composited_product_details_wrapper > .details {

						@include span( last 6 of 8 );
					}
				}
			}
		}
	}
}

/**
 * Handheld
 */

@include susy-media(max-width $handheld) {

	.woocommerce,
	.woocommerce-page {

		#content div.product,
		div.product {

			.component .composited_product_images {

				@include span( 10 of 10 );
			}
		}
	}

	.composite_form {

		.component {

			&:not(.selection_thumbnail_hidden) .component_summary {

				.composited_product_details_wrapper > .details {

					@include span( 10 of 10 );
				}
			}

			.component_summary {

				.composited_product_details_wrapper {

					.composited_product_images {
						max-width: 50%;

						img {
							margin-bottom: 1em;
						}
					}
				}
			}
		}
	}
}

/**
 * Widget
 */

.widget.widget_composite_summary.widget_position_fixed {
	font-size: ms(1);
}

.widget.widget_composite_summary.widget_position_fixed .widget_composite_summary_price {
	font-size: ms(2);
}

.widget.widget_composite_summary.widget_position_fixed .widget_composite_summary_content {

	@include clearfix;
	max-width: 1064px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 ms(5);
	box-sizing: content-box;
}

@include susy-media (max-width $container-width) {

	.widget.widget_composite_summary.widget_position_fixed .widget_composite_summary_content {
		margin-left: ms(5);
		margin-right: ms(5);
		padding: 0;
	}
}

@include susy-media (max-width $handheld) {

	.widget.widget_composite_summary.widget_position_fixed .widget_composite_summary_content {
		margin-left: ms(2);
		margin-right: ms(2);
		padding: 0;
	}
}

.widget_composite_summary.widget_position_fixed .widget_composite_summary_content .widget_composite_summary_ui_wrapper > div {
	margin-left: 0;
}

.widget_composite_summary.widget_position_fixed .widget_composite_summary_content {

	.widget_composite_summary_details_wrapper {

		@include span(9 of 12);
	}

	.widget_composite_summary_ui_wrapper {

		@include span(last 3 of 12);
	}
}

.right-sidebar .widget_composite_summary.widget_position_fixed .widget_composite_summary_content {

	.widget_composite_summary_details_wrapper {

		@include span(9 of 12);
	}

	.widget_composite_summary_ui_wrapper {

		@include span(last 3 of 12);
	}
}

.left-sidebar .widget_composite_summary.widget_position_fixed .widget_composite_summary_content {

	.widget_composite_summary_details_wrapper {

		@include span(last 9 of 12);
	}

	.widget_composite_summary_ui_wrapper {

		@include span(3 of 12);
	}

	.composite_button {
		float: left;
	}
}
