/* Auto-extracted from custom-quick-order.php */
#cqo-list table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #ddd;border-radius:15px;overflow:hidden}
#cqo-list th,#cqo-list td{border-bottom:1px solid #eee;padding:10px;text-align:left;vertical-align:middle}
#cqo-list input[type="number"]{max-width:110px}
.accordion-inner { padding: 10px !important; }
.cqo-search-only .input-wrapper { position: relative; flex: 1 1 200px; display: flex; align-items: center; }
.cqo-search-only .clear-input { position: absolute; left: 10px; top: 30px; transform: translateY(-50%); font-size: 20px; color: var(--dark-blue); cursor: pointer; display: none; z-index: 2; }
.cqo-search-only .add-btn-icon { position: absolute; top: 0; right: 0; height: 60px; width: 60px; background-color: var(--green); color: #fff; border: none; border-radius: 0 15px 15px 0; font-size: 24px; font-weight: bold; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1; margin: 0; padding: 0; }
.cqo-search-only .add-btn-icon:disabled { background-color: #ccc; cursor: not-allowed; }
.cqo-search-only .add-btn-icon:hover:not(:disabled) { background-color: var(--dark-blue); }
.cqo-search-only .quote-search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cqo-search-only .cqo-product-search { flex: 1; height: 60px; padding: 0 80px 0 25px; font-size: 16px; border: 1px solid #ccc; border-radius: 15px; background-color: #bddfee; outline: none; box-sizing: border-box; margin-bottom: 5px !important; }
.cqo-search-only .cqo-search-results { list-style: none; margin: 0; padding: 0; border: none; border-radius: 15px; max-height: 300px; overflow-y: auto; background: #fff; box-sizing: content-box !important; width: 100%; }
.cqo-search-only .cqo-search-results.has-results { border: 1px solid #ccc; }
.cqo-search-only .cqo-search-results li { display: flex; align-items: center; gap: 10px; margin: 0px !important; padding: 8px 20px !important; }
.cqo-search-only .cqo-search-results li img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; flex-shrink: 0; background: #f2f2f2; }
.cqo-search-only .cqo-search-results li div { display: flex; flex-direction: column; }
.cqo-search-only .cqo-search-results li span { font-size: 16px; }
.cqo-search-only .cqo-search-results li span:nth-child(2) { font-size: 12px; color: #888; margin-top: 5px; }
.cqo-search-only .cqo-search-results li:hover, .cqo-search-only .cqo-search-results li.active { background-color: #f0f0f0; }
/* === ZÁKLADNÝ CTA VIZUÁL (spoločný) === */
#cqo-actions .cqo-btn{
  margin:15px 0;
}

/* Množstvo – stred */
#cqo-list td:nth-child(4),
#cqo-list th:nth-child(4){
  text-align:center;
}

/* Ceny – doprava */
#cqo-list td:nth-child(5),
#cqo-list th:nth-child(5),
#cqo-list td:nth-child(6),
#cqo-list th:nth-child(6){
  text-align:right;
  white-space:nowrap;
}

#cqo-list td:nth-child(4) .ux-quantity{
  margin: 0 auto;
}

/* ===== MOBILE layout pre quick order tabuľku (FIX) ===== */
@media (max-width: 768px){

  /* skryť hlavičku tabuľky */
  #cqo-list table thead{ display:none; }

  /* tabuľka -> stack */
  #cqo-list table,
  #cqo-list tbody{
    display:block;
    width:100%;
  }

  /* každý produkt = karta */
  #cqo-list tr{
    display:grid;
    grid-template-columns: 42px 56px 1fr 1fr; /* X | thumb | col3 | col4 */
    grid-template-rows: auto auto;            /* riadok1 | riadok2 */
    gap:10px;
    align-items:center;

    background:#fff;
    border:1px solid #eee;
    border-radius:14px;
    margin:10px 0;
    padding:10px;
  }

  /* td už nie sú "table-cells" */
  #cqo-list td{
    display:block;
    border:0 !important;
    padding:0 !important;
    margin:0 !important;
    min-width:0;
  }

  /* --- RIADOK 1 --- */
  /* remove (1. td) */
  #cqo-list tr td:nth-child(1){
    grid-column:1;
    grid-row:1;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    padding-top:2px !important;
  }

  /* thumb (2. td) */
  #cqo-list tr td:nth-child(2){
    grid-column:2;
    grid-row:1;
  }

  /* name (3. td) cez 2 stĺpce */
  #cqo-list tr td:nth-child(3){
    grid-column:3 / 5;
    grid-row:1;
  }

  /* --- RIADOK 2 --- */
  /* qty (4. td) cez prvé 2 stĺpce */
  #cqo-list tr td:nth-child(4){
    grid-column:1 / 3;
    grid-row:2;
  }

  /* unit price (5. td) */
  #cqo-list tr td:nth-child(5){
    grid-column:3;
    grid-row:2;
    text-align:right;
    white-space:nowrap;
  }

  /* line price (6. td) */
  #cqo-list tr td:nth-child(6){
    grid-column:4;
    grid-row:2;
    text-align:right;
    white-space:nowrap;
  }

  /* remove X */
  #cqo-list .cqo-remove{
    font-size:28px;
    line-height:1;
    text-decoration:none;
  }

  /* thumbnail */
  #cqo-list td.cqo-thumb img{
    width:44px;
    height:44px;
    object-fit:contain;
    border-radius:6px;
    background:#f5f5f5;
  }

  /* názov */
  #cqo-list tr td:nth-child(3) strong{
    display:block;
    line-height:1.25;
    word-break:break-word;
  }

  /* qty ovládač zarovnať doľava */
  #cqo-list tr td:nth-child(4) .ux-quantity{
    margin:0;
    justify-content:flex-start;
  }

  /* malé labely pre ceny */
  #cqo-list tr td:nth-child(5)::before{
    content:"JC bez DPH";
    display:block;
    font-size:12px;
    opacity:.7;
    margin-bottom:4px;
    text-align:right;
  }
  #cqo-list tr td:nth-child(6)::before{
    content:"Cena spolu";
    display:block;
    font-size:12px;
    opacity:.7;
    margin-bottom:4px;
    text-align:right;
  }
}

