/* IN CART item*/
tr.removeable:has(.dkLabCartNoteDetails) td.p-quantity.p-cell {
  display: none !important;
}

/* Widget CART item*/
.cart-widget-product:has(.dkLabCartNoteDetails) .cart-widget-product-amount,
.cart-widget-product:has(.dkLabCartNoteDetails) .cart-widget-product-unit {
  display: none !important;
}

/* DETAIL PRODUKT - p-info-wrapper*/

.p-detail-inner:has(.cfg-dimensions)  #dkLabNoteMainWrapper,
.p-detail-inner:has(.cfg-dimensions)  .btn.add-to-cart-button:before {
  display: none !important;
}

.p-detail-inner:has(.cfg-dimensions)  .quantity {
  visibility: hidden;
}
.p-detail-inner:has(.cfg-dimensions) .detail-parameters.varianty-vyber {
padding: 0px !important;
}
.p-detail-inner:has(.cfg-dimensions) .advanced-parameter-inner.show-tooltip.yes-before {
  color: #7dc001 !important;
  border: 2px solid #7dc001;
}

/* Zmenšení výchozí ceny a labelu, pokud je na detailu náš konfigurátor */
.p-detail-inner:has(.cfg-dimensions) .p-info-wrapper .price-final {
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: #656565;
}

.p-detail-inner:has(.cfg-dimensions) .p-info-wrapper .price-final .cfg-unit-label {
  font-size: inherit;
  font-weight: 400;
  color: #656565;
}

/*==============================================
/* KONFIGURÁTOR PRO ROZMĚRY */
.cfg-total-price {
  margin: 4px 0px;  
  font-size: 32px;
  line-height: 1;
  font-weight: bold;
  color: #24242E;
}

.cfg-total-label {
  font-size: 16px;
  font-weight: bold;
  color: #24242E;
  margin-bottom: 4px;
}

.cfg-total-price .cfg-total-label {
  opacity: 0.8;
  margin-right: 6px;
}

.cfg-total-price .cfg-total-amount {
  font-weight: 700;
}

/* Label „cena za jednotku“ před výchozí cenou – na stejný řádek */
.p-final-price-wrapper .price-final .cfg-unit-label {
  display: inline;
  margin-right: 0.35em;
  font-weight: normal;
  font-size: inherit;
}

.cfg-dimensions {
  margin: 10px 0px;
  padding: 0px;
}

.cfg-dimensions__head,
.availability-label,
.detail-parameters th {
  font-size: 14px;
  font-weight: bold;
  color: #24242E;
  margin-bottom: 10px;
  text-align: left;
}

/* Zobrazení vybrané varianty a příplatkového parametru („Spodné lemovanie: Štandardné obšitie 2cm", bez mezery před dvojtečkou) */
.detail-parameters th .selected-variant-text,
.detail-parameters th .selected-surcharge-text {
  color: #7dc001;
  font-weight: normal;
}

