.tp-lightbox-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.tp-lightbox-overlay.tp-open {
  display: flex;
}
.tp-lightbox-dialog {
  position: relative;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tp-lightbox-image {
  max-width: 95vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid #6f6f6f;
}
.tp-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.tp-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 54px;
  /* width: 54px;
  height: 54px; */
  border-radius: 999px;
  cursor: pointer;
  font-size: 26px;
  /* line-height: 52px; */
  text-align: center;
  z-index: 2;
}
.tp-lightbox-prev {
  left: 10px;
}
.tp-lightbox-next {
  right: 10px;
}
@media (max-width: 640px) {
  .tp-lightbox-prev {
    left: 8px;
  }
  .tp-lightbox-next {
    right: 8px;
  }
  .tp-lightbox-close {
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    font-size: 28px;
  }
}

.tp-lightbox-info {
  display: inline-block;
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  width: 80%;
}

.tp-lightbox-card {
  padding: 5px;
}

.tp-lightbox-card::before {
  display: none !important;
}

.tp-lightbox-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.tp-lightbox-date {
  border-bottom: 1px solid #eeeeee;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.tp-lightbox-meta .tp-lightbox-date {
  flex: 1 1 auto;
  border-bottom: 0;
  margin: 0;
  padding: 0 0 6px;
}

