@import "node_modules/bootstrap/scss/functions";
@import "node_modules/bootstrap/scss/variables";
@import "node_modules/bootstrap/scss/mixins";
@import "node_modules/bootstrap/scss/grid";
@import "node_modules/bootstrap/scss/dropdown";
@import "node_modules/bootstrap/scss/buttons";
@import 'starrating';

/**
 * Sass variables
 */

$headings: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
$body: "NonBreakingSpaceOverride", "Hoefler Text", "Baskerville Old Face", Garamond, "Times New Roman", serif;
$font__heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

$body-color: #111;
$color__background-body: #fff;
$color__text-light: #767676;
$highlights-color: #0073aa;
$color__background-button: #0073aa;
$color__background-button-hover: #111;
$font__size_base: 22px;
$font__size-ratio: 1.125;
$font__size-sm:    1em / (1 * $font__size-ratio);
$font__line-height-heading: 1.2;
$font__size-xs:    1em / (1.25 * $font__size-ratio);


/**
 * Layout stuff
 */
 .masvideos {
	.content-area {
		.site-main {
			margin: calc(2 * 1rem) 1rem;
		}
	}

	@media only screen and (min-width: 768px) {
		.content-area {
			margin: 0 calc(10% + 60px);

			.site-main {
				margin: 0;
			}
		}
	}
}


.masvideos-breadcrumb {
	margin-bottom: 3rem;
	font-size: 0.88889em;
	font-family: $headings;
}

.masvideos-loop-video__title,
.masvideos-loop-movie__title,
.masvideos-loop-tv-show__title,
.masvideos-loop-episode__title {
	font-size: 1.3em;
	margin-top: 0;
}

.masvideos-control-bar {
	display: flex;
	margin-bottom: 1em;
	flex-direction: column;
	align-items: center;

	form {
		@media only screen and (min-width: 768px) {
			margin-left: auto;
		}
	}

	.masvideos-result-count {
		margin: 0;
	}

	@media only screen and (min-width: 768px) {
		flex-direction: row;
		align-items: flex-start;
	}
}

.masvideos-page-control-bar {
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: space-between;

	@media only screen and (min-width: 768px) {
		flex-direction: row;
		align-items: flex-start;
	}
}

.masvideos-pagination {
	font-family: $headings;
	font-size: 0.88889em;

	ul.page-numbers {
		margin: 0;
		padding: 0;
		display: block;
		font-weight: 700;
		letter-spacing: -0.02em;
		line-height: 1.2;
		list-style: none;
		display: flex;
		align-items: center;
	}

	span.page-numbers,
	a.page-numbers,
	.next.page-numbers,
	.prev.page-numbers {
		padding: 0 calc(.5 * 1rem);
		display: inline-block;
	}

	@media only screen and (min-width: 768px) {
		span.page-numbers,
		a.page-numbers,
		.next.page-numbers,
		.prev.page-numbers {
			padding: 1rem;
		}
	}
}

.video__badge,
.movie__badge,
.tv-show__badge {
	position: absolute;
	top: 0;
	left: 15px;
	display: inline-block;
	background: $highlights-color;
	color: #fff;
	display: inline-block;
	font-family: $headings;
	font-size: 0.71111em;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	padding: 0.5rem;
	position: absolute;
	text-transform: uppercase;
	top: 0;
	z-index: 1;
}

.masvideos-message,
.masvideos-error,
.masvideos-info {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: #eee;
	font-size: 0.88889em;
	font-family: $headings;
	list-style: none;
	overflow: hidden;
}

.masvideos-message {
	background: #eee;
	color: $body-color;
}

.masvideos-error,
.masvideos-info {
	color: #fff;

	a {
		color: #fff;

		&:hover {
			color: #fff;
		}

		&.button {
			background: #111;
		}
	}
}

.masvideos-error {
	background: firebrick;
}

.masvideos-info {
	background: $highlights-color;
}

#reviews.masvideos-Reviews {
	.star-rating {
		width: auto;

		&:before {
			content: none;
		}
	}

	.comment-respond p {
		margin-left: 0;
		margin-right: 0;

		&.comment-form-email {
			margin-left: 1.5rem;
		}
	}

	.comment-reply-title {
		font-family: $headings;
		font-size: 1em;
		font-weight: bold;
		margin: 0 0 2rem;
		display: block;
		text-align: left;
	}
}


