.gwtfg-wrap {
  width: 100%;
  margin: 24px 0;
}
.gwtfg-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.75);
}
.gwtfg-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.gwtfg-field select,
.gwtfg-field input[type="date"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}
.gwtfg-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gwtfg-button,
.gwtfg-reset {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 700;
  cursor: pointer;
}
.gwtfg-button {
  background: #111;
  color: #fff;
}
.gwtfg-reset {
  background: rgba(0,0,0,.08);
  color: #111;
}
.gwtfg-status {
  min-height: 22px;
  font-size: 14px;
  opacity: .8;
  margin-bottom: 8px;
}
.gwtfg-grid {
  display: grid;
  grid-template-columns: repeat(var(--gwtfg-columns, 4), minmax(0, 1fr));
  gap: 18px;
  opacity: 1;
  transition: opacity .18s ease;
}
.gwtfg-wrap.is-loading .gwtfg-grid {
  opacity: .45;
}
.gwtfg-card {
  margin: 0;
}
.gwtfg-card-button {
  display: block;
  white-space: normal !important;
  width: 100%;
  border: 0;
  padding: 0;
  text-align: left;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  cursor: pointer;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.gwtfg-card-button:hover,
.gwtfg-card-button:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(185, 137, 49, .45);
  outline: none;
  background: #b98a31 !important;
  color: #fff !important;
}
.gwtfg-card-button:hover .gwtfg-title,
.gwtfg-card-button:focus .gwtfg-title,
.gwtfg-card-button:hover .gwtfg-date,
.gwtfg-card-button:focus .gwtfg-date,
.gwtfg-card-button:hover .gwtfg-folder,
.gwtfg-card-button:focus .gwtfg-folder {
  color: #fff;
}
.gwtfg-card-button:hover .gwtfg-count,
.gwtfg-card-button:focus .gwtfg-count {
  background: #b98a31 !important;
  color: #fff !important;
}
.gwtfg-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: rgba(0,0,0,.06);
  overflow: hidden;
}
.gwtfg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.gwtfg-card-button:hover .gwtfg-image {
  transform: scale(1.04);
}
.gwtfg-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(0,0,0,.45);
}
.gwtfg-content {
  display: block;
  padding: 14px;
}
.gwtfg-title {
  display: block;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.28;
  margin-bottom: 8px;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  word-break: normal;
}
.gwtfg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  opacity: .72;
  margin-bottom: 8px;
}
.gwtfg-terms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.gwtfg-terms span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.07);
  font-size: 12px;
  font-weight: 700;
}
.gwtfg-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 14px;
  background: rgba(0,0,0,.05);
  text-align: center;
}
.gwtfg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}
.gwtfg-lightbox.is-open {
  display: block;
}
.gwtfg-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.86);
}
.gwtfg-lightbox-dialog {
  position: absolute;
  inset: 30px;
  display: grid;
  place-items: center;
}
.gwtfg-lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.gwtfg-lightbox-close,
.gwtfg-lightbox-prev,
.gwtfg-lightbox-next {
  position: absolute;
  border: 0;
  color: #fff;
  background: rgba(255,255,255,.16);
  cursor: pointer;
  border-radius: 999px;
  z-index: 2;
}
.gwtfg-lightbox-close {
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  font-size: 32px;
  line-height: 38px;
}
.gwtfg-lightbox-prev,
.gwtfg-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  font-size: 44px;
  line-height: 54px;
}
.gwtfg-lightbox-prev { left: 0; }
.gwtfg-lightbox-next { right: 0; }
.gwtfg-lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0,0,0,.42);
  border-radius: 999px;
  padding: 8px 14px;
  max-width: 90vw;
  text-align: center;
}

