/* Roztáhnutí modalu na 95% */
.d-flex {
  display:flex;
}

.d-flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.d-none {
  display:none;
}

.align-items-center {
  align-items:center;
}

.align-items-end {
  align-items:end;
}

.justify-content-between {
  justify-content:space-between;
}

.justify-content-center {
  justify-content:center;
}

.flex-column {
  flex-direction:column;
}

.flex-grow-1 {
  flex: 1 1 auto;
}

#diInquiryModal .alert {
  border-radius:0;
  -webkit-border-radius:0;
  -moz-border-radius:0;
  font-size:14px;
  line-height:1.4;
}

#diInquiryModal .modal-header,
#diQuickviewModal .modal-header {
  padding-right:60px;
  position:relative;
}

#diQuickviewModal .product-description {
  font-size:15px;
}

#diInquiryModal .btn-close,
#diQuickviewModal .btn-close {
  border:none;
  background:#f2f2f2;
  cursor:pointer;
  width:42px;
  height:42px;
  position:absolute;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  -webkit-transform:translateY(-50%);
  -moz-transform:translateY(-50%);
  transition:all 0.3s ease-in-out;
  -webkit-transition:all 0.3s ease-in-out;
  -moz-transition:all 0.3s ease-in-out;
}

#diInquiryModal .btn-close:hover,
#diQuickviewModal .btn-close:hoer {
  background:#e5e5e5;
}

#diInquiryModal .btn-close:hover i,
#diQuickviewModal .btn-close:hover i {
  color:#000;
}

#diInquiryModal .btn-close i,
#diQuickviewModal .btn-close i {
  font-size:22px;
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  -webkit-transform:translate(-50%, -50%);
  -moz-transform:translate(-50%, -50%);
}

.di-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Tmavé poloprůhledné pozadí */
    z-index: 9999; /* Musí být nad vším ostatním */
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); /* Efekt rozmazání pozadí pro moderní vzhled */
}

.di-loader-content {
    text-align: center;
    height:100%;
}

.text-orange {
    color: #d66327 !important; 
}

.text-blue {
    color: #0c339c !important; 
}

.text-green {
  color: #28a745 !important;
}

.fw-semibold {
  font-weight:600 !important;
}

.line-height-1 {
  line-height:1 !important;
}

.small-txt {
  font-size:13.5px;
  margin-bottom:2px;
}

.old-price {
    text-decoration: line-through; 
    opacity: 0.6; 
    margin-right: 5px;
}

/* Styl pro kroky v hlavičce */
.di-step-pill {
    background: #e9ecef;
    color: #6c757d;
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.di-step-pill.active {
    background: #d66327; /* Oranžová z obrázku */
    color: white;
}

.di-step-pill .step-num {
    opacity: 0.8;
    margin-right: 4px;
    font-weight: 400;
}

/* Celkové nastavení modalu */
.modal-xl {
    max-width: 1140px;
}

.modal-content {
    border-radius: 0; /* Obrázek má spíše ostřejší hrany */
}

.di-product-img {
  object-fit: contain;
  height:auto;
  width:100%;
  max-width:100%;
}

/* Sidebar "Souhrn" - pozadí a stín */
.di-summary-sidebar {
    background-color: #f8f9fa !important;
    box-shadow: inset 1px 0 0 rgba(0,0,0,0.05);
}

#diInquiryModal .modal-dialog .modal-content,
#diQuickviewModal .modal-dialog .modal-content {
  border-radius:0 !important;
  -webkit-border-radius:0 !important;
  -moz-border-radius:0 !important;
  border:none;
}

/* Jemná animace pro plynulé zobrazení */
.di-loader-overlay:not(.d-none) {
    animation: fadeIn 0.2s ease-out;
}

#di-global-loader {
  display:none;
  visibility:hidden;
}

#di-global-loader.visible {
  display:block;  
  visibility: visible;
}

.accessory-card {
  cursor:pointer;
  border:2px solid #eee !important;
  transition: transform 0.15s ease-in-out, border-color 0.2s;
}

.accessory-card:hover {
  transform:scale(1.03);
  -webkit-transform:scale(1.03);
  -moz-transform:scale(1.03);
  border:2px solid #444 !important;
}

.accessory-card.selected {
  border:2px solid #d66327 !important;
}

.accessory-card.selected.free {
  border-color: #0c339c !important;
}