.tp-lightbox-info-toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(36, 48, 61, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #24303d;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.tp-lightbox-caption-wrap {
  overflow: hidden;
  max-height: 50vh;
  opacity: 1;
  transition: max-height 260ms ease, opacity 220ms ease, margin-top 220ms ease;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.tp-lightbox-info.is-collapsed .tp-lightbox-caption-wrap {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.tp-lightbox-info.is-expanded .tp-lightbox-caption-wrap {
  margin-top: 6px;
}

.tp-lightbox-caption {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.tp-lightbox-caption > :first-child {
  margin-top: 0;
}

.tp-lightbox-caption > :last-child {
  margin-bottom: 0;
}

/* Move caption slightly up when date is present */
.tp-lightbox-date + .tp-lightbox-caption {
  bottom: 44px;
}

/* === Travel Gallery layouts === */
.tp-gallery-block.tp-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  align-items: stretch;
  grid-auto-flow: dense;
  grid-auto-rows: 140px;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}
.tp-gallery-block.tp-view-grid .tp-tile {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.tp-gallery-block.tp-view-grid .tp-tile.is-portrait {
  grid-row: span 2;
}

.tp-gallery-block.tp-view-grid .tp-tile > img {
  display: block;
  width: 100%;
  height: 100%;
}
.tp-gallery-block.tp-view-grid .tp-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Masonry via CSS columns (order is column-flow) */
.tp-gallery-block.tp-view-masonry {
  column-width: 220px;
  column-gap: 8px;
}
.tp-gallery-block.tp-view-masonry .tp-tile {
  position: relative;
  break-inside: avoid;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 4px;
}

.tp-gallery-block svg {
  left: 7px;
  top: 7px;
  position: absolute;
}

.tp-gallery-maplink {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 38px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 2;
  color: #ffffff;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.26));
  transform-origin: 50% 100%;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.tp-gallery-maplink::before {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 36'%3E%3Cdefs%3E%3Cfilter id='s' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.2' flood-color='%23000' flood-opacity='0.25'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M12 2C8 2 5 5 5 9c0 6 7 15 7 15s7-9 7-15c0-4-3-7-7-7z' fill='%23b6171e' filter='url(%23s)'/%3E%3Cpath d='M12 3.25C8.72 3.25 6.25 5.72 6.25 9c0 4.74 4.59 10.82 5.75 12.27C13.16 19.82 17.75 13.74 17.75 9c0-3.28-2.47-5.75-5.75-5.75z' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.8' fill='%23ffffff'/%3E%3C/svg%3E");
  pointer-events: none;
}

.tp-gallery-maplink:hover,
.tp-gallery-maplink:focus-visible {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
}

.tp-gallery-maplink:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.tp-gallery-maplink svg {
  display: none;
}
.tp-gallery-block.tp-view-masonry .tp-tile > a,
.tp-gallery-block.tp-view-masonry .tp-tile > img {
  display: block;
}
.tp-gallery-block.tp-view-masonry .tp-tile img {
  width: 100%;
  height: auto;
  display: block;
}

.tp-gallery-block.tp-view-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tp-gallery-block.tp-view-list .tp-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.tp-gallery-block.tp-view-list .tp-list-thumb {
  flex: 0 0 var(--tp-list-image-width, 40%);
  max-width: var(--tp-list-image-width, 40%);
  min-width: 0;
}

.tp-gallery-block.tp-view-list .tp-list-content {
  flex: 1 1 auto;
  min-width: 0;
}

.tp-gallery-block.tp-view-list .tp-list-side {
  flex: 0 0 var(--tp-list-map-width, 220px);
  max-width: var(--tp-list-map-width, 220px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-gallery-block.tp-view-list .tp-list-thumb-media,
.tp-gallery-block.tp-view-list .tp-list-map-frame {
  border-radius: 8px;
  overflow: hidden;
}

.tp-gallery-block.tp-view-list .tp-list-thumb-link {
  display: block;
  text-decoration: none;
}

.tp-gallery-block.tp-view-list .tp-list-thumb-image {
  display: block;
  width: 100%;
  height: var(--tp-list-media-height, 260px);
  object-fit: cover;
}

.tp-gallery-block.tp-view-list .tp-list-thumb-media.is-portrait .tp-list-thumb-image {
  height: var(--tp-list-portrait-height, var(--tp-list-media-height, 260px));
  object-fit: cover;
  transform: scaleY(1.2);
  transform-origin: center center;
}

.tp-gallery-block.tp-view-list .tp-list-map-frame {
  display: block;
  width: 100%;
  height: var(--tp-list-media-height, 260px);
  border: 0;
}

.tp-gallery-block.tp-view-list .tp-list-side.has-button .tp-list-map-frame {
  height: calc(var(--tp-list-media-height, 260px) - 44px);
}

.tp-gallery-block.tp-view-list .tp-list-date {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.3;
}

.tp-gallery-block.tp-view-list .tp-list-desc > :first-child {
  margin-top: 0;
}

.tp-gallery-block.tp-view-list .tp-list-desc > :last-child {
  margin-bottom: 0;
}

.tp-gallery-block.tp-view-list .tp-list-map-button {
  width: 100%;
}

.tp-google-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--tp-google-map-button-border, var(--wp--preset--color--accent, #17201c));
  border-radius: 999px;
  background: var(--tp-google-map-button-background, var(--wp--preset--color--accent, #17201c));
  color: var(--tp-google-map-button-text, var(--wp--preset--color--white, #ffffff));
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-sizing: border-box;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.tp-google-map-button:visited {
  color: var(--tp-google-map-button-text, var(--wp--preset--color--white, #ffffff));
  border-color: var(--tp-google-map-button-border, var(--wp--preset--color--accent, #17201c));
  background: var(--tp-google-map-button-background, var(--wp--preset--color--accent, #17201c));
}

.tp-google-map-button:hover,
.tp-google-map-button:focus-visible {
  background: var(--tp-google-map-button-background-hover, var(--wp--preset--color--ink, #1f2321));
  border-color: var(--tp-google-map-button-border-hover, var(--wp--preset--color--ink, #1f2321));
  color: var(--tp-google-map-button-text, var(--wp--preset--color--white, #ffffff));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.tp-google-map-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.tp-google-map-button:active {
  transform: translateY(1px);
}

@media (max-width: 900px) {
  .tp-gallery-block.tp-view-list .tp-list-item {
    flex-direction: column;
  }

  .tp-gallery-block.tp-view-list .tp-list-thumb,
  .tp-gallery-block.tp-view-list .tp-list-side {
    flex-basis: auto;
    max-width: 100%;
    width: 100%;
  }
}

.tp-gallery-pagination {
  margin: 18px 0 0;
}
.tp-gallery-pagination ul.page-numbers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.tp-gallery-pagination .page-numbers {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  text-decoration: none;
}
.tp-gallery-pagination a.page-numbers:hover {
  border-color: #2271b1;
}

/* Hover tooltip for tile views */
.tp-gallery-tooltip {
  position: fixed;
  z-index: 100050;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  pointer-events: none;
}

.tp-gallery-tooltip-card {
  max-width: min(360px, 85vw);
}
.tp-gallery-tooltip-date,
.tp-gallery-tooltip-card .tp-preview-date {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  margin: 0 0 6px;
}
.tp-gallery-tooltip-desc,
.tp-gallery-tooltip-card .tp-preview-note {
  font-size: 13px;
  line-height: 1.25;
  opacity: 0.95;
  white-space: pre-wrap;
}
