/* ============================================================
   photo-consent.css
   Formulár nesúhlasu so zverejnením fotografií (pcm = photo consent modal)
   ============================================================ */

/* ── Trigger tlačidlo pod galériou ── */
.gallery-section__consent-trigger {
  margin-top: 28px;
  text-align: center;
}

.pcm-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 6px 2px;
  cursor: pointer;
  font-size: 0.82rem;
  color: inherit;
  opacity: 0.55;
  transition: opacity 0.2s ease;
  line-height: 1.4;
  font-family: inherit;
}
.pcm-trigger:hover,
.pcm-trigger:focus-visible {
  opacity: 1;
  outline: none;
}
.pcm-trigger__text {
  text-align: left;
  line-height: 1.5;
}
.pcm-trigger__link {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Modal overlay ── */
.pcm {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pcm[hidden] {
  display: none !important;
}

.pcm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ── Dialog box ── */
.pcm__dialog {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 620px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 36px 36px 32px;
  overscroll-behavior: contain;
}
@media (max-width: 600px) {
  .pcm__dialog {
    padding: 24px 18px 28px;
    border-radius: 16px;
    max-height: 95dvh;
  }
}
.pcm__dialog::-webkit-scrollbar { width: 4px; }
.pcm__dialog::-webkit-scrollbar-track { background: transparent; }
.pcm__dialog::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 99px;
}

/* ── Zatváracie tlačidlo ── */
.pcm__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f2f2f2;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.pcm__close:hover { background: #e4e4e4; color: #111; }
.pcm__close:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* ── Typografia ── */
.pcm__eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tc-theme-primary, #7c5c3e);
  margin: 0 0 8px;
}
.pcm__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--tc-heading-color, #111);
  margin: 0 0 10px;
  line-height: 1.3;
  padding-right: 38px;
}
.pcm__desc {
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 4px;
  line-height: 1.65;
}
.pcm__optional {
  font-weight: 400;
  color: #aaa;
  font-size: 0.85em;
}

/* ── Thumbnail grid (krok 1) ── */
.pcm__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 18px 0 6px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}
@media (max-width: 480px) {
  .pcm__grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    max-height: 240px;
  }
}

.pcm__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2.5px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: #ebebeb;
  cursor: pointer;
  transition: border-color 0.14s, transform 0.12s;
  outline: none;
  display: block;
  width: 100%;
}
.pcm__thumb:hover {
  border-color: rgba(0, 0, 0, 0.22);
  transform: scale(1.04);
}
.pcm__thumb:focus-visible {
  border-color: #333;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
.pcm__thumb[aria-pressed="true"] {
  border-color: var(--tc-theme-primary, #333);
}
.pcm__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Checkmark badge */
.pcm__thumb-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: var(--tc-theme-primary, #333);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.14s, transform 0.14s;
  pointer-events: none;
}
.pcm__thumb[aria-pressed="true"] .pcm__thumb-check {
  opacity: 1;
  transform: scale(1);
}

/* ── Footer kroku 1 ── */
.pcm__step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}
.pcm__count {
  font-size: 0.8rem;
  color: #999;
  flex: 1;
  min-width: 0;
}
.pcm__btn-next {
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap;
  padding: 10px 22px !important;
  font-size: 0.9rem !important;
}

/* ── Tlačidlo Späť ── */
.pcm__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.84rem;
  color: #999;
  padding: 0 0 16px 0;
  transition: color 0.15s;
  font-family: inherit;
}
.pcm__back:hover { color: #333; }

/* ── Preview vybraných fotografií (krok 2) ── */
.pcm__selected-preview { margin-bottom: 4px; }
.pcm__preview-label {
  font-size: 0.8rem;
  color: #777;
  margin: 0 0 8px;
  font-weight: 500;
}
.pcm__preview-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.pcm__preview-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--tc-theme-primary, #333);
}

/* ── Formulárové polia v modali ── */
.pcm__dialog .form-grp {
  margin-bottom: 0;
}
.pcm__dialog .form-grp input[type="text"],
.pcm__dialog .form-grp input[type="email"],
.pcm__dialog .form-grp textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid #dee2e6;
  font-size: 0.93rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  background: #fff;
  font-family: inherit;
  color: inherit;
  box-sizing: border-box;
}
.pcm__dialog .form-grp input:focus,
.pcm__dialog .form-grp textarea:focus {
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.07);
  outline: none;
}
.pcm__dialog .form-grp textarea {
  resize: vertical;
  min-height: 110px;
}
.pcm__dialog .text-dark {
  display: block !important;
  font-size: 0.84rem;
  margin-bottom: 6px;
  font-weight: 500;
  color: #444;
}
.pcm__dialog .field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #b00020;
}

/* ── Výsledková správa ── */
.pcm__result {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.pcm__result--success {
  background: #edf7ed;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
}
.pcm__result--error {
  background: #fdecea;
  color: #7f1d1d;
  border: 1px solid #f5c6cb;
}

/* Prázdna mriežka */
.pcm__empty {
  font-size: 0.85rem;
  color: #aaa;
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 0;
}
