/* Lightbox */
.thb-lightbox-button {
  cursor: pointer;
  padding: 10px;
  border: 1px solid $border;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
  margin-bottom: 30px;
  @extend .mid-transition;
  .thb-lightbox-thumbs {
    line-height: 0;
  }
  .thb-lightbox-thumb {
    display: inline-flex;
    width: 90px;
    margin-right: 4px;
    max-width: calc(50% - 11px);
    img {
      @extend .object-fit;
    }
    @include max-break($break-small) {
      max-width: 100%;
    }
    &:nth-child(3),
    &:nth-child(4) {
      @include max-break($break-small) {
        display: none;
      }
    }
    &.remaining {
      position: relative;

      span {
        position: absolute;
        background: rgba($black,0.8);
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #fff;
        font-weight: 600;
        font-size: 24px;
      }
    }
  }
  .thb-lightbox-text {
    font-size: 12px;
    text-transform: uppercase;
    @include min-break($break-small) {
      margin-right: 20px;
    }

  }
  &:hover {
    border-color: $accent;
    background: rgba($accent, 0.05);
  }
}

.post-gallery-lightbox {
	padding: 0;

	.mfp-container {
		padding: 0;
	}
	.mfp-content {
		height: 100vh;
		max-height: 100vh;
		overflow: scroll;
		@include min-break($break-small) {
			overflow: hidden;
		}

		.admin-bar & {
      @extend .admin-style;
			height: calc(100vh - 46px);
			@media screen and (min-width: 783px){
			  height: calc(100vh - 32px);
			}
		}
	}
	.mfp-arrow {
		display: none;
	}
}
.post-gallery-content {
	min-height: 100%;
	display: flex;
	flex-direction: column;

  @include min-break($break-small) {
    max-height: 100vh;
  }
	.mfp-close {
		display: none;
	}
  &.lightbox-light {
    background: #fff;
  }
	// Header
	.lightbox-header {
		background: #fff;
		padding: 10px 0;
		width: 100%;
		flex-shrink: 0;
		.logolink {
			display: block;

			.logoimg {
				max-height: 40px;
			}
		}
		.lightbox-header-button {
			display: inline-flex;
			border: 0;
			outline: 0;
			background: none;
			cursor: pointer;

			svg {
				width: 40px;
			}
			& + button {
				margin-left: 20px;
			}
		}
		.columns {
			display: flex;
			align-items: center;

			&.center-column {
				justify-content: center;
			}
			&.close-column {
				justify-content: flex-end;
			}
		}
	}

	// Arrows
	.thb-gallery-arrow {
    display: block;
    width: 40px;
    height: 40px;
    margin: -20px 0 0;
    border-radius: 50%;
    border: 1px solid $border;
    cursor: pointer;
    @extend .linear-mid-transition;
    svg {
      width: 40px;
      height: 40px;
      position: relative;
      left: -1px;
      top: -1px;
      pointer-events: none;
    }
    .thb-arrow-first,
    .thb-arrow-second {
      @extend .linear-mid-transition;
    }
    .thb-arrow-second {
      @include translateX(30px);
    }
    &.mfp-arrow-right {
      .thb-arrow-second {
        @include translateX(-30px);
      }
      &:hover {
        .thb-arrow-first {
          @include translateX(30px);
        }
        .thb-arrow-second {
          @include translateX(0px);
        }
      }
    }
    &.mfp-arrow-left {
      .thb-arrow-second {
        @include translateX(30px);
      }
      &:hover {
        .thb-arrow-first {
          @include translateX(-30px);
        }
        .thb-arrow-second {
          @include translateX(0px);
        }
      }
    }
    &:hover {
      border-color: $black;
    }
	}

	// Content
	.thb-content-row {

		@include min-break($break-small) {
      flex-flow: row;
			height: 100%;
      flex: 1;
      max-height: calc(100vh - 70px);
		}
		.columns {
			height: auto;

			&.image {
				padding: 0;
				display: flex;
				justify-content: center;
				align-items: center;
				position: relative;
        overflow: hidden;
				@include min-break($break-small) {
					padding: 3%;
          max-height: 100%;
				}

				&.gridActive {
          .thb-pin-it-container,
					.attachment-full,
          .attachment-theissue-full-x2,
          >img {
						display: none;
					}
					.thb-gallery-grid {
						display: block;
						overflow-x: hidden;
						overflow-y: scroll;
					}
					.thb-gallery-arrow {
						display: none;
					}
				}
        .thb-pin-it-container {
					height: 100%;
					width: 100%;
					display: block;
				}
        >img {
          height: 100%;
          width: 100%;
          display: block;
          object-fit: contain;
        }
        .thb-pinned {
          height: 100%;
          width: 100%;
          margin: 0 auto;
          width: auto;
					display: block;
					object-fit: contain;
				}
				.thb-gallery-arrow {
          position: absolute;
          top: 50%;
					&.mfp-arrow-left {
						left: 15px;

						@include min-break($break-small) {
							left: 25px;
						}
					}
					&.mfp-arrow-right {
						right: 15px;

						@include min-break($break-small) {
							right: 25px;
						}
					}
				}
			}
			&.image-text {
				padding: 3%;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				@include min-break($break-small) {
					overflow-x: hidden;
					overflow-y: scroll;
				}

				h6 {
					color: #fff;
				}
				p {
					font-size: 14px;
					color: #cfcfcf;

          >a {
            text-decoration: underline;
          }
				}
				small {
					font-size: 12px;
					color: #767676;
				}
			}
		}
	}

	// Grid
	.thb-gallery-grid {
		width: 100%;
		padding: 15px;
		display: none;

    @include min-break($break-small) {
      padding: 0;
      position: absolute;
  		top: 3%;
  		left: 3%;
  		width: 94%;
  		height: 94%;
    }
		.thb-grid-image {
			position: relative;
			margin: 0 0 20px;
			background: #000;
			@include min-break($break-small) {
				margin: 0 0 30px;
			}
			&:hover {
				img {
					opacity: 0.9;
				}
			}
			img {
				width: 100%;
				height: 100%;
				object-fit: contain;
				@extend .quick-transition;
			}
			.thb-grid-count {
				position: absolute;
				top: 0;
				left: 0;
				z-index: 20;
				width: 30px;
				height: 30px;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 18px;
				font-weight: 700;
				color: #fff;
				@include min-break($break-small) {
					width: 70px;
					height: 70px;
				}
			}
		}
	}

	// dark
	&.lightbox-dark {
		background: #0a0a0a;

		.thb-gallery-arrow {
			background: transparent;
			border: 1px solid rgba(#fff,0.4);

			svg {
				fill: #fff;
			}
			&:hover {
				border-color: #fff;
			}
		}
		.lightbox-header {
			background: #0a0a0a;

			.close-column {
				svg {
					fill: #fff;
				}
				svg g {
					stroke: #fff;
				}
			}
		}
		.thb-content-row .columns.image-text {
			background: #131313;
		}
	} //.lightbox-dark
	&.lightbox-style2 {
		.lightbox-header {
			padding: 0;
			border-bottom: 1px solid rgba(#000,0.15);

			.columns {
				padding: 0;

				.logolink {
					padding: 10px 0;
					margin-left: 10px;

					@include min-break($break-small) {
						margin-left: 15px;
					}
				}
			}
			h5 {
				display: none;
				margin: 0 0 0 20px;
				font-size: 18px;
				font-weight: 600;

				@include min-break($break-small) {
					display: block;
				}
			}
			.meta {
				display: flex;
				align-items: center;
				font-size: 18px;
				font-weight: 600;
				margin-right: 18px;
				em {
					display: inline-flex;
					margin: 0 4px;
					font-size: 12px;
					font-weight: 400;
					font-style: normal;
				}
			}
			.lightbox-header-button {
				width: 70px;
				height: 70px;
				justify-content: center;
				align-items: center;
				margin: 0;
				border-left: 1px solid rgba(#000,0.15);
			}
		}
		.thb-content-row {
			background: #fff;

			.columns.image-text {
				background: transparent;
				border-left: 1px solid rgba(#000,0.15);
			}
		}
		&.lightbox-dark {
			.thb-content-row {
				background: #0a0a0a;

				.columns.image-text {
					background: transparent;
					border-left-color: rgba(#fff,0.18);
				}
			}
			.lightbox-header {
				border-color: rgba(#fff,0.18);
				h5, .meta {
					color: #fff;
				}
				.lightbox-header-button {
					border-color: rgba(#fff,0.18);
				}
			}
		}
		&.lightbox-light {
			.thb-content-row .columns.image-text {
				h5, h6 {
					color: #000;
				}
				p {
					color: rgba(#000,0.8);
				}
				small {
					color: rgba(#000,0.5);
				}
			}
		}
	} //.lightbox-style2
}

/* Smart Lists */
.smart-list {
  .smart-list-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;

    .smart-list-count {
      background: $accent;
      color: #fff;
      display: flex;
      flex-shrink: 0;
      justify-content: center;
      align-items: center;
      line-height: 1;
      font-size: 16px;
      font-weight: 600;
      width: 44px;
      height: 44px;
      margin-right: 15px;
    }
    h5 {
      margin: 0;
    }
  }
  .thb-smart-list-image {
    display: block;
    line-height: 1;
    margin-bottom: 40px;
    >a {
      display: block;
    }
  }
  .thb-smart-list-content {
    margin-bottom: 50px;

    *:last-child {
      margin: 0;
    }
    p {
      font-size: 16px;
      margin-bottom: 10px;
      >a {
        text-decoration: underline;
      }
    }
    .source {
      text-transform: uppercase;
      font-size: 10px;
      opacity: 0.7;
    }
  }
  h5 {
    font-weight: 500;
    font-size: 18px;
  }
  &.smart-list-v1 {
    .smart-list-item {
      padding-bottom: 40px;
      border-bottom: 1px solid $border;
      margin-bottom: 40px;
      .thb-smart-list-image {
        @include min-break($break-small) {
          margin-bottom: 0;
        }
      }
      .thb-smart-list-content {
        margin-bottom: 0;
      }
      &:last-child {
        border-bottom: 0;
        margin-bottom: 0;
      }
    }
  }
  // V2
  &.smart-list-v2 {

    &.row {
      margin-left: 0;
      margin-right: 0;
      padding-left: 0;
      padding-right: 0;
      .columns {
        padding: 0;
      }
    }
    .thb-smart-list-image {
      margin-bottom: 20px;
    }
    .smart-list-title {
      margin-bottom: 10px;
    }
    .thb-smart-list-content {
     margin-bottom: 30px;
    }
    &.bottom-arrows {
      .slick-bottom-arrows {
        left: 0;
        right: 0;
      }
    }

  }
  // V3
  &.smart-list-v3 {
    .thb-smart-list-image {
      position: relative;
    }
    .thb-smart-list-nav {
      display: flex;
      flex-direction: column;
      position: absolute;
      top: 10px;
      left: 10px;
      width: 30px;

      .arrow {
        display: flex;
        justify-content: center;
        align-items: center;
  			width: 30px;
  			height: 30px;
        background: #fff;
        cursor: pointer;
        @extend .quick-transition;
        svg {
          height: 30px;
  				height: 30px;
          @include rotateZ(90);
  				@extend .linear-quick-transition;
        }
        &.visually-hidden {
          visibility: hidden;
        }
  			&.to_top {

  			} //.to_top
  			&.to_bottom {
          margin-top: 1px;
  			} // .to_bottom
        &:not(.disabled):hover {
          background: $accent;
          svg {
            fill: #fff;
          }
        }
        &.disabled {
          opacity: 0.4;
          cursor: not-allowed;
        }
      } //.arrow
    }
    .thb-smart-list-content {
      display: flex;
      .smart-list-count {
        width: 55px;
        flex-shrink: 0;
        font-size: 11px;
        line-height: 18px;
      }
    }
  } // .smart-list-v3
}