/* =========================================================
   Kontrola laku a spár – PHOTO PREVIEW (VIN-style cards)
========================================================= */

.paintgap-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* Karta náhledu – stejné chování jako VIN (.ph) */
.paintgap-preview .ph {
  position: relative;
  width: 280px;
  background: #2c2c34;
  border-radius: 12px;
  padding: 6px 6px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Obrázek */
.paintgap-preview .ph img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  cursor: pointer;
}

/* Klikací wrapper (otevře obrázek v novém tabu) */
.paintgap-preview .ph a {
  display: block;
  width: 100%;
}

/* ===== ✕ REMOVE ===== */
.paintgap-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,0,0,.55);
  z-index: 3;
}

.paintgap-remove:hover {
  background: #e74c3c;
  transform: scale(1.05);
}

/* ===== ◎ MAX BADGE ===== */
.paintgap-max {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,.65);
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: .02em;
}

/* ===== FILE HOLDER (non-image) ===== */
.paintgap-preview .ph .file {
  width: 100%;
  background: #1f2026;
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 13px;
  color: #e5e7eb;
  text-align: left;
  word-break: break-all;
}

.paintgap-preview .ph .file a {
  color: #93c5fd;
  text-decoration: underline;
}

/* ===== LABEL CHIP (název souboru) ===== */
.paintgap-labelchip {
  margin-top: 6px;
  max-width: 100%;
  font-size: 12px;
  color: #d1d5db;
  background: #1f2026;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== HOVER EFEKT ===== */
.paintgap-preview .ph:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.65);
}

.paintgap-preview .ph img {
  cursor: zoom-in;
}

/* ==========================
   MOBIL: Fotodokumentace laku a spár (paintgap-preview)
========================== */
@media (max-width: 768px) {

  .paintgap-preview{
    display: grid !important;
    grid-template-columns: 1fr !important; /* 1 fotka na řádek */
    gap: 12px !important;
    width: 100%;
    max-width: 520px;
  }

  .paintgap-preview .ph{
    width: 100% !important;       /* přebije 280px */
    padding: 8px !important;
    border-radius: 14px;
    overflow: hidden;
  }

  .paintgap-preview .ph a{
    width: 100%;
    display: block;
    position: relative;
  }

  .paintgap-preview .ph img{
    width: 100% !important;
    height: auto !important;
    max-height: 68vh;
    object-fit: cover;
    cursor: zoom-in;
  }

  /* MAX badge – výraznější */
  .paintgap-max{
    top: 10px !important;
    left: 10px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .6px;
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(6px);
  }

  /* Remove – větší a viditelný */
  .paintgap-remove{
    top: 10px !important;
    right: 10px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    font-size: 18px !important;
    line-height: 34px !important;
  }
}
  
@media (max-width: 768px) {

  /* ZRUŠIT textovou nápovědu */
  .paintgap-preview .ph::after {
    content: "" !important;
  }

  /* ZOBRAZIT ikonu lupy */
  .paintgap-preview .ph::before {
    content: "🔍" !important;
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 6;

    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;

    border-radius: 12px;
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(6px);

    font-size: 18px;
    line-height: 1;

    animation: jcZoomPulse 1.8s ease-in-out infinite;
    pointer-events: none;
  }
}

@keyframes jcZoomPulse {
  0%, 100% {
    transform: scale(1);
    opacity: .85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}
