/* === Kontejner konfigurátoru === */
.config-main-ui {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 500px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
margin-bottom: 20px;
}

.config-main-ui[hidden] {
  display: none;
}



.config-main-ui > * {
  margin-bottom: 15px;
}

/* === Text nad konfigurátorem === */
.config-split-text {
  display: block;
  margin-bottom: 10px; /* menší mezera dolů */
  font-weight: 600;
  font-size: 16px;
  color: #333;
  line-height: 1.5;
}


/* === Styl plátna === */
.config-canvas {
  border: 2px solid #e6e6e6 !important;
}


/* === Styl tabulky s příplatky === */
.detail-parameters {
  width: 100%;
  max-width: 500px;
  table-layout: fixed;
  border-collapse: collapse;
}

.detail-parameters th,
.detail-parameters td {
  box-sizing: border-box;
font-size: 13px;
  vertical-align: middle;
  width: 50%;
}

.surcharge-parameter {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px;
  font-size: 14px;
}

.surcharge-list:not(:first-of-type) th,
.surcharge-list:not(:first-of-type) td {
  padding-left: 32px;
}


.surcharge-list:first-of-type th,
.surcharge-list:first-of-type td {
  padding-bottom: 20px;
}


.surcharge-list:first-of-type th {
  font-weight: bold;
  font-size: 15px;
width: 100%;
  color: #000;
}



/* === Styl tlačítek (primární) === */
.config-button,
.config-add-button,
.config-add-image-button {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}

.config-button:hover,
.config-add-button:hover,
.config-add-image-button:hover {
  background: linear-gradient(135deg, #0056b3, #003d80);
  transform: scale(1.05);
}

.config-button:active,
.config-add-button:active,
.config-add-image-button:active {
  transform: scale(0.95);
}

/* === Styl tlačítek (sekundární s ikonou) === */
.config-select-side,
.config-select-side-active {
  background: transparent;
  color: #007bff;
  border: 2px solid #007bff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.config-select-side:hover {
  background: #007bff;
  color: white;
}

.config-select-side:hover::before {
  color: white;
}

.config-select-side-active {
  background: #0056b3;
  color: white;
  border-color: #0056b3;
}

.config-select-side[hidden],
.config-select-side-active[hidden] {
  display: none !important;
}


/* === Ikona tužky – výchozí stav (modrá) === */
#config-select-front::before,
#config-select-back::before,
#config-select-bottom::before,
#config-select-top::before {
  content: "\f044"; /* ikona tužky */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-style: normal;
  display: inline-block;
  font-size: 14px;
  color: #007bff; /* výchozí modrá */
  transition: color 0.3s ease;
}

/* === Ikona tužky – bílá při hover a aktivním tlačítku === */
.config-select-side:hover::before,
.config-select-side-active::before {
  color: white !important;
}


/* === Výběr strany (rozdělovač tlačítek) === */
.config-select-side-buttons {
  display: flex;
  gap: 10px;
}

/* === Přidání textu – input a select === */
.config-add-text {
display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

 .config-text-input::placeholder {
    font-size: 16px;
  }

.config-font-select {
  border: 1px solid #7c7e8f;
  padding: 8px 12px !important;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: #fff;
transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  width: 120px;
  box-sizing: border-box;
  border-radius: 8px;
}

/* Šipka pro dropdown */
.config-font-select::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
    font-size: 14px;
    color: #666;
    margin-left: auto;
    padding-left: 10px;
}

.config-motiv-option:hover, .config-font-option:hover {
  background-color: #f2f2f2;
  color: #007bff;
transition: background-color 0.2s ease, color 0.2s ease;
}



/* Dropdown */
.config-font-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 204px;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 5px;
  z-index: 1000;
  padding: 6px 0;
  box-sizing: border-box;
}

/* Zobrazení dropdownu při hoveru */
.config-font-select:hover + .config-font-dropdown {
  display: block;
}

.config-text-input {
  flex: 1;
  font-size: 16px;
border-radius: 8px;
  max-width: 400px;     /* přidáno: omezení šířky */
  padding: 8px 12px;
  border: 1px solid #7c7e8f;
  height: 80px !important;
  min-width: 100px;
}

.config-select {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.config-file-input {
  display: block;
  width: 100%;
  padding: 5px;
}

.config-motiv-option
{
  padding: 8px 12px !important;
}

.config-motiv-selected {
  border: 1px solid #7c7e8f;
  padding: 8px 12px !important;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  background: #fff;
transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  width: 204px;
  box-sizing: border-box;
border-radius: 8px;
}

.config-motiv-selected::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-style: normal;
  font-size: 14px;
  color: #666;
  margin-left: auto;
  padding-left: 10px;
}

