/*
|--------------------------------------------------------------------------
| Admin News Gallery
|--------------------------------------------------------------------------
*/

#pajhwok-news-gallery-admin {
  width: 100%;
}

#pajhwok-news-gallery-admin * {
  box-sizing: border-box;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-admin__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-admin__count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0f0f1;
  color: #50575e;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-preview-wrap {
  width: 100%;
  min-height: 74px;
  margin-top: 10px;
  padding: 8px;
  border: 1px dashed #c3c4c7;
  border-radius: 4px;
  background: #fbfbfc;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-empty {
  display: none;
  margin: 0;
  padding: 12px 8px;
  color: #646970;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-empty.is-visible {
  display: block;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-item {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 5px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #fff;
  cursor: move;
  overflow: hidden;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-item:hover {
  border-color: #8c8f94;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-item__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 3px;
  background: #f0f0f1;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-item__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 4px;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-item__id {
  display: inline-block;
  max-width: 42px;
  overflow: hidden;
  color: #646970;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-remove {
  font-size: 10px;
  line-height: 1.2;
  text-decoration: none;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-remove:hover {
  color: #b32d2e;
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-sortable-placeholder {
  min-height: 88px;
  border: 1px dashed #2271b1;
  border-radius: 4px;
  background: rgba(34, 113, 177, 0.08);
}

#pajhwok-news-gallery-admin .pajhwok-news-gallery-admin__description {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 782px) {
  #pajhwok-news-gallery-admin .pajhwok-news-gallery-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/*
|--------------------------------------------------------------------------
| Lead Slider
|--------------------------------------------------------------------------
*/

.pjw-lead-slider {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.pjw-lead-slider__article-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
}

.pjw-lead-slider__track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pjw-lead-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.65s ease,
    visibility 0.65s ease;
}

.pjw-lead-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.pjw-lead-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pjw-lead-slider__counter {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.pjw-lead-slider__dots {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.pjw-lead-slider__dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.pjw-lead-slider__dot.is-active {
  width: 24px;
  background: #fff;
}

/*
|--------------------------------------------------------------------------
| News Single Media
|--------------------------------------------------------------------------
*/

.pjw-news-single-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #e5e7eb;
}

.pjw-news-single-media__link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.pjw-news-single-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
|--------------------------------------------------------------------------
| News Mosaic Gallery
|--------------------------------------------------------------------------
*/

.pjw-news-mosaic {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  gap: 4px;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: inherit;
}

.pjw-news-mosaic button {
  font-family: inherit;
}

.pjw-news-mosaic__item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: #e5e7eb;
  overflow: hidden;
  cursor: pointer;
}

.pjw-news-mosaic__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 0.2s ease,
    transform 0.28s ease;
}

.pjw-news-mosaic__item:hover img,
.pjw-news-mosaic__item:focus img {
  opacity: 0.9;
  transform: scale(1.025);
}

.pjw-news-mosaic--count-2 {
  grid-template-columns: 1.35fr 0.85fr;
  grid-template-rows: 1fr;
}

.pjw-news-mosaic--count-2 .pjw-news-mosaic__item--main {
  grid-column: 1;
  grid-row: 1;
}

.pjw-news-mosaic--count-2 .pjw-news-mosaic__item--thumb {
  grid-column: 2;
  grid-row: 1;
}

.pjw-news-mosaic--count-3 {
  grid-template-columns: 1.45fr 0.8fr;
  grid-template-rows: 1fr 1fr;
}

.pjw-news-mosaic--count-3 .pjw-news-mosaic__item--main {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.pjw-news-mosaic--count-3 .pjw-news-mosaic__item--thumb:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

.pjw-news-mosaic--count-3 .pjw-news-mosaic__item--thumb:nth-of-type(3) {
  grid-column: 2;
  grid-row: 2;
}

.pjw-news-mosaic--count-4 {
  grid-template-columns: 1.6fr 0.75fr;
  grid-template-rows: 1fr 1fr 1fr;
}

.pjw-news-mosaic--count-4 .pjw-news-mosaic__item--main {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.pjw-news-mosaic--count-4 .pjw-news-mosaic__item--thumb:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

.pjw-news-mosaic--count-4 .pjw-news-mosaic__item--thumb:nth-of-type(3) {
  grid-column: 2;
  grid-row: 2;
}

.pjw-news-mosaic--count-4 .pjw-news-mosaic__item--thumb:nth-of-type(4) {
  grid-column: 2;
  grid-row: 3;
}

[dir='rtl'] .pjw-news-mosaic--count-2,
.is-rtl .pjw-news-mosaic--count-2,
[dir='rtl'] .pjw-news-mosaic--count-3,
.is-rtl .pjw-news-mosaic--count-3,
[dir='rtl'] .pjw-news-mosaic--count-4,
.is-rtl .pjw-news-mosaic--count-4 {
  direction: rtl;
}

.pjw-news-mosaic__more {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.pjw-feature-pro__media .pjw-news-mosaic,
.pjw-feature-pro__media.pjw-news-single-media {
  height: 100%;
  min-height: 100%;
  border-radius: inherit;
}

.pjw-feature-pro__media.pjw-news-single-media img {
  border-radius: inherit;
}

.pjw-feature-pro__side-card .pjw-news-mosaic__more,
.pjw-feature-pro__grid-card .pjw-news-mosaic__more {
  font-size: 20px;
}

/*
|--------------------------------------------------------------------------
| Fullscreen Gallery Lightbox
|--------------------------------------------------------------------------
*/

html.pjw-gallery-lightbox-open,
body.pjw-gallery-lightbox-open {
  overflow: hidden;
}

.pjw-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  background: #000;
  color: #fff;
}

.pjw-gallery-lightbox.is-open {
  display: block;
}

.pjw-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: #000;
}

.pjw-gallery-lightbox__dialog {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pjw-gallery-lightbox__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

.pjw-gallery-lightbox__count {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.pjw-gallery-lightbox__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pjw-gallery-lightbox__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.pjw-gallery-lightbox__icon:hover,
.pjw-gallery-lightbox__icon:focus {
  background: rgba(255, 255, 255, 0.24);
}

.pjw-gallery-lightbox__figure {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100vw, 1600px);
  height: 100vh;
  margin: 0;
  padding: 70px 80px 58px;
}

.pjw-gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.pjw-gallery-lightbox__caption {
  display: none;
  max-width: 980px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.pjw-gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 12;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 70px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.pjw-gallery-lightbox__nav:hover,
.pjw-gallery-lightbox__nav:focus {
  background: rgba(255, 255, 255, 0.18);
}

.pjw-gallery-lightbox__nav--prev {
  left: 18px;
}

.pjw-gallery-lightbox__nav--next {
  right: 18px;
}

@media (max-width: 767.98px) {
  .pjw-news-mosaic {
    gap: 3px;
  }

  .pjw-news-mosaic__more {
    font-size: 22px;
  }

  .pjw-gallery-lightbox__figure {
    padding: 64px 48px 44px;
  }

  .pjw-gallery-lightbox__nav {
    width: 38px;
    height: 58px;
    font-size: 44px;
  }

  .pjw-gallery-lightbox__nav--prev {
    left: 6px;
  }

  .pjw-gallery-lightbox__nav--next {
    right: 6px;
  }

  .pjw-gallery-lightbox__topbar {
    padding: 9px 12px;
  }

  .pjw-gallery-lightbox__icon {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
}
