/*
  Styles for the combined paint thickness and gap inspection section. The
  section displays three car outlines side‑by‑side for paint thickness
  measurement and three for gap inspection. Each dot colour reflects
  numeric values or states. A dashed vertical divider separates the two
  parts.
*/

.paint-gap-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding: 20px 35px;
  margin: 40px auto;
  max-width: 1100px;
  background-color: #3a3a47;
  border: 1px solid #f0f0f2;
  border-radius: 25px;
  box-shadow: 0 0 10px rgba(2, 2, 2, 2.3);
  color: #fff;
}

.paint-gap-section .paint-part,
.paint-gap-section .gap-part {
  flex: 1 1 45%;
  max-width: 45%;
  position: relative;
}

.paint-gap-section .vertical-divider {
  width: 0;
  border-left: 2px dashed #f28c35;
  margin: 0 10px;
}

.paint-gap-section h3 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: #fff;
}

/* column container for paint and gap parts */
.paint-gap-section .thickness-columns,
.paint-gap-section .gap-columns {
  display: flex;
  justify-content: space-between;
}

.paint-gap-section .thickness-column,
.paint-gap-section .gap-column {
  position: relative;
  flex: 1 1 0;
  margin: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;  /* auto + body uprostřed sloupce */
}

/* Shrink car outlines slightly to make section less dominant.  They will still scale responsively, but not occupy full column width. */
.paint-gap-section .paint-car-img,
.paint-gap-section .gap-car-img {
  width: 160px;          /* dříve 85% → FIX */
  max-width: 260px;     /* můžeš si doladit – 240–280 je ideální */
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* paint thickness dots */
.paint-gap-section .thickness-point {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  cursor: text;
  outline: none;
}

.paint-gap-section .thickness-point.low {
  background-color: #00b378;
  box-shadow: 0 0 0 5px rgba(0, 179, 120, 0.3);
}
.paint-gap-section .thickness-point.mid {
  background-color: #fcb84a;
  box-shadow: 0 0 0 5px rgba(252, 184, 74, 0.3);
}
.paint-gap-section .thickness-point.high {
  background-color: #f57c00;
  box-shadow: 0 0 0 5px rgba(245, 124, 0, 0.3);
}
.paint-gap-section .thickness-point.very-high {
  background-color: #e65c32;
  box-shadow: 0 0 0 5px rgba(230, 92, 50, 0.3);
}
.paint-gap-section .thickness-point.extreme {
  background-color: #304ffe;
  box-shadow: 0 0 0 5px rgba(48, 79, 254, 0.3);
}

/* gap state dots */
.paint-gap-section .gap-point {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.paint-gap-section .gap-point.state-ok    { background-color: #00b378; }
.paint-gap-section .gap-point.state-warn  { background-color: #f57c00; }
.paint-gap-section .gap-point.state-danger{ background-color: #e53935; }

/* legend styles */
.paint-gap-section .thickness-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

.paint-gap-section .legend-item {
  display: inline-block;
  padding: 6px 12px;
  margin: 5px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
}

.paint-gap-section .legend-item.low       { background-color: #00b378; }
.paint-gap-section .legend-item.mid       { background-color: #fcb84a; }
.paint-gap-section .legend-item.high      { background-color: #f57c00; }
.paint-gap-section .legend-item.very-high { background-color: #e65c32; }
.paint-gap-section .legend-item.extreme   { background-color: #304ffe; }

.paint-gap-section .gap-legend {
  text-align: center;
  margin-top: 15px;
}
.paint-gap-section .gap-legend .legend-ok {
  background-color: #00b378;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  margin-right: 10px;
}
.paint-gap-section .gap-legend .legend-warn {
  background-color: #f57c00;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  margin-right: 10px;
}
.paint-gap-section .gap-legend .legend-danger {
  background-color: #e53935;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  margin-right: 10px;
}

/* =========================================================
   RESPONSIVE – Kontrola laku a spár
   Telefon: části pod sebe, menší tečky, auta centrovat, legendy do řádků
   Tablet: jemné zhuštění
========================================================= */

/* TELEFON */
@media (max-width: 767px) {
  .paint-gap-section {
    flex-direction: column;
    gap: 18px;
    padding: 14px 14px;
  }

  .paint-gap-section .paint-part,
  .paint-gap-section .gap-part {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .paint-gap-section .vertical-divider {
    display: none;
  }

  .paint-gap-section h3 {
    font-size: 20px;
    margin-bottom: 14px;
  }

  /* Sloupce s auty – centrovat + rozumné mezery */
  .paint-gap-section .thickness-columns,
  .paint-gap-section .gap-columns {
    justify-content: center;
    gap: 10px;
  }

  .paint-gap-section .thickness-column,
  .paint-gap-section .gap-column {
    margin: 0;
    flex: 0 1 auto;
  }

  /* Obrázky aut – ať se zmenší a drží sloupec */
  .paint-gap-section .paint-car-img,
  .paint-gap-section .gap-car-img {
    width: clamp(95px, 28vw, 140px);
    max-width: none;
  }

  /* Tečky – menší */
  .paint-gap-section .thickness-point {
    width: clamp(34px, 10vw, 44px);
    height: clamp(34px, 10vw, 44px);
    font-size: clamp(12px, 3.2vw, 15px);
  }

  .paint-gap-section .gap-point {
    width: clamp(34px, 10vw, 44px);
    height: clamp(34px, 10vw, 44px);
    font-size: clamp(16px, 4vw, 20px);
  }

  /* Legenda tlouštěk – už ji máš jako flex, jen zhuštíme */
  .paint-gap-section .thickness-legend {
    gap: 8px;
    margin-top: 12px;
  }

  .paint-gap-section .legend-item {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Gap legenda – na mobilu ji přepneme na flex (gap pak funguje) */
  .paint-gap-section .gap-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    text-align: initial; /* zrušíme původní text-align */
  }

  .paint-gap-section .gap-legend .legend-ok,
  .paint-gap-section .gap-legend .legend-warn,
  .paint-gap-section .gap-legend .legend-danger {
    margin-right: 0;         /* původně jsi dával margin-right */
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* TABLET */
@media (min-width: 768px) and (max-width: 1199px) {
  .paint-gap-section {
    gap: 26px;
    padding: 18px 22px;
  }

  .paint-gap-section .paint-part,
  .paint-gap-section .gap-part {
    flex: 1 1 48%;
    max-width: 48%;
  }

  .paint-gap-section .paint-car-img,
  .paint-gap-section .gap-car-img {
    width: 150px; /* lehce menší než desktop */
  }
}


/*************************************
  ✦ TLOUŠŤKY LAKU = INPUT JAKO KOLEČKA
*************************************/
.paint-gap-section .thickness-point {
    border: none;
    background-clip: padding-box;
    text-align: center;
    font-size: 16px !important; /* Vynutíme 16px všude */
    font-weight: bold;
    color: #fff;
    
    /* TOTO JE TEN FIX: Vypneme výchozí odsazení prohlížeče */
    padding: 0 !important; 
    margin: 0;
    box-sizing: border-box;
    
    /* Drobná záchrana pro širší fonty: písmena se o chloupek srazí */
    letter-spacing: -0.5px; 
}

/* Odstranění browser outline */
.paint-gap-section .thickness-point:focus {
    outline: none;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.15);
}
 

/* ===== Lak & spáry – Fotodokumentace (UI) ===== */
.lak-preview{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:8px;
}
.lak-preview .jc-thumb{
  position:relative;
  width:180px;
  height:115px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:12px;
  overflow:hidden;
  background:#22232a;
  cursor:zoom-in;
}
.lak-preview .jc-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.lak-preview .jc-thumb:hover{
  outline:2px solid rgba(240,138,36,.75);
  outline-offset:2px;
}
.lak-preview .remove-photo{
  position:absolute;
  top:6px;
  right:6px;
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(0,0,0,.45);
  color:#fff;
  cursor:pointer;
  line-height:1;
  font-size:18px;
}
.lak-preview .jc-thumb-max{
  position:absolute;
  left:8px;
  bottom:8px;
  padding:3px 8px;
  border-radius:10px;
  background:rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  font-weight:700;
  font-size:12px;
}

/* Lightbox */
.jc-lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.75);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:9999;
}
.jc-lightbox.is-open{ display:flex; }
.jc-lightbox-inner{
  position:relative;
  max-width:min(1100px, 95vw);
  max-height:90vh;
}
.jc-lightbox-inner img{
  width:100%;
  height:auto;
  max-height:90vh;
  border-radius:14px;
  display:block;
}
.jc-lightbox-close{
  position:absolute;
  top:-14px;
  right:-14px;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(0,0,0,.6);
  color:#fff;
  font-size:24px;
  cursor:pointer;
}

/* =========================================================
   Lak a spary 2.0 – moderni rozdeleni na dve prehledne karty
========================================================= */
body.jc .paint-gap-section.sec-kontrola-laku-a-spar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 18px !important;
  max-width: none !important;
  margin: 24px 10px 18px !important;
  padding: 22px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.70) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(69,145,213,.12), transparent 30%),
    linear-gradient(135deg, #353544 0%, #30303d 100%) !important;
  box-shadow: 0 16px 36px rgba(0,0,0,.42) !important;
  color: rgba(226,232,240,.70) !important;
}

body.jc .paint-gap-section .paint-part,
body.jc .paint-gap-section .gap-part {
  max-width: none !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 18px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 14px !important;
  background: rgba(26,26,34,.48) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035) !important;
  box-sizing: border-box !important;
  line-height: 1.55 !important;
  font-size: 14px !important;
}

body.jc .paint-gap-section .paint-part::before,
body.jc .paint-gap-section .gap-part::before {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(31,41,55,.72);
  color: #9fb8d8;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.jc .paint-gap-section .paint-part::before {
  content: "Mapa tloustky laku";
}

body.jc .paint-gap-section .gap-part::before {
  content: "Kontrola licovani";
}

body.jc .paint-gap-section .vertical-divider {
  display: none !important;
}

body.jc .paint-gap-section h3 {
  margin: 0 0 14px !important;
  text-align: left !important;
  color: #f5f7fb !important;
  font-size: clamp(24px, 2vw, 32px) !important;
  font-weight: 900 !important;
  letter-spacing: -.035em !important;
  line-height: 1.08 !important;
}

body.jc .paint-gap-section .thickness-columns,
body.jc .paint-gap-section .gap-columns {
  min-height: 330px !important;
  padding: 18px 10px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: center !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 50% 55%, rgba(255,255,255,.055), transparent 38%),
    #1d1d27 !important;
}

body.jc .paint-gap-section .thickness-column,
body.jc .paint-gap-section .gap-column {
  width: clamp(130px, 13vw, 190px) !important;
  min-height: 285px !important;
  margin: 0 !important;
  position: relative !important;
  justify-self: center !important;
  flex: none !important;
}

body.jc .paint-gap-section .paint-car-img,
body.jc .paint-gap-section .gap-car-img {
  width: 100% !important;
  max-width: 100% !important;
  opacity: .96 !important;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.34));
}

body.jc .paint-gap-section .thickness-point,
body.jc .paint-gap-section .gap-point {
  width: 42px !important;
  height: 42px !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 8px 16px rgba(0,0,0,.28), 0 0 0 4px rgba(255,255,255,.055) !important;
  backdrop-filter: blur(4px);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

body.jc .paint-gap-section .thickness-point {
  font-size: 14px !important;
}

body.jc .paint-gap-section .gap-point {
  font-size: 22px !important;
}

body.jc .paint-gap-section .thickness-point:hover,
body.jc .paint-gap-section .gap-point:hover,
body.jc .paint-gap-section .thickness-point:focus {
  transform: scale(1.08);
  filter: brightness(1.08);
}

body.jc .paint-gap-section .thickness-point.low {
  background: linear-gradient(180deg, #25c18a, #0c8f68) !important;
}

body.jc .paint-gap-section .thickness-point.mid {
  background: linear-gradient(180deg, #fbbf24, #c98505) !important;
}

body.jc .paint-gap-section .thickness-point.high {
  background: linear-gradient(180deg, #fb923c, #c2410c) !important;
}

body.jc .paint-gap-section .thickness-point.very-high,
body.jc .paint-gap-section .gap-point.state-danger {
  background: linear-gradient(180deg, #fb7185, #be123c) !important;
}

body.jc .paint-gap-section .thickness-point.extreme {
  background: linear-gradient(180deg, #60a5fa, #1d4ed8) !important;
}

body:is(.jc, .jc-view) .paint-gap-section .gap-point[data-state="none"] {
  background: rgba(148,163,184,.18) !important;
  color: #cbd5e1 !important;
}

body.jc .paint-gap-section .gap-point.state-ok {
  background: linear-gradient(180deg, #25c18a, #0c8f68) !important;
}

body.jc .paint-gap-section .gap-point.state-warn {
  background: linear-gradient(180deg, #fbbf24, #c98505) !important;
}

/* Jemne presazeni bodu na nove mape auta. */
body.jc .paint-gap-section .thickness-point[name="tloustka_levy_1"],
body.jc .paint-gap-section .gap-point[data-point="spary_levy_1"] {
  top: 13% !important;
  left: 45% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_levy_2"],
body.jc .paint-gap-section .gap-point[data-point="spary_levy_2"] {
  top: 34% !important;
  left: 40% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_levy_3"],
body.jc .paint-gap-section .gap-point[data-point="spary_levy_3"] {
  top: 56% !important;
  left: 39% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_levy_4"],
body.jc .paint-gap-section .gap-point[data-point="spary_levy_4"] {
  top: 77% !important;
  left: 45% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_shora_1"],
body.jc .paint-gap-section .gap-point[data-point="spary_shora_1"] {
  top: 13% !important;
  left: 42% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_shora_2"],
body.jc .paint-gap-section .gap-point[data-point="spary_shora_2"] {
  top: 48% !important;
  left: 42% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_shora_3"],
body.jc .paint-gap-section .gap-point[data-point="spary_shora_3"] {
  bottom: 5% !important;
  left: 42% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_pravy_1"],
body.jc .paint-gap-section .gap-point[data-point="spary_pravy_1"] {
  top: 13% !important;
  left: 40% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_pravy_2"],
body.jc .paint-gap-section .gap-point[data-point="spary_pravy_2"] {
  top: 34% !important;
  left: 48% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_pravy_3"],
body.jc .paint-gap-section .gap-point[data-point="spary_pravy_3"] {
  top: 55% !important;
  left: 48% !important;
}

body.jc .paint-gap-section .thickness-point[name="tloustka_pravy_4"],
body.jc .paint-gap-section .gap-point[data-point="spary_pravy_4"] {
  top: 77% !important;
  left: 35% !important;
}

body.jc .paint-gap-section .thickness-legend,
body.jc .paint-gap-section .gap-legend {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 14px 0 12px !important;
  text-align: left !important;
}

body.jc .paint-gap-section .legend-item,
body.jc .paint-gap-section .gap-legend span {
  margin: 0 !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

body.jc .paint-gap-section .gap-legend .legend-ok {
  background: rgba(16,185,129,.22) !important;
  color: #d1fae5 !important;
}

body.jc .paint-gap-section .gap-legend .legend-warn {
  background: rgba(245,158,11,.24) !important;
  color: #fde68a !important;
}

body.jc .paint-gap-section .gap-legend .legend-danger {
  background: rgba(244,63,94,.22) !important;
  color: #fecdd3 !important;
}

body.jc .lak-upload {
  margin: 0 10px 34px !important;
  padding: 18px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 14px !important;
  background: rgba(26,26,34,.52) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.24) !important;
  color: #f5f7fb !important;
}

body.jc .lak-upload label {
  margin: 0 0 10px !important;
  font-size: 18px !important;
  font-weight: 850 !important;
}

body.jc .lak-upload input[type="file"] {
  width: 100% !important;
  max-width: 620px !important;
  padding: 10px !important;
  border: 1px dashed rgba(69,145,213,.48) !important;
  border-radius: 13px !important;
  background: rgba(31,41,55,.45) !important;
  color: #dbeafe !important;
  box-sizing: border-box !important;
}

body.jc .lak-upload input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #25364f;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1180px) {
  body.jc .paint-gap-section.sec-kontrola-laku-a-spar {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  body.jc .paint-gap-section.sec-kontrola-laku-a-spar {
    margin: 16px 10px 16px !important;
    padding: 12px !important;
    gap: 12px !important;
    border-radius: 14px !important;
  }

  body.jc .paint-gap-section .paint-part,
  body.jc .paint-gap-section .gap-part {
    padding: 13px !important;
    border-radius: 13px !important;
  }

  body.jc .paint-gap-section h3 {
    font-size: 23px !important;
  }

  body.jc .paint-gap-section .thickness-columns,
  body.jc .paint-gap-section .gap-columns {
    min-height: 0 !important;
    padding: 12px 6px !important;
    gap: 4px !important;
    overflow: hidden !important;
  }

  body.jc .paint-gap-section .thickness-column,
  body.jc .paint-gap-section .gap-column {
    width: clamp(86px, 27vw, 125px) !important;
    min-height: 210px !important;
  }

  body.jc .paint-gap-section .paint-car-img,
  body.jc .paint-gap-section .gap-car-img {
    width: 100% !important;
  }

  body.jc .paint-gap-section .thickness-point,
  body.jc .paint-gap-section .gap-point {
    width: 34px !important;
    height: 34px !important;
  }

  body.jc .paint-gap-section .thickness-point {
    font-size: 12px !important;
  }

  body.jc .paint-gap-section .gap-point {
    font-size: 18px !important;
  }

  body.jc .paint-gap-section .legend-item,
  body.jc .paint-gap-section .gap-legend span {
    min-height: 30px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
  }

  body.jc .lak-upload {
    margin: 0 10px 26px !important;
    padding: 13px !important;
  }
}