.config-motiv-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 204px;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 5px;
  z-index: 1000;
  padding: 6px 12px;
  box-sizing: border-box;
}

.config-motiv-selected:hover + .config-motiv-dropdown {
  display: block;
}

/* === Kontejner s položkami === */
.config-items-container {
  background: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed #ccc;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-items-container > div {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  margin: 0 !important;
}

.config-items-container button {
  background: none;
  border: none;
  color: red;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0;
  margin-left: 8px;
  gap: 4px; /* mezera mezi ikonou a textem */
}

.config-items-container button::before {
  content: "\f00d"; /* FontAwesome křížek */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 14px;
}


.config-items-container button:hover {
  color: darkred;
}

/* Vybereme wrapper pomocí selektoru – musí obsahovat dropdown i tlačítko */
.config-main-ui > div:nth-last-of-type(2) {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}



/* === Optimalizace konfigurátoru – Mobil + Tablet === */

@media (max-width: 600px) {
  /* Tlačítka (Přední/Zadní/Příslušenství) pod sebe */
  .config-select-side-buttons {
    flex-direction: column;
    gap: 8px;
  }

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

.surcharge-list:not(:first-of-type) th, .surcharge-list:not(:first-of-type) td {
    padding-left: 0px;
padding-bottom: 8px;
}

 .config-text-input::placeholder {
    font-size: 18px;
  }

 .config-text-input {
    font-size: 18px;
  }


   .config-font-select {
    height: 50px;
    font-size: 16px;
    padding: 10px 16px;
 width: 100% !important;
  }

  .config-font-dropdown {
    font-size: 16px;
 width: 100% !important;
  }

  .config-font-option {
    padding: 12px 16px;
  }

  .config-font-select::after {
    font-size: 14px;
  }



  .config-select-side,
  .config-select-side-active {
    width: 100%;
padding: 8px;
  }

  /* Sekce pro přidání textu – menší mezery a kompaktní vzhled */
  .config-add-text {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0px;
    margin-bottom: 10px;
    gap: 8px;
  }

  .config-add-text > * {
    width: 100%;
  }

  .config-add-text button {
    width: auto;
    align-self: flex-start;
    min-width: 120px;
  }


  /* Dropdown motiv + tlačítko vedle – oddělené a kompaktní */
  .config-main-ui > div:nth-last-of-type(2) {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
  }

  .config-motiv-selected {
    width: 100%;
  }

  .config-add-button {
    width: auto;
    align-self: flex-start;
    min-width: 120px;
    padding: 12px 20px;
  }

  /* Dropdown menu – 100% šířka na mobilu */
  .config-motiv-dropdown {
    width: 100% !important;
  }

  /* Popisový text – menší mezera pod, větší čitelnost */
  .config-split-text {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
  }

  /* Tabulka parametrů – šířka 100% */
  .detail-parameters {
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  /* Tablet a menší – 100% šířka konfigurátoru */
  .config-main-ui {
    max-width: 100%;
        width: 100%;
  }
}

@media (max-width: 991px) {
  /* Tablet a menší – 100% šířka konfigurátoru */
  .config-main-ui {
    max-width: 100%;
        width: 100%;
  }
}

/* === MEDIA QUERY pro sjednocení výšky a fontu od 768px === */
@media (min-width: 768px) {
  .config-font-select,
  .config-add-button {
    height: 50px;
  }
}

.labeled-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* nebo fixní šířka, např. 150px */
  min-width: 100%; /* pomůže proti zmenšení */
  box-sizing: border-box;
}


/* === HLAVNÍ TOGGLE (Vlastní gravírování) === */
.labeled-toggle.toggle--main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 15px;
  font-weight: 600;
  min-height: 32px;
}

.toggle--main .label-left,
.toggle--main .label-right {
  flex: 0 0 50px;
  width: 50px;
  text-align: center;
  white-space: nowrap;
}

.toggle--main .toggle-switch {
  flex: 0 0 52px;
  width: 52px;
}



/* === PODŘÍZENÉ TOGGLE === */
.labeled-toggle.toggle--sub {
  justify-content: flex-start;
  margin-left: 28px; /* zarovnat vlevo */
  font-size: 0;
  margin-top: 6px;
margin-bottom: 4px;
}

.toggle--sub .label-left,
.toggle--sub .label-right {
  display: none;
}

/* Zmenšený toggle */
.toggle--sub .toggle-switch {
  width: 40px;
  height: 20px;
}

.toggle--sub .toggle-slider::before {
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
}

.toggle--sub .toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* === SPOLEČNÉ === */
.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #007bff;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}