.accessory-card.is-included {
  cursor:default !important;
  border:2px solid #0b8a0b !important;
}

.bg-right {
    background:#f8f9fa;
}

/* Kontejner v step1.tpl, který drží oba sloupce */
.di-main-container {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    align-items: stretch !important; /* Toto roztáhne sloupce */
    position: relative;
}

/* Pravý sloupec (sidebar) */
.di-summary-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 0; 
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 176px);
}

#di-summary-list .sidebar-row {
  border-bottom:1px solid #e5e5e5;
  padding-top:3px;
  padding-bottom:3px;
} 

#di-summary-list .sidebar-row * {
  font-size:14px;
}

#di-summary-list .sidebar-row .badge,
.di-summary table .badge {
  padding:0 8px;
  font-size: 13px; 
  vertical-align: middle;
  background:#d66327;
}

#di-summary-list .sidebar-row:last-child {
  border:none;
}

.di-summary-sidebar .sidebar-img {
  object-fit:cover;
  width:50px;
}

.di-summary-sidebar > .d-flex {
    height: 100%;
    min-height: 100%;
    display: flex !important;
    flex-direction: column !important;
}

#di-summary-list {
    flex: 1 1 auto; /* CSS3 ekvivalent tvého .flex-grow-1 */
    overflow-y: auto; /* Povolí skrollování pouze v seznamu produktů */
    min-height: 0; /* Nutné pro správné fungování flex-grow uvnitř sticky elementu */
    padding-right: 8px;
    min-height: 0;
}

.di-summary-sidebar #di-summary-total {
    margin-top: auto !important; /* Pojistka: přitlačí element k dolnímu okraji flex-rodiče */
    padding-top: 1rem;
    padding-bottom: 1rem;
    background: inherit; /* Zachová pozadí sidebaru */
    z-index: 10;
}

.di-category-nav-wrapper {
    position: -webkit-sticky; /* Pro Safari */
    position: sticky;
    top: 0;
    background:#f2f2f2;
    padding:10px 15px;
    z-index: 1050; /* Musí být nad obsahem modálu */
    width: calc(100% + 15px);
    left:0;
    display: none; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.di-loader-overlay {
    z-index: 2000 !important; 
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.di-category-nav-wrapper.is-visible {
    display: block;
    animation: fadeInDown 0.3s ease; /* Jemný efekt objevení */
}

.di-category-nav-wrapper ul li a.nav-link {
  font-size:15px !important;
  font-weight:400;
}

.di-category-nav-wrapper ul li a.nav-link:hover {
  background:#fff;
}

.di-category-nav-wrapper ul li a.nav-link.active,
.di-category-nav-wrapper ul li a.nav-link:focus {
  background:#d66327 !important;
  color:#fff;
}

.di-category-section p {
  font-size:15px;
  color:#444 !important;
}

.price-box, 
#total-price-configuration {
  font-family:var(--heading-font-family);
}

#diQuickviewModal {
    z-index: 1080 !important;
}

#diQuickviewModal .modal-dialog {
  width:auto !important;
  max-width:75vw !important;
  height:auto !important;
}

#diQuickviewModal.show ~ .modal-backdrop {
    z-index: 1070 !important;
}

.opacity-75 {
  opacity:0.75;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-backdrop {
  opacity:0.3;
}

#diInquiryModal .modal-footer,
#diQuickviewModal .modal-footer {
  background:#f2f2f2;
}

.di-modal-95 {
    width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important; /* Přepisuje standardní max-width Bootstrapu */
    height: calc(100vh - 40px) !important;
    margin: 20px auto !important; /* Vycentrování při 95% výšce */
}