/* Jednotlivá dimenze (šířka / výška) */
.cfg-dimension {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.cfg-dimension__label {
  width: 60px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Input + tlačítka */
.p-detail-inner .cfg-dimensions .decrease__sign,
.p-detail-inner .cfg-dimension .increase__sign {
  display: block;
  font-size: 14px;
}

.cfg-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cfg-input {
  width: 120px;
  padding: 2px;
  text-align: right;
  border: 1px solid #ddd;
}
/*
.cfg-increase,
.cfg-decrease {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 0px;
  width: 35px;
  height: 35px;
  line-height: 30px;
  cursor: pointer;
}

.cfg-increase:hover,
.cfg-decrease:hover {
  border: 1px solid #daaf73;
  background: #fff;
  border-radius: 0px;
  width: 35px;
  height: 35px;
  line-height: 30px;;
  cursor: pointer;
}
*/
.cfg-unit {
  margin-left: 2px;
  opacity: .7;
}

.cfg-increase, .cfg-decrease {
  display: none !important;
}

/* Placeholder styling pro lepší čitelnost */
.cfg-input::placeholder {
  color: #999;
  font-size: 12px;
}

/* Tooltip styling */
.cfg-tooltip {
  display: inline-flex;
  width: 16px;
  height: 16px;
  background-color: #000;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  cursor: help;
  flex-shrink: 0;
  position: relative;
}

.cfg-tooltip:hover {
  background-color: #333;
}

/* Custom tooltip styling */
.cfg-tooltip[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: tooltipFadeIn 0.1s ease-in;
}

.cfg-tooltip[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #000;
  margin-bottom: 1px;
  z-index: 1000;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(5px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* Poznámka k zaokrouhlení, když košík účtuje celé metry („účtuje sa 2 m") */
.cfg-total-price .cfg-total-hint {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: #656565;
}

/* Varování pro admina (?cfgdebug=1): produkt nemá zapnutou poznámku DK Lab */
.cfg-admin-warning {
  margin: 10px 0;
  padding: 8px 12px;
  border: 2px solid #e00000;
  background: #fff3f3;
  color: #e00000;
  font-size: 13px;
}

/*==============================================*/
/* Připlatkový parametr */
/* Skryj původní dropdown, který konfigurátor nahradil obrázky/kartami */
body.type-detail .p-detail-inner:has(.cfg-dimensions) .p-info-wrapper .surcharge-list select.cfg-replaced {
  display: none !important;
}

/* Po aktualizaci Shoptetu (přístupnost variant) je nadpis v <label>; CSS FV Studia ho jinak odsadí o 40 px */
body.type-detail .p-detail-inner:has(.cfg-dimensions) .p-info-wrapper .surcharge-list th label {
  padding-left: 0;
  line-height: inherit;
}

/* CSS FV Studia ubírá příplatkovým řádkům 30 px vpravo; na mobilu se pak karty lemování zbytečně zalomí pod sebe */
body.type-detail .p-detail-inner:has(.cfg-dimensions) .p-info-wrapper .surcharge-list {
  margin-right: 0;
}

/* Grid pro obrázky */
.p-detail-inner:has(.cfg-dimensions) .surcharge-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.p-detail-inner:has(.cfg-dimensions) .surcharge-option {
  position: relative;
  width: 74px;
  height: 74px;
  border: 2px solid #e4e4e400;
  border-radius: 0;
  cursor: help;
  transition: border-color 0.1s ease;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Tooltip odstraněn */


.p-detail-inner:has(.cfg-dimensions) .surcharge-option.selected {
  background-color: #fff;
  color: #7dc001 !important;
  color: #7dc001 !important;
  border: 2px solid #7dc001;
}
/* Checkmark pro vybranou položku - okamžitý, bez animace */
.p-detail-inner:has(.cfg-dimensions) .surcharge-option.selected::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 28px;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxODk3MS42IiBoZWlnaHQ9IjE0MzM2LjMiIHZpZXdCb3g9IjAgMCAxNy43ODU5MTYgMTMuNDQwMjY3Ij48cGF0aCBkPSJNMTUgLjRsLTggOC00LTQtMi40IDJMNi43IDEzIDE3LjQgMi43eiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSJncmF5IiBzdHJva2Utd2lkdGg9Ii42Ii8+PC9zdmc+);
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 10;
  transition: none !important;
}

/* Příplatek u obrázku (např. dražší páska): „+2,00 €/m" */
.p-detail-inner:has(.cfg-dimensions) .surcharge-option .cfg-option-price {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  color: #24242E;
}

/* Ostatní příplatkové parametry (např. Spodné lemovanie) jako karty */
.p-detail-inner:has(.cfg-dimensions) .cfg-option-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.p-detail-inner:has(.cfg-dimensions) .cfg-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 74px;
  min-height: 48px;
  padding: 6px 12px;
  border: 2px solid transparent;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.5); /* stejný obrys jako dlaždice „Výber uchytenia" */
  background: #fff;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  color: #24242E;
  cursor: pointer;
}
.p-detail-inner:has(.cfg-dimensions) .cfg-option-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
}
.p-detail-inner:has(.cfg-dimensions) .cfg-option-card .cfg-option-price {
  font-size: 12px;
  color: #656565;
}
.p-detail-inner:has(.cfg-dimensions) .cfg-option-card.selected {
  border-color: #7dc001;
  color: #7dc001;
}

/* Ovládání klávesnicí */
.p-detail-inner:has(.cfg-dimensions) .surcharge-option:focus-visible,
.p-detail-inner:has(.cfg-dimensions) .cfg-option-card:focus-visible {
  outline: 2px solid #7dc001;
  outline-offset: 2px;
}

/* Nevybraný povinný příplatek */
.p-detail-inner:has(.cfg-dimensions) .cfg-choice-error .surcharge-option,
.p-detail-inner:has(.cfg-dimensions) .cfg-choice-error .cfg-option-card {
  border-color: #e00000;
}

/* Červený rámeček pro chybu varianty */
.p-detail-inner:has(.cfg-dimensions) .advanced-parameter.variant-error {
  border: 2px solid #e00000 !important;
  box-shadow: 0 0 5px rgba(224, 0, 0, 0.3);
  width: auto;
  height: auto;
}
#jsUnavailableCombinationMessage{
    color: #e00000;
}
/* CZ: variantní parametr „Typ uchycení" je select – červený rámeček při nevybrání */
.p-detail-inner:has(.cfg-dimensions) select.variant-error {
  border: 2px solid #e00000 !important;
  box-shadow: 0 0 5px rgba(224, 0, 0, 0.3);
}
