/* Pridanie do košíka (25. 10. 2026): stavy tlačidiel a okno po pridaní (assets/js/cart-feedback.js). */

/* STAV TLAČIDLA */
.is-vc-loading { cursor: wait !important; pointer-events: none; }
.is-vc-success, .is-vc-error { pointer-events: none; }
.vc-cart-state { display: inline-flex; gap: 10px; align-items: center; justify-content: center; }
.vc-cart-state__spinner { width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: vc-cart-spin .7s linear infinite; }
.vc-cart-state__icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.single_add_to_cart_button.is-vc-success,
.vc-pdp-secondary.is-vc-success,
.vc-pll__button.is-vc-success,
.vc-product-story__button.is-vc-success { background: #1fa34a !important; color: #ffffff !important; box-shadow: 0 12px 28px rgba(31, 163, 74, .28) !important; }
.single_add_to_cart_button.is-vc-error,
.vc-pdp-secondary.is-vc-error,
.vc-pll__button.is-vc-error,
.vc-product-story__button.is-vc-error { background: #d93b3b !important; color: #ffffff !important; box-shadow: 0 12px 28px rgba(217, 59, 59, .28) !important; }

/* Ikonové tlačidlo na karte produktu */
.vc-product-card__cart.is-vc-loading .vc-product-card__cart-icon,
.vc-product-card__cart.is-vc-success .vc-product-card__cart-icon,
.vc-product-card__cart.is-vc-error .vc-product-card__cart-icon { opacity: 0; }
.vc-product-card__cart.is-vc-loading::after,
.vc-product-card__cart.is-vc-success::after,
.vc-product-card__cart.is-vc-error::after { content: ""; position: absolute; inset: 50% auto auto 50%; }
.vc-product-card__cart.is-vc-loading::after { width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid rgba(163, 255, 0, .24); border-top-color: #a3ff00; border-radius: 50%; animation: vc-cart-spin .7s linear infinite; }
.vc-product-card__cart.is-vc-success { background: #1fa34a !important; color: #ffffff !important; }
.vc-product-card__cart.is-vc-success::after { width: 14px; height: 8px; margin: -6px 0 0 -7px; border-bottom: 3px solid #ffffff; border-left: 3px solid #ffffff; transform: rotate(-45deg); }
.vc-product-card__cart.is-vc-error { background: #d93b3b !important; color: #ffffff !important; }
.vc-product-card__cart.is-vc-error::after { content: "!"; margin: -0.62em 0 0 -0.2em; color: #ffffff; font-size: 20px; font-weight: 800; line-height: 1.2; }
/* WooCommerce by po pridaní vložil vedľa tlačidla odkaz „Zobraziť košík“ – nahrádza ho okno. */
.added_to_cart.wc-forward { display: none !important; }

@keyframes vc-cart-spin { to { transform: rotate(360deg); } }

/* OKNO */
html.vc-cart-popup-open { overflow: hidden; }
.vc-cart-popup,
.vc-cart-popup *,
.vc-cart-popup *::before,
.vc-cart-popup *::after { box-sizing: border-box; }
.vc-cart-popup[hidden] { display: none; }
.vc-cart-popup { position: fixed; inset: 0; z-index: 100000; display: grid; grid-template-columns: minmax(0, 1fr); padding: 20px; place-items: center; }
.vc-cart-popup__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .66); opacity: 0; backdrop-filter: blur(4px); transition: opacity .18s ease; }
.vc-cart-popup__dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 28px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; background: radial-gradient(circle at 100% 0, rgba(163, 255, 0, .08), transparent 38%), #111311; box-shadow: 0 40px 100px rgba(0, 0, 0, .55); color: #ffffff; opacity: 0; outline: none; transform: translateY(16px) scale(.98); transition: opacity .18s ease, transform .22s ease; }
.vc-cart-popup.is-open .vc-cart-popup__backdrop { opacity: 1; }
.vc-cart-popup.is-open .vc-cart-popup__dialog { opacity: 1; transform: none; }
.vc-cart-popup__close { position: absolute; top: 14px; right: 14px; display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #ffffff; font-size: 26px; line-height: 1; cursor: pointer; }
.vc-cart-popup__close:hover,
.vc-cart-popup__close:focus-visible { background: rgba(255, 255, 255, .14); }
.vc-cart-popup__head { display: flex; gap: 14px; margin: 0 48px 20px 0; align-items: center; }
.vc-cart-popup__badge { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--vc-green, #a3ff00), var(--vc-green-dark, #22c55e)); color: #050505; }
.vc-cart-popup__badge .vc-cart-state__icon { width: 24px; height: 24px; stroke-width: 3; }
.vc-cart-popup.is-error .vc-cart-popup__badge { background: #d93b3b; color: #ffffff; }
.vc-cart-popup__head h2 { margin: 0; color: #ffffff; font-size: 24px; font-weight: 750; line-height: 1.2; }

.vc-cart-popup__items { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.vc-cart-popup__items li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; padding: 10px; align-items: center; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.vc-cart-popup__items img { display: block; width: 72px; height: 72px; border-radius: 10px; background: #1c1f1c; object-fit: cover; }
.vc-cart-popup__items strong { display: block; color: #ffffff; font-size: 15px; font-weight: 650; line-height: 1.35; }
.vc-cart-popup__items small { display: block; margin-top: 4px; color: rgba(255, 255, 255, .6); font-size: 13px; }
.vc-cart-popup__items em { color: #ffffff; font-size: 15px; font-style: normal; font-weight: 750; white-space: nowrap; }
.vc-cart-popup__summary { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); color: #ffffff; font-size: 15px; font-weight: 650; }
.vc-cart-popup__note { margin: 8px 0 0; color: rgba(255, 255, 255, .62); font-size: 13px; line-height: 1.5; }
.vc-cart-popup__note a { color: var(--vc-green, #a3ff00); font-weight: 700; }
.vc-cart-popup__errors { display: grid; gap: 8px; margin: 0; padding: 14px 16px; border: 1px solid rgba(217, 59, 59, .45); border-radius: 14px; background: rgba(217, 59, 59, .1); list-style: none; }
.vc-cart-popup__errors li { color: #ffd7d7; font-size: 15px; line-height: 1.5; }

.vc-cart-popup__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.vc-cart-popup__primary,
.vc-cart-popup__secondary { display: inline-flex; min-height: 54px; padding: 0 22px; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 750; text-align: center; text-decoration: none; cursor: pointer; transition: filter .18s ease, transform .18s ease, background .18s ease; }
.vc-cart-popup__primary { border: 0; background: linear-gradient(90deg, var(--vc-green, #a3ff00), var(--vc-green-dark, #22c55e)); color: #070707 !important; }
.vc-cart-popup__primary:hover,
.vc-cart-popup__primary:focus-visible { filter: brightness(1.05); transform: translateY(-1px); }
.vc-cart-popup__secondary { border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #ffffff; }
.vc-cart-popup__secondary:hover,
.vc-cart-popup__secondary:focus-visible { background: rgba(255, 255, 255, .07); }
.vc-cart-popup__primary:focus-visible,
.vc-cart-popup__secondary:focus-visible,
.vc-cart-popup__link:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.vc-cart-popup__link { grid-column: 1 / -1; justify-self: center; padding: 6px 4px; color: rgba(255, 255, 255, .75); font-size: 14px; font-weight: 650; text-underline-offset: 4px; }
.vc-cart-popup__link:hover { color: var(--vc-green, #a3ff00); }

@media (max-width: 600px) {
    .vc-cart-popup { padding: 0; place-items: end stretch; }
    .vc-cart-popup__dialog { width: 100%; max-height: 88vh; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 20px 20px 0 0; transform: translateY(40px); }
    .vc-cart-popup__head h2 { font-size: 20px; }
    .vc-cart-popup__items li { grid-template-columns: 60px minmax(0, 1fr); }
    .vc-cart-popup__items strong { overflow-wrap: anywhere; }
    .vc-cart-popup__items img { width: 60px; height: 60px; }
    .vc-cart-popup__items em { grid-column: 2; font-size: 14px; }
    .vc-cart-popup__actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .vc-cart-popup__backdrop,
    .vc-cart-popup__dialog { transition: none; }
    .vc-cart-state__spinner,
    .vc-product-card__cart.is-vc-loading::after { animation-duration: 1.6s; }
}