.masvideos-tabs {
	margin: 0 0 2rem;

	ul {
		margin: 0 0 1.5rem;
		padding: 0;
		font-family: $headings;
		list-style: none;

		li {
			margin: 0 1rem 0 0;
			display: inline-block;

			a {
				color: $body-color;
				text-decoration: none;
				font-weight: 700;
			}

			&.active {
				a {
					color: $highlights-color;
					box-shadow: 0 2px 0 $highlights-color;
				}
			}
		}
	}

	.panel {
		> * {
			margin-top: 0 !important;
		}

		h2 {
			margin: 0 0 1rem;
			font-size: 1em;

			&:before {
				content: none;
			}
		}
	}

	#comments {
		padding-top: 0;
	}

	.comment-reply-title {
		font-family: $headings;
		font-size: 1em;
		font-weight: bold;
		margin: 0 0 2rem;
		display: block;
		text-align: left;
	}

	#reviews {
		ol.commentlist {
			padding: 0;
		}

		li.review,
		li.comment {
			list-style: none;
			margin-right: 0;
			margin-bottom: 2.5rem;

			p.meta {
				margin-bottom: 0.5em;
			}
		}
	}

	.tab-content > .tab-pane {
      display: none;
    }

    .tab-content > .active {
      display: block;
    }
}

.masvideos-tabs,
.single-movie .masvideos-Reviews,
.movie__recommended {
	margin: calc(2 * 1rem) 1rem;
	@media only screen and (min-width: 768px) {
		margin: 0 calc(10% + 60px);
	}
}

.masvideos-tabs {
	.tab-content {
		.tab-pane {
			.masvideos-Reviews {
				margin: 0;
			}
		}
	}
}

