
/* ENTEX GALLERY EXPANDER */
/*
 * ENTEX GALLERY EXPANDER STYLES
 * Plugin: Entex gallery expander 
 * Version: 2.20130
 * Author: Jonas Lundman
 * Updated: 2022 01 31
 */

.blocks-gallery-item:not([class*=-expanded]) > figure > a.ua-gallery-wr-image > img,
.gallery-item:not([class*=-expanded]) > .gallery-icon > a.ua-gallery-wr-image > img,
.wp-block-gallery.has-nested-images.is-cropped > :not(.ua-gallery-is-expanded) > a.ua-gallery-wr-image > img {
	transition: transform .3s ease;
}

.blocks-gallery-item:not([class*=-expanded]) > figure:hover > a.ua-gallery-wr-image > img,
.gallery-item:not([class*=-expanded]) > .gallery-icon:hover > a.ua-gallery-wr-image > img,
.wp-block-gallery.has-nested-images.is-cropped > :not(.ua-gallery-is-expanded):hover > a.ua-gallery-wr-image > img {
	transform: scale(1.2);
}

.blocks-gallery-item:not([class*=-expanded]) > figure:hover > a.ua-gallery-wr-image,
.gallery-item:not([class*=-expanded]) > .gallery-icon:hover > a.ua-gallery-wr-image,
.wp-block-gallery.has-nested-images.is-cropped > :not(.ua-gallery-is-expanded):hover > a.ua-gallery-wr-image {
	position: relative;
	overflow: hidden;
}

html .wp-block-gallery:not(.has-nested-images) {
  margin-right: -1.1400652%; 
  margin-left: -1.1400652%; 
  max-width: none;
}

.blocks-gallery-item .ua-gallery-content {
    text-align: center;
	padding-right: 1.1400652%; 
	padding-left: 1.1400652%;
}

html ul.blocks-gallery-grid {
	padding: 0px !important;
}

.blocks-gallery-item {
	margin: 5px !important;
}

.ua-media-iframe-toolbar-open a {
	width: 32px !important;
	height: 32px !important;
}

html .gallery, 
html .wp-block-gallery {
	position: relative;
	overflow: visible;
}

html body .gallery .gallery-item.ua-gallery-is-expanded, 
html body .wp-block-gallery .blocks-gallery-item.ua-gallery-is-expanded {
	float: none;
	width: 100%;
	max-width: none !important;
	position: relative;
	overflow: hidden;
}

/* 5.9 */

.wp-block-gallery.has-nested-images > .wp-block-image:not(.ua-gallery-is-expanded) > a.ua-gallery-wr-image {
	position: relative;
	overflow: hidden;
}

html body .wp-block-gallery.has-nested-images > .wp-block-image.ua-gallery-is-expanded {
	
	float: none;
	width: 100% !important;
	max-width: none !important;
	position: relative;
	overflow: hidden;
	margin-left: 0px !important;
	margin-right: 0px !important;
}

/* only the next can be reached */
html body .wp-block-gallery.has-nested-images > .wp-block-image.ua-gallery-is-expanded ~ :not(:last-child){
	margin-right: var(--gallery-block--gutter-size,16px) !important;
}


/* note: a div (ua-gallery-content) is inserted as first child on expanded */
.wp-block-gallery.has-nested-images > .ua-gallery-is-expanded > a.ua-gallery-wr-image {
    display: block;
	padding: 0px;
}



.wp-block-gallery.has-nested-images > .ua-gallery-is-expanded > a.ua-gallery-wr-image > img {
    display: block;
	margin: 0px;
	position: relative;
}

.wp-block-gallery.has-nested-images > .ua-gallery-is-expanded > a.ua-gallery-wr-image > img[data-file-background=""] {
    min-width: 100%;
}

/* special case for Entex theme */
.wp-block-gallery.has-nested-images > .ua-layer-caption.ua-gallery-is-expanded > figcaption {
	padding: 1em;
	padding-top: 6em;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 10.82%, rgba(0, 0, 0, 0.496065) 98.28%) !important; 
	max-height: 100%;
}

.wp-block-gallery.has-nested-images > .ua-gallery-is-expanded .ua-gallery-content {
    text-align: center;
	padding-right: 1.1400652%; 
	padding-left: 1.1400652%;
	padding-bottom: 1.1400652%;
}

.wp-block-gallery.has-nested-images > .ua-gallery-is-expanded .ua-gallery-content h2 {
    margin-top: 1em;
}


/* before 5.9 */
html .gallery-item.ua-gallery-is-expanded > figcaption, 
html .blocks-gallery-item.ua-gallery-is-expanded figcaption {
	display: block;
	/* lets .gallery decide base-color */
	/* color: inherit; */
}

.wp-block-gallery.ua-gallery-is-expanded > ul > li:not(.ua-gallery-is-expanded) {
	max-width: calc(25% - .66667em);
}

html .gallery-item .ua-content,
html .gallery-item .ua-content + *, 
html .blocks-gallery-item .ua-content,
html .blocks-gallery-item .ua-content + * {
	margin-top: 1rem;
}