@media (max-width: 1200px) {
  .gwtfg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .gwtfg-filters {
    grid-template-columns: 1fr 1fr;
  }
  .gwtfg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .gwtfg-filters,
  .gwtfg-grid {
    grid-template-columns: 1fr;
  }
  .gwtfg-lightbox-dialog {
    inset: 16px;
  }
  .gwtfg-lightbox-prev,
  .gwtfg-lightbox-next {
    width: 42px;
    height: 54px;
  }
}
.gwtfg-media {
  position: relative;
}
.gwtfg-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.gwtfg-collection {
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: none;
}
.gwtfg-collection.is-open {
  display: block;
}
.gwtfg-collection-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
}
.gwtfg-collection-dialog {
  position: absolute;
  inset: 36px;
  display: flex;
  flex-direction: column;
  max-width: 1180px;
  margin: 0 auto;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(0,0,0,.45);
}
.gwtfg-collection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0,0,0,.1);
}
.gwtfg-collection-title {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  color: #111;
}
.gwtfg-collection-count {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(0,0,0,.6);
  font-weight: 700;
}
.gwtfg-collection-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  color: #111;
  font-size: 30px;
  line-height: 36px;
  cursor: pointer;
}
.gwtfg-collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  overflow: auto;
}
.gwtfg-collection-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(0,0,0,.06);
  cursor: pointer;
}
.gwtfg-collection-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease, opacity .2s ease;
}
.gwtfg-collection-item:hover,
.gwtfg-collection-item:focus {
  box-shadow: 0 0 0 3px #b98a31 !important;
  outline: none;
}
.gwtfg-collection-item:hover img,
.gwtfg-collection-item:focus img {
  transform: scale(1.04);
  opacity: .92;
}
@media (max-width: 900px) {
  .gwtfg-collection-dialog {
    inset: 20px;
  }
  .gwtfg-collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .gwtfg-collection-dialog {
    inset: 10px;
    border-radius: 16px;
  }
  .gwtfg-collection-header {
    padding: 14px;
  }
  .gwtfg-collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }
  .gwtfg-collection-title {
    font-size: 17px;
  }
}

/* v1.4.0: mocniejsze, izolowane style modala zbioru zdjęć — naprawia nakładanie/"paski" miniatur w motywach z globalnymi stylami obrazów i przy bardzo dużych galeriach. */
.gwtfg-collection,
.gwtfg-collection * {
  box-sizing: border-box;
}
.gwtfg-collection-dialog {
  width: min(1180px, calc(100vw - 72px));
  height: calc(100vh - 72px);
}
.gwtfg-collection-grid {
  align-items: start;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.gwtfg-collection-item {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 0 75% 0 !important;
  line-height: 0 !important;
  aspect-ratio: auto !important;
  appearance: none;
  -webkit-appearance: none;
}
.gwtfg-collection-item img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
}
@media (max-width: 900px) {
  .gwtfg-collection-dialog {
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
  }
}
@media (max-width: 560px) {
  .gwtfg-collection-dialog {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
  }
}

/* v1.5.0: czytelne foldery/podfoldery w kafelkach i modalu. */
.gwtfg-folder-paths span {
  background: rgba(0,0,0,.08);
}
.gwtfg-collection-folder {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0,0,0,.66);
  font-weight: 800;
}

/* v1.6.0 */
.gwtfg-gallery-name {
  display: block;
  white-space: normal !important;
  overflow-wrap: anywhere;
  margin-top: -4px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  opacity: .62;
}


/* v2.3.0 - mocny złoty hover, odporny na style motywu/Elementora i cache */
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:hover,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus-visible {
  background-color: #b98a31 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(185, 137, 49, .45) !important;
}
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:hover .gwtfg-content,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus .gwtfg-content,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus-visible .gwtfg-content {
  background-color: #b98a31 !important;
  color: #ffffff !important;
}
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:hover .gwtfg-title,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:hover .gwtfg-folder,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:hover .gwtfg-date,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus .gwtfg-title,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus .gwtfg-folder,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus .gwtfg-date {
  color: #ffffff !important;
}
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:hover .gwtfg-count,
.gwtfg-wrap .gwtfg-card .gwtfg-card-button:focus .gwtfg-count {
  background-color: #111111 !important;
  color: #ffffff !important;
}
.gwtfg-wrap .gwtfg-collection-item:hover,
.gwtfg-wrap .gwtfg-collection-item:focus {
  box-shadow: 0 0 0 3px #b98a31 !important;
}