.masvideos-tabs,
.movie__recommended{
	margin-bottom: 40px;

	.comment-respond p {
		margin-left: 0;
		margin-right: 0;

		&.comment-form-email {
			margin-left: 1.5rem;
		}
	}

	.comment-respond p.comment-notes,
	.comment-respond p.logged-in-as {
		text-align: left;
		margin: 0 0 20px;
	}

	.comment-form-cookies-consent {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}

.single-tv_show .masvideos-tabs,
.single-episode .masvideos-tabs {
	margin: 0;
}

.movie__meta,
.video__meta,
.tv-show__meta,
.episode__meta{

	font-weight: 500;

	> span {

		margin-right: 1rem;
		display: inline-block;

		&:last-child {
			margin-right: 0;
		}
	}

	a {

		&:hover {
			text-decoration: none;
		}
	}

	.svg-icon {
		position: relative;
		display: inline-block;
		vertical-align: middle;
		margin-right: 0.5em;
	}

	&--genre  {
		&:before {
			content: "";
		    width: 16px;
		    height: 16px;
		    display: inline-block;
		    vertical-align: middle;
		    margin-right: 4px;
		    background-repeat: no-repeat;
			background-image: url('data:image/svg+xml;utf8,<svg class="svg-icon" width="16" height="16" fill="rgb(118, 118, 118)" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>');
			
		}
	}

	&--release-year,
	&--last-seen,
	&--duration,
	&--release-date {
		&:before {
			content: "";
		    width: 16px;
		    height: 16px;
		    display: inline-block;
		    vertical-align: middle;
		    margin-right: 4px;
		    background-repeat: no-repeat;
			background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" fill="rgb(118, 118, 118)" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="clock" class="svg-inline--fa fa-clock fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="rgb(118, 118, 118)" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z"></path></svg>');
			
		}
	}
}

/**
 * Archive Pages
 */

 .post-type-archive-movie {
 	.movies>.movies__inner .movie {
 		margin-bottom: 20px;
 	}
 }

.masvideos.archive .page-header {
	margin: 0;

	.page-title {
		font-size: 1.6875em;
		font-weight: 700;
		font-family: $headings;
		margin: 1rem 0;
		display: block;
		color: #111;

		@media only screen and (min-width: 768px) {
			font-size: 2.25em;
		}
	}
}

.tv-show__hover-area {
	display: none;
}


.movie__short-description,
.video__short-description,
.tv-show__short-description {
	display: none;
}

.masvideos {
	.summary {
		.movie__short-description,
		.video__short-description,
		.tv-show__short-description {
			display: block;
		}
	}
}

.tv-show__actions,
.movie__actions,
.video__actions {
	display: flex;
	margin-bottom: 20px;
	flex-direction: column;

	.movie-actions--link_watch,
	.video-actions--link_watch,
	.tv-show-actions--link_watch {
		line-height: 1.2;

		@media only screen and (min-width: 1199px) {
            margin-right: 10px;
        }
	}

	@media only screen and (min-width: 1199px) {
		flex-direction: row;
		align-items: center;
	}

}

.movie-actions--link_add-to-playlist > a,
.tv-show-actions--link_add-to-playlist > a,
.video-actions--link_add-to-playlist > a {
	transition: background 150ms ease-in-out;
	background: $color__background-button;
	border: none;
	border-radius: 5px;
	box-sizing: border-box;
	color: $color__background-body;
	font-family: $font__heading;
	font-size: $font__size-sm;
	font-weight: 700;
	line-height: 1.5;
	outline: none;
	padding: 6px 10px;
	text-decoration: none;
	display: inline-block;
	vertical-align: bottom;

	&:hover {
		background: $color__background-button-hover;
		cursor: pointer;
		color: $color__background-body;
	}

	&:visited {
		color: $color__background-body;
		text-decoration: none;
	}

	&:focus {
		background: $color__background-button-hover;
		outline: thin dotted;
		outline-offset: -4px;
	}

	&:after {
		vertical-align: middle;
	}
}


.masvideos-page {
	.site-content{
		overflow: visible;
	}
}

.movie__avg-rating,
.tv-show__avg-rating,
.episode__avg-rating {
	.avg-rating {
		display: flex;
		&:before {
			font-family: dashicons;
			content: "\f155";
		}
	}

	.avg-rating__inner {
		display: flex;
		flex-direction: column;
	}

	.avg-rating__number,
	.avg-rating__text {
		display: block;
		line-height: 1;

	}
}

.single-movie,
.single-tv_show {
	.movie__avg-rating,
	.tv-show__avg-rating {
		margin-bottom: 20px;
	}
}

.videos__inner,
.movies__inner,
.tv-shows__inner,
.episodes__inner {
    @include make-row();
}

.videos__inner > .video,
.movies__inner > .movie,
.tv-shows__inner > .tv-show,
.episodes__inner > .episode  {
    @include make-col-ready();
    margin-top: 0;
}

.video-actions--link_add-to-playlist.dropdown,
.movie-actions--link_add-to-playlist.dropdown,
.tv-show-actions--link_add-to-playlist.dropdown {
	position: relative;

	.dropdown-menu {
		font-size: 1.5rem;
		
		a {
			display: block;
		    width: 100%;
		    padding: 3px 1.5rem;
		    clear: both;
		    font-weight: 400;
		    text-align: inherit;
		    white-space: normal;
		    background: 0 0;
		    border: 0;
		}
	}
}

.videos,
.movies,
.tv-shows,
.episodes {
	>.videos__inner .video,
	>.movies__inner .movie,
	>.tv-shows__inner > .tv-show,
	>.episodes__inner > .episode {
        @include make-col(6);
        padding-right: 6px;
        padding-left: 6px;

        @media only screen and (min-width: 768px) {
            @include make-col(6);
            padding-right: 15px;
            padding-left: 15px;
        }

        @media only screen and (min-width: 992px) {
            @include make-col(3);
        }
    }
       
	
	@media only screen and (min-width: 992px) {
        &.columns-1 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(12);
            }
        }
        &.columns-2 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(6);
            }
        }
        &.columns-3 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(4);
            }
        }

        &.columns-4 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(3);
            }
        }

        &.columns-5 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(2.4);
            }
        }

        &.columns-6 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(2);
            }
        }

        &.columns-7 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(1.71428571);
            }
        }

        &.columns-8 {
            >.videos__inner .video,
            >.movies__inner .movie,
            >.tv-shows__inner > .tv-show,
            >.episodes__inner > .episode {
                @include make-col(1.5);
            }
        }
    }
}

/**
 * Single page
 */

.single-video .video,
.single-movie .movie,
.single-tv_show .tv-show,
.single-episode .episode{
	.video__player,
	.movie__head,
	.tv-show__head,
	.episode__head {
		@media only screen and (min-width: 992px) {
			position: relative;
			float: left;
			width: 48%;
		}
	}

	div.summary {
		margin: 0;
		padding: 0;
		max-width: 100%;

		@media only screen and (min-width: 992px) {
			float: right;
			width: 48%;
			clear: none;
			
		}
	}

	.masvideos-video-gallery,
	.single-video__related,
	.movie__related,
	.single-tv_show__related,
	.masvideos-Reviews,
	.masvideos-tabs {
		clear: both;
	}

	.episode__head {
		.episode__player--prev-episode {
			margin-bottom: 20px;
		}
	}
}