.di-modal-95 .modal-content {
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

.di-modal-95 .modal-body {
    flex: 1 1 auto;
    overflow-y: auto; 
    overflow-x: hidden;
}
.di-modal{
  width:90vw; height:90vh; background:#fff; border-radius:10px;
  display:flex; flex-direction:column; overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}
.di-body{ padding:14px 16px; overflow:auto; height:100%; }
.di-steps{ display:flex; gap:8px; margin-bottom:12px; }
.di-stepbtn{
  border:1px solid #ddd; background:#f8f8f8; padding:6px 10px; cursor:pointer;
  border-radius:6px;
}
.di-stepbtn.active{ background:#e9e9e9; }
.di-grid{
  display:grid; grid-template-columns: 1.3fr 1fr; gap:16px;
}

.di-form textarea {
  min-height:120px;
}

.di-form .alert {
  padding:6px 10px;
}

.di-form .form-group input,
.di-form .form-group textarea {
  font-size:15px;
}

.di-form label {
  margin-bottom:4px;
  font-size:15px;
}

.di-left, .di-right{ min-width:0; }
.di-left-title, .di-summary-title, .di-form-title{ font-weight:600; margin-bottom:8px; }
.di-cat{ border:1px solid #eee; border-radius:8px; padding:10px; margin-bottom:10px; }
.di-cat-name{ font-weight:600; margin-bottom:6px; }
.di-prod{ display:flex; gap:8px; align-items:flex-start; padding:6px 0; border-top:1px solid #f2f2f2; }
.di-prod:first-child{ border-top:none; }
.di-prod-name{ flex:1; }
.di-prod-price{ white-space:nowrap; margin-left:8px; }
.di-table{ width:100%; border-collapse:collapse; }
.di-table th, .di-table td{ border-bottom:1px solid #eee; padding:8px; }
.di-ta-right{ text-align:right; }
.di-actions{ margin-top:12px; display:flex; gap:8px; }
.di-error{ color:#b30000; font-size:12px; margin-top:4px; }
.di-submit-msg{ margin-top:10px; }
@media (max-width: 900px){
  .di-grid{ grid-template-columns: 1fr; }
}

/* Základní tabulka - čistý design */
.di-table {
    width: 100%;
    border-collapse: collapse; /* Změna na collapse pro přesnější linky */
    margin-bottom: 2.5rem;
    border:none;
}

.di-table thead tr th.first-col,
.di-table tbody tr td.first-col,
.di-table tfoot tr td.first-col {
  width:45%;
}

/* Hlavička tabulky - bez pozadí s výraznou linkou */
.di-table thead th {
    background: transparent !important; /* Odstranění pozadí */
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid #ccc !important; /* Výrazná spodní linka */
    color: #111;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 10px;
    letter-spacing: 0.5px;
    font-size:14px;
}

.di-table tfoot td {
  border-bottom:none;
  border-left: none;
  border-right: none;
  border-top: 2px solid #ccc !important;
  font-size:14px;
}

.di-table tfoot.subtotal td {
  border-top:1px solid #aaa !important;
}

/* Styl buněk v těle */
.di-table tbody td {
    border-bottom: 1px solid #eee;
    padding: 3px 10px;
    border-top: none;
    border-left: none;
    border-right: none;
    vertical-align: middle !important;
    font-size:14px;
}

/* Odstranění linky u úplně posledního řádku v těle, pokud následuje tfoot */
.di-table tbody tr:last-child td {
    border-bottom: 1px solid #eee; 
}

/* Patička tabulky - celková suma */
.di-table tfoot td {
    border-top: 2px solid #222; /* Výrazná horní linka pro součet */
    padding: 12px 10px;
    background: transparent;
}

/* Obrázek v tabulce */
.di-table-img {
    width: 40px;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* Ceny vpravo */
.di-ta-right {
    text-align: right;
    font-variant-numeric: tabular-nums; /* Lepší zarovnání čísel pod sebou */
}

.text-left {
  text-align:left;
}

.text-right {
  text-align:right;
}

.text-center {
  text-align:center;
}

.text-success {
    color: #27ae60 !important;
    font-weight: 600;
}

.border-top {
  border-top:1px solid #e5e5e5;
}

.border-top.thick {
  border-width:2px;
}

.di-table-img {
  width: 40px; 
  height: auto; 
  object-fit: cover;
}

.invalid-feedback {
  color:#e61212;
  font-size:14px;
}

.form-group.is-invalid input,
.form-group.is-invalid textarea,
.form-group.is-invalid a {
  border-color:#e61212 !important;
}

.form-group.is-invalid label {
  color:#e61212;
}

.badge.badge-required {
  padding:3px 6px;
  background-color: #ff4d4d; 
  font-size: 13px;
  color:#ffffff;
  border-radius:2px;
  -webkit-border-radius:2px;
  -moz-border-radius:2px;
  vertical-align: middle;
}

.di-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    background: #d66327; /* Výchozí oranžová */
    color: white;
}

.di-status-badge i {
    font-size: 18px;
}

/* Styl pro vybranou kartu */
.accessory-card.selected .di-status-badge {
    background: #d66327;
}


.accessory-card.free .di-status-badge {
  background:#0c339c;  
}

/* Styl pro položky v ceně (zelená) */
.accessory-card.is-included .di-status-badge {
    background: #28a745 !important; /* Zelená */
}

/* Změna ikony při hoveru pro interaktivitu */
.accessory-card:not(.selected):hover .di-status-badge {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255,102,0,0.5);
}

.accessory-card.free:not(.selected):hover .di-status-badge {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(72, 32, 214, 0.5);
}

.di-card {
  border:1px solid #e5e5e5;
  border-radius:0;
  -webkit-border-radius:0;
  -moz-border-radius:0;
}

.di-card-body {
  padding:15px 20px;
}

.di-card-body p {
  font-size:14px; 
  line-height:1.4;
}

.di-applied-code-name {
  text-transform: uppercase;
}

/** checkboxes **/

.custom-switch-group {
  display: inline-block;
}

.switch-input {
  display: none;
}

.switch-label-dual {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 12px;
  user-select: none;
}

.label-text-left, .label-text-right {
  transition: color 0.3s ease;
  color: #adb5bd;
}

.switch-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #d1d1d1;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  -moz-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch-input:not(:checked) ~ .switch-label-dual .label-text-left {
  color: #495057; 
}

.switch-input:checked ~ .switch-label-dual .label-text-right {
  color: #d66327; 
}

.switch-input:checked ~ .switch-label-dual .switch-slider {
  background-color: #d66327;
}

.switch-input:checked ~ .switch-label-dual .switch-slider::after {
  transform: translateX(20px);
}

.switch-input:disabled ~ .switch-label-dual {
  opacity: 0.5;                
  cursor: not-allowed;           
}

.switch-input:disabled ~ .switch-label-dual * {
  pointer-events: none;
}

#diInquiryModal .input-group .input-group-append button,
.form-wrapper .input-group .input-group-append button {
  height:42px;
  line-height:42px;
}

.form-wrapper .input-group {
  width:auto;
}

#config_hash {
  width:325px;
}

/* --- DOPLNĚK: ZVÝRAZNĚNÍ CHYBNÉ SEKCE V MODALU --- */
.di-category-section.di-section-error {
    border: 2px solid #d9534f !important;
    background-color: #fff5f5 !important;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    padding: 15px;
    transition: background-color 0.3s ease;
}

.di-category-section.di-section-error h4 {
  color:#a51d18 !important;
}

.b-p-desc {
  max-width:80%;
  line-height:1.4;
}

.di-category-section .price-box {
    font-size:15px;
  }

@media (max-width:1366px) {
  #diInquiryModal .modal-title {
    font-size:18px;
  }

  #diInquiryModal .modal-footer button.btn {
    padding:0 18px;
    font-size:14px;
    line-height:36px;
  }

  .di-summary-sidebar h4 {
    font-size:20px;
  }

  .di-steps-nav .di-step-pill {
    font-weight:500;
    font-size:14px;
  }

  .di-root-header h3 {
    font-size:22px;
  }

  .di-category-section .di-cat-name {
    font-size:18px;
  }

  .di-category-section p {
    line-height: 1.5;
    font-size:14px;
  }

  #di-summary-total span {
    font-size:14px;
  }

  .di-category-section .price-box {
    font-size:14px;
  }
}

@media (min-width:1201px) and (max-width:1500px) {
  .col-lgm-4 {
    width:33.3333333%;
  }

  .col-lgm-12 {
    width:100%;
  }

  .col-lgm-7 {
    width:58.3333333333%;
  }

  .col-lgm-5 {
    width:41.6666666667%;
  }
}

@media (max-width:1200px) {
  #di-summary-list .sidebar-row > div:nth-child(3) {
    width:90px;
    text-align:right;
  }

  .di-summary-sidebar .sidebar-img {
    width:40px;
  }
}

@media (max-width:991px) {
  .sm-hidden {
    display:none;
    visibility: hidden;
  }

  #total-price-configuration {
    display:block;
  }

  #diInquiryModal .modal-footer button.btn i {
    display:none;
    visibility: hidden;
  }

  #diInquiryModal .modal-header {
    display:block !important;
  }

  .di-steps-nav {
    margin-top:10px;
  }

  .di-root-header h3 {
    font-size:19px;
  }
}

@media (max-width:768px) {
  .xs-hidden {
    display:none;
    visibility: hidden;
  }

  .di-steps-nav .di-step-pill {
    font-size:13px;
  }
}