.gallery-item a.ua-gallery-wr-image, 
.blocks-gallery-item a.ua-gallery-wr-image {

	text-decoration: none;
	display: block;
	margin: 0;
	width: 100%;
	max-width: 100%;
	position: relative;
	overflow: hidden;
	
	background-position: center center;
	background-repeat: no-repeat;
	
	box-shadow: none !important;
	border-radius: 0px !important;

	-webkit-touch-callout: none;

	-webkit-text-size-adjust: none;
	-moz-text-size-adjust: none;
	-ms-text-size-adjust: none;
	-o-text-size-adjust: none;
	text-size-adjust: none;
}

html .gallery-item a:focus, 
html .blocks-gallery-item a:focus {
	outline: none !important;
}

.gallery-item a.ua-gallery-wr-image:after, 
.blocks-gallery-item a.ua-gallery-wr-image:after,
.wp-block-gallery.has-nested-images > .wp-block-image:not(.ua-gallery-is-expanded):not(.ua-layer-caption) > a.ua-gallery-wr-image:after {
	content: " "; 
	display: block; 
	margin: 0px; 
	width: 30px; 
	height: 30px; 
	background-image: url(overlay-corner-zoom.png); 
	background-position: top right; 
	background-repeat: no-repeat; 
	position: absolute; 
	overflow: hidden;
	top: 0px;  
	right: 0px; 
	z-index: 5; 
	opacity: .5; 
}


/* note: this also removes layer caption backgrounds */
.gallery-item.ua-gallery-is-expanded a:after, 
.blocks-gallery-item.ua-gallery-is-expanded a:after {
	display: none !important; 
}

.gallery-item a.ua-gallery-wr-image img {
	display: block;
	margin 0;
	border: none;
	width: 100%;
	height: auto;
	position: relative;
}

.blocks-gallery-item a.ua-gallery-wr-image img {
	display: block;
	margin 0;
	border: none;
	width: 100%;
	position: relative;
}


/* Navigation */

.ua-gallery-gallery-left,
.ua-gallery-gallery-right {
	display: block;
	width: 50px;
	position: absolute;
	top: 0px;
	left: 0px;
	height: 100%;
	/* background-color: rgba(0,0,0,.1); */
	background-position: center center;
	background-repeat: no-repeat;
}

.ua-gallery-gallery-left {
	left: 0px;
	right: auto;
	background-image: url(nav-to-left.png);
}

.ua-gallery-gallery-right {
	left: auto;
	right: 0px;
	background-image: url(nav-to-right.png);
}

.ua-gallery-fn-navigation-hide .ua-gallery-gallery-left,
.ua-gallery-fn-navigation-hide .ua-gallery-gallery-right {
	background-image: none;
}


/* Interaction */

.gallery .ua-gallery-is-loading, 
.post-thumbnail > a.ua-gallery-is-loading:first-child, 
.wp-block-gallery .ua-gallery-is-loading {
	background-color: #ffffff;
	background-image: url(entex-loading.gif);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: auto;
	border: 1px solid #cccccc;
}

html .gallery .ua-gallery-is-error, 
html .wp-block-gallery .ua-gallery-is-error {
	background-color: #ffffff;
	background-image: url(error.png);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: auto;
	border: 1px solid #cccccc;
}



/* CONTENT */
/* Template content */
/* Not tested with Gutenberg galleries - might not occur */

.gallery > :not([class*=expanded]) .post-thumbnail:not(article > .post-thumbnail),
.wp-block-gallery > ul > li.blocks-gallery-item:not([class*=expanded]) .post-thumbnail {
	margin-top: 0px;
}

.gallery .ua-pre-header, 
.wp-block-gallery .ua-pre-header {
	text-align: left;
}

.gallery > :not([class*=expanded]) .ua-pre-header, 
.wp-block-gallery > ul > li.blocks-gallery-item:not([class*=expanded]) .ua-pre-header {
	display: none;
}

@media screen and (min-width: 720px) and (max-width: 979px){
	.gallery > :not([class*=expanded]) .ua-pre-header, 
	.wp-block-gallery > ul > li.blocks-gallery-item:not([class*=expanded]) .ua-pre-header {
		display: block;
	}
}

@media screen and (min-width: 1300px) {
	.ua-main .gallery > :not([class*=expanded]) .ua-pre-header, 
	.ua-main .wp-block-gallery > ul > li.blocks-gallery-item:not([class*=expanded]) .ua-pre-header {
		display: block;
	}
}

.gallery > [class*="expanded"] .ua-pre-header, 
.wp-block-gallery > ul > [class*=expanded] .ua-pre-header {
		margin-top: 2em;
}

.gallery > [class*="expanded"] .post-thumbnail:not(.ua-attachment-post-thumbnail) img[data-file-media="media"], 
.wp-block-gallery > ul > [class*=expanded] .post-thumbnail:not(.ua-attachment-post-thumbnail) img[data-file-media="media"] {
	max-height: 200px;
	min-height: 200px;
}

.gallery > [class*="expanded"] .post-thumbnail.ua-attachment-background img[data-file-media="image"], 
.wp-block-gallery > ul > [class*=expanded] .post-thumbnail.ua-attachment-background img[data-file-media="image"] {
	min-height: 200px;
}

.gallery > [class*="expanded"] .post-thumbnail.ua-attachment-repeat img[data-file-media="image"], 
.wp-block-gallery > ul > [class*=expanded] .post-thumbnail.ua-attachment-repeat img[data-file-media="image"] {
	max-height: 200px;
	min-height: 200px;
}