/**
 * Single Movie
 */

.single-movie {
	.movie__description-tab {
		display: flex;
        flex-wrap: wrap;
		justify-content: space-between;
		flex-direction: column;

		@media only screen and (min-width: 992px) {
			flex-direction: row;
		}

		.movie{
			&__info--left {
				display: flex;
				align-items: center;
				flex-direction: column;

				@media only screen and (min-width: 992px) {
					flex-direction: row;
				}

				flex: 0 0 100%;
				max-width: 100%;
				@media only screen and (min-width: 992px) {
					flex: 0 0 60%;
			    	max-width: 60%;
				}
			}

			&__info--right {
				flex: 0 0 100%;
				max-width: 100%;
				@media only screen and (min-width: 992px) {
					flex: 0 0 40%;
				    max-width: 40%;
				}
			}

			&__poster {
				flex: 0 0 100%;
				max-width: 100%;

				@media only screen and (min-width: 992px) {
					margin-right: 40px;
				    flex: 0 0 24.1%;
				    max-width: 24.1%;
				}
			}
			&__body {
				@media only screen and (max-width: 768px) {
					flex: 0 0 100%;
					max-width: 100%;
				}
			}
		}
	}
}

.masvideos-videos-pagination {
    border-top: 1px solid #e8e8e8;
    padding-top: 20px;
    margin-bottom: 15px;

    .page-numbers {
    	flex-wrap: wrap;
    	justify-content: center;
    }
}

