/* Itatools.cz – Sdílený košík v1.1.0 | FTP: /user/documents/upload/AA-upravy/ita-shared-cart.css */
:root {
  --itsc-primary: #0f5885;        /* = tlačítko „Pokračovat“ v košíku (.btn-conversion) */
  --itsc-primary-hover: #0b4264;
  --itsc-share-radius: 76px;      /* tvar „pilulky“ jako „Pokračovat“; pro hranatější vzhled např. 8px */
  --itsc-text: #222;
  --itsc-muted: #666;
  --itsc-bg: #fff;
  --itsc-border: #d9d9d9;
  --itsc-radius: 6px;
  --itsc-z: 100000;
}

.itsc-noscroll { overflow: hidden; }

/* Tlačítka */
.itsc-share-wrap { margin: 12px 0; text-align: right; }
.itsc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--itsc-radius); border: 1px solid transparent;
  font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.itsc-btn:focus-visible { outline: 2px solid var(--itsc-primary); outline-offset: 2px; }
.itsc-btn--primary { background: var(--itsc-primary); color: #fff; }
.itsc-btn--primary:hover { background: var(--itsc-primary-hover); }
.itsc-btn--secondary { background: var(--itsc-bg); color: var(--itsc-text); border-color: var(--itsc-border); }
.itsc-btn--secondary:hover { border-color: var(--itsc-text); }
/* „Sdílet košík“ – sekundární tlačítko pod „Pokračovat“: stejná barva a tvar, ale obrysové,
   aby nekonkurovalo hlavnímu CTA. */
.itsc-btn--share {
  padding: 10px 20px; border-radius: var(--itsc-share-radius);
  background: var(--itsc-bg); color: var(--itsc-primary); border-color: var(--itsc-primary);
  font-weight: 400;
}
.itsc-btn--share:hover { background: #eef4f8; color: var(--itsc-primary-hover); border-color: var(--itsc-primary-hover); }
.itsc-btn__icon { flex: none; width: 16px; height: 16px; }
/* Umístění v souhrnném boxu pod „Pokračovat“: na střed a na celou šířku boxu */
.next-step--cart + .itsc-share-wrap { margin: 10px 0 0; text-align: center; }
.next-step--cart + .itsc-share-wrap .itsc-btn--share { width: 100%; }

/* Modální okno */
.itsc-overlay {
  position: fixed; inset: 0; z-index: var(--itsc-z);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .55);
}
.itsc-modal {
  position: relative; width: 100%; max-width: 560px; padding: 28px 24px 20px;
  background: var(--itsc-bg); color: var(--itsc-text);
  border-radius: calc(var(--itsc-radius) * 2); box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  animation: itsc-pop .18s ease-out;
}
.itsc-modal__close, .itsc-toast__close {
  position: absolute; top: 8px; right: 10px; padding: 0 6px;
  background: none; border: 0; font-size: 26px; line-height: 1; color: var(--itsc-muted); cursor: pointer;
}
.itsc-modal__close:hover, .itsc-toast__close:hover { color: var(--itsc-text); }
.itsc-modal__title { margin: 0 0 10px; font-size: 1.35em; }
.itsc-modal__intro { margin: 0 0 6px; }
.itsc-modal__count { margin: 0 0 14px; color: var(--itsc-muted); font-size: .9em; }
.itsc-modal__row { display: flex; gap: 8px; }
.itsc-modal__input {
  flex: 1 1 auto; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--itsc-border); border-radius: var(--itsc-radius);
  font: inherit; font-size: .9em; color: var(--itsc-text); background: #f7f7f7;
}
.itsc-modal__actions { display: flex; gap: 8px; }
.itsc-modal__status { min-height: 1.4em; margin: 10px 0 0; font-size: .9em; }
.itsc-modal__status.is-ok { color: #1e7e34; }
.itsc-modal__status.is-error { color: #b00020; }

@media (max-width: 520px) {
  .itsc-share-wrap { text-align: center; }
  .itsc-share-wrap .itsc-btn { width: 100%; }
  .itsc-modal__row { flex-direction: column; }
  .itsc-modal__actions .itsc-btn { flex: 1; }
}

/* Toast se zprávou */
.itsc-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: var(--itsc-z);
  max-width: min(420px, calc(100vw - 32px)); padding: 14px 40px 14px 16px;
  background: var(--itsc-bg); color: var(--itsc-text);
  border-left: 5px solid #1e7e34; border-radius: var(--itsc-radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2); animation: itsc-pop .2s ease-out;
}
.itsc-toast--warning { border-left-color: #e0a800; }
.itsc-toast--error { border-left-color: #b00020; }
.itsc-toast--info { border-left-color: #0069d9; }
.itsc-toast__title { display: block; }
.itsc-toast__line { margin: 6px 0 0; font-size: .9em; color: var(--itsc-muted); word-break: break-word; }

/* Loader při přidávání */
.itsc-loader {
  position: fixed; inset: 0; z-index: var(--itsc-z);
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .75);
}
.itsc-loader__box {
  display: flex; align-items: center; gap: 12px; padding: 16px 22px;
  background: var(--itsc-bg); color: var(--itsc-text); border-radius: var(--itsc-radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}
.itsc-loader__spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--itsc-border); border-top-color: var(--itsc-primary);
  animation: itsc-spin .8s linear infinite;
}

@keyframes itsc-spin { to { transform: rotate(360deg); } }
@keyframes itsc-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .itsc-modal, .itsc-toast { animation: none; }
}
