/* Nagyítható képek + letöltés - kiegészítés az archivált tehetseg.hu oldalhoz */

img.th-zoomable,
a.th-zoomable {
  cursor: zoom-in !important;
}

body.th-lb-open {
  overflow: hidden !important;
}

/* Galéria letöltés gomb */
.th-gallery-dl {
  margin: 10px 0 4px;
  font-family: Arial, Helvetica, sans-serif;
}

.th-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 1px solid #0b6b3a;
  border-radius: 6px;
  background: #0b6b3a;
  color: #fff !important;
  font: 600 14px/1.25 Arial, Helvetica, sans-serif;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.th-btn:hover,
.th-btn:focus {
  background: #09552e;
  border-color: #09552e;
  color: #fff !important;
}

.th-btn[disabled] {
  opacity: .6;
  cursor: progress;
}

.th-btn-secondary {
  background: #fff;
  border-color: #0b6b3a;
  color: #0b6b3a !important;
}

.th-btn-secondary:hover,
.th-btn-secondary:focus {
  background: #eef7f1;
  color: #09552e !important;
}

.th-btn-small {
  padding: 7px 12px;
  font-size: 13px;
}

/* Oldal alján megjelenő letöltő sáv */
.th-dlbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-sizing: border-box;
  margin: 26px 0 10px;
  padding: 16px 18px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #f5f7f5;
  font-family: Arial, Helvetica, sans-serif;
}

.th-dlbar-text strong {
  display: block;
  margin-bottom: 3px;
  color: #222;
  font-size: 16px;
  line-height: 1.3;
}

.th-dlbar-text span {
  color: #555;
  font-size: 13px;
  line-height: 1.4;
}

.th-dlbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Lightbox */
.th-lb {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 12, .95);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.th-lb[hidden] {
  display: none !important;
}

.th-lb-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  padding: 10px 58px 10px 16px;
  background: rgba(0, 0, 0, .55);
}

.th-lb-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.th-lb-count {
  flex: 0 0 auto;
  color: #bbb;
  font-size: 12px;
  white-space: nowrap;
}

.th-lb-dl,
.th-lb-openlink {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid #0b6b3a;
  border-radius: 5px;
  background: #0b6b3a;
  color: #fff !important;
  font: 600 13px/1.2 Arial, Helvetica, sans-serif;
  text-decoration: none !important;
  white-space: nowrap;
}

.th-lb-openlink {
  background: transparent;
  border-color: #777;
  color: #ddd !important;
}

.th-lb-dl:hover,
.th-lb-dl:focus,
.th-lb-openlink:hover,
.th-lb-openlink:focus {
  filter: brightness(1.15);
}

.th-lb-close {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font: 400 28px/40px Arial, Helvetica, sans-serif;
  text-align: center;
  cursor: pointer;
}

.th-lb-close:hover,
.th-lb-close:focus {
  background: rgba(255, 255, 255, .25);
}

.th-lb-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 10px 64px 22px;
}

.th-lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, .65);
}

.th-lb-prev,
.th-lb-next {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font: 400 42px/64px Arial, Helvetica, sans-serif;
  text-align: center;
  cursor: pointer;
  transform: translateY(-50%);
}

.th-lb-prev {
  left: 10px;
}

.th-lb-next {
  right: 10px;
}

.th-lb-prev:hover,
.th-lb-next:hover,
.th-lb-prev:focus,
.th-lb-next:focus {
  background: rgba(255, 255, 255, .28);
}

.th-lb-prev[hidden],
.th-lb-next[hidden] {
  display: none;
}

.th-lb-error {
  padding: 20px;
  color: #ffb4b4;
  font-size: 14px;
  text-align: center;
}

/* Értesítés / folyamatjelző */
.th-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 2147483647;
  max-width: min(620px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(20, 20, 20, .94);
  color: #fff;
  box-shadow: 0 6px 26px rgba(0, 0, 0, .35);
  font: 500 14px/1.4 Arial, Helvetica, sans-serif;
  text-align: center;
  transform: translateX(-50%);
}

.th-toast[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .th-lb-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding-right: 56px;
  }

  .th-lb-title {
    flex-basis: 100%;
  }

  .th-lb-stage {
    padding: 8px 10px 14px;
  }

  .th-lb-prev,
  .th-lb-next {
    width: 38px;
    height: 54px;
    font-size: 34px;
    line-height: 54px;
  }

  .th-lb-prev {
    left: 4px;
  }

  .th-lb-next {
    right: 4px;
  }

  .th-dlbar {
    flex-direction: column;
    align-items: stretch;
  }

  .th-dlbar-actions {
    flex-direction: column;
  }
}