/**
 * My Account page
 */

 .masvideos-account {
	.masvideos {
		display: flex;
		flex-wrap: wrap;
		max-width: 100% !important;
	}

	.masvideos-notices-wrapper {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.masvideos-MyAccount-navigation {
		@include media-breakpoint-up(lg) {
			@include make-col(2);
		}

		ul {
			list-style: none;
			padding: 0;
		}
	}

	.masvideos-MyAccount-content {
		@include media-breakpoint-up(lg) {
			@include make-col(10);
		}

		.masvideos-playlists__header {
			display: flex;
		}


		label {
			display: block;
		}

		input[type="text"],
		input[type="email"],
		input[type="password"],
		select {
			border-radius: 0;
			width: 100%;
		}

		select {
			height: 44px;
		}

		.masvideos-edit-playlist + .masvideos-manage-playlists {
			margin-top: 40px;
		}

		table thead td {
			font-weight: 700;
		}

		table tbody td:first-child a {
			color: #121a21;
		}

		table {
			.masvideos-button {
				text-transform: none;
				padding: 6px 12px;

				& + .masvideos-button {
					margin-left: 5px;
				}
			}
		}

		table.masvideos-videos-table + .masvideos-pagination--without-numbers {
			@include media-breakpoint-up(xl) {
				margin-top: 40px;
			}
		}

		.masvideos-pagination--without-numbers {
			display: flex;
			justify-content: flex-end;

			a {

			    &.masvideos-button--previous {
			    	margin-right: auto;
			    }

			    &:hover {
			    	color: #fff;
			    }
			}
		}

		form.masvideos-edit-playlist__form {
			@include make-row();

			> p {
				@include make-col-ready();
			}

			.form-row-wide {
				@include media-breakpoint-up(md) {
					flex: 0 0 50%;
					max-width: 50%;
				}
			}
		}
	}

	.masvideos-register,
	.masvideos-login {
	    @include media-breakpoint-up(md) {
	        @include make-col(6);
	    }
	}
}

/**
 * Upload Page
 */

.image-filters-enabled {
	.masvideos {
		display: flex;
		flex-wrap: wrap;
		max-width: 100% !important;

		form {
			width: 100%;
		}

		.masvideos-edit-video-fields {
			label {
				font-family: $font__heading;
				font-size: $font__size-xs;
				color: $color__text-light;
				display: block;
			}

			.form-row {
				input,
				select,
				.select2 {
					width: 100%;
				}

				input.input-checkbox  {
					width: auto;
				}

				.select2 {
					width: 100% !important;

				}

				.select2-container--default .select2-selection--multiple,
				.select2-container--default .select2-selection--single {
					border-color: #ccc;
					border-radius: 0;
					padding: 3px 20px;
        			height: 44px;
				}

				.select2-container--default .select2-selection--multiple .select2-selection__rendered,
				.select2-container--default .select2-selection--single .select2-selection__rendered {
					padding: 0;

					li {
						margin: 0;
					}
				}

				.select2-container--default .select2-selection--single .select2-selection__rendered {
					line-height: 34px;
				}

				.select2-container--default .select2-selection--single .select2-selection__arrow {
					height: 44px;
				}
			}

			.form-row-category_ids,
			.form-row-tag_ids {
				@media only screen and (min-width: 768px) {
					width: calc(50% - 0.5rem);
    				float: left;
    				margin-top:0;
				}
			}

			.form-row-tag_ids {
				@media only screen and (min-width: 768px) {
					margin-left: 1rem;
				}
			}

			.masvideos-input-wrapper {
				display: flex;
				align-items: center;
				flex-direction: column;
				@media only screen and (min-width: 768px) {
					flex-direction: row;
				}

				.masvideos_remove_image_button {
					margin-top: 20px;
					@media only screen and (min-width: 768px) {
						margin-left: 20px;
						margin-top:0;
					}
				}

				.upload_image_preview {
					@media only screen and (min-width: 768px) {
						margin-right: 20px;
					}
				}
			}

			.video_images_container {
		        padding: 0 0 0 9px;

		        ul {
		            @include clearfix();
		            margin: 0;
		            padding: 0;
		            list-style: none;

		            li.image,
		            li.add,
		            li.masvideos-metabox-sortable-placeholder {
		                width: 80px;
		                float: left;
		                cursor: move;
		                border: 1px solid #d5d5d5;
		                margin: 9px 9px 0 0;
		                background: #f7f7f7;
		                @include border-radius(2px);
		                position: relative;
		                box-sizing: border-box;

		                img {
		                    width: 100%;
		                    height: auto;
		                    display: block;
		                }
		            }

		            li.masvideos-metabox-sortable-placeholder {
		                border: 3px dashed #dddddd;
		                position: relative;

		                &::after {
		                    font-size: 2.618em;
		                    line-height: 72px;
		                    color: #ddd;
		                }
		            }

		            ul.actions {
		                position: absolute;
		                top: -8px;
		                right: -8px;
		                padding: 2px;
		                display: none;

		                li {
		                    float: right;
		                    margin: 0 0 0 2px;
		                    line-height: 1;

		                    a {
		                        text-decoration: none;
		                        display: block;

		                        &.tips {
		                            cursor: pointer;
		                        }
		                    }

		                    a.delete {
		                        font-size: 0;

		                        &::before {
		                            font-family: dashicons;
									content: "\f153";
		                            color: #999;
		                            background: #fff;
		                            border-radius: 50%;
		                            height: 1em;
		                            width: 1em;
		                            line-height: 1em;
		                            font-size: 13px;
		                        }

		                        &:hover::before {
		                            color: red;
		                        }
		                    }
		                }
		            }

		            li:hover ul.actions {
		                display: block;
		            }
		        }
		    }
		}
	}
}
.single-movie,
.single-video {
	.masvideos-movie-gallery,
	.masvideos-video-gallery {
		&--columns-1,
		&--columns-2,
		&--columns-3,
		&--columns-4,
		&--columns-5,
		&--columns-6,
		&--columns-7,
		&--columns-8,
		&--columns-9,
		&--columns-10 {
			.masvideos-movie-gallery__inner,
			.masvideos-video-gallery__inner {
				display: flex;
			}
		}
	}
}

.single-person .person {
	display: flex;
}

.single-person__content-sidebar {
    flex: 0 0 26.6666666667%;
    max-width: 26.6666666667%;
}

.single-person__content-body {
    flex: 0 0 73.3333333333%;
    max-width: 73.3333333333%;
}

.tv-show-cast-crew-tabs,
.movie-cast-crew-tabs {
	.tv-show-crews,
	.movie-crews {
	    display: flex;
		flex-wrap: wrap;

		.tv-show-crews-category-title,
		.movie-crews-category-title {
		    margin: 0;
			flex: 0 0 100%;
		}
	}
}

.movie-casts,
.tv-show-casts {
	display: flex;
	flex-wrap: wrap;
    .movie-cast {
        @include make-col(6);
        padding-right: 6px;
        padding-left: 6px;

        @media only screen and (min-width: 768px) {
            @include make-col(4);
            padding-right: 15px;
            padding-left: 15px;
        }

        @media only screen and (min-width: 992px) {
            @include make-col(2);
        }
    }
}