/* INFO správa – aktualizované */
#cqo-msg .woocommerce-message{
  background: #e6f4ff;          /* svetlomodrá */
  border-left: 4px solid var(--dark-blue, #004085);
  color: #0b3c5d;
  font-weight: 600;             /* BOLD */
  padding: 12px 16px;
  border-radius: 10px;
}

/* ERROR správa */
#cqo-msg .woocommerce-error{
  background: #fdecea;
  border-left: 4px solid #dc2626;
  color: #7a1c1c;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
}

/* spoločný základ */
#cqo-msg .woocommerce-message,
#cqo-msg .woocommerce-error{
  animation-duration: .25s;
  animation-timing-function: ease;
  animation-fill-mode: both;
}

/* ===== ANIMATION IN ===== */
#cqo-msg .cqo-anim-in{
  animation-name: cqoFadeIn;
}

/* ===== ANIMATION OUT ===== */
#cqo-msg .cqo-anim-out{
  animation-name: cqoFadeOut;
}

@keyframes cqoFadeIn{
  from{
    opacity:0;
    transform:translateY(-6px);
  }
  to{
    opacity:1;
    transform:none;
  }
}

@keyframes cqoFadeOut{
  from{
    opacity:1;
    transform:none;
  }
  to{
    opacity:0;
    transform:translateY(-6px);
  }
}

/* produktový obrázok v quick order */
#cqo-list td.cqo-thumb{
  width:64px;
}

#cqo-list td.cqo-thumb img{
  width:48px;
  height:48px;
  object-fit:contain;
  border-radius:6px;
  background:#f5f5f5;
}

/* Thumbnail – fix */
#cqo-list td.cqo-thumb{
  width:56px;              /* aby grid stĺpec mal “kotvu” */
  display:flex;
  align-items:center;
  justify-content:center;
}

#cqo-list td.cqo-thumb img{
  display:block !important;
  width:44px !important;
  height:44px !important;
  max-width:44px !important;
  max-height:44px !important;
  object-fit:contain;
  border-radius:6px;
  background:#f5f5f5;
}

/* Inline-style replacements */
.cqo-login-gate{margin:20px 0}
#cqo-quicklist{margin-top:20px}
#cqo-actions{display:none;gap:10px;flex-wrap:wrap;margin-top:10px}
.cqo-empty-list{opacity:.75}
.cqo-col-remove{width:42px}
.cqo-col-thumb{width:64px}
.cqo-sku{opacity:.7;font-size:12px}
.cqo-note{font-size:13px;opacity:.85}
.cqo-hidden{display:none}
.cqo-bar-inner{width:0%}

/* Show guest menu item only for logged-in users */
body.cqo-hide-menu-guest #cqo-menu{display:none !important}
