
/* Overlay pro XY banner popup */
.wt-xy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Vlastní popup */
.wt-xy-popup {
    background: #ffffff;
    max-width: 720px;
    width: 90%;
    max-height: calc(100dvh - 32px);
    padding: 24px 28px 28px;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    position: relative;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Zavírací křížek */
.wt-xy-close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.wt-xy-header {
    margin-bottom: 20px;
}

.wt-xy-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.wt-xy-subtitle {
    font-size: 14px;
    color: #4b5563;
}

.wt-xy-banners-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wt-xy-sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    min-height: 0;
    flex: 1 1 auto;
    padding-right: 4px;
}

.wt-xy-banner-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px;
    background: #ffffff;
}

.wt-xy-section-subtitle {
    margin: 10px 2px 12px;
    font-size: 14px;
    color: #4b5563;
}

.wt-xy-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.wt-xy-loading {
    padding: 14px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #475569;
    background: #f8fafc;
    font-size: 14px;
}

.wt-xy-product-card {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
    padding: 12px;
}

.wt-xy-product-card.is-disabled {
    opacity: 0.55;
}

.wt-xy-product-image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    background: #ffffff;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.wt-xy-product-body {
    flex: 1;
    min-width: 0;
}

.wt-xy-product-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
}

.wt-xy-product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wt-xy-product-amount {
    width: 58px;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    text-align: center;
    background: #ffffff;
}

.wt-xy-product-button {
    border: none;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    cursor: pointer;
}

.wt-xy-product-button:disabled {
    cursor: not-allowed;
    background: #94a3b8;
}

.wt-xy-banner-item .cart-xyDiscount__banner {
    margin: 0;
}

.wt-xy-banner-item .cart-xyDiscount__title {
    margin-top: 0;
}

.wt-xy-banner-item button,
.wt-xy-banner-item .btn,
.wt-xy-banner-item [class*="button"] {
    border-radius: 999px;
}

/* ── Progress bar v košíku ── */
.wt-xy-progress-wrap {
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wt-xy-progress-group {
    background: linear-gradient(180deg, #ecfdf5 0%, #dff7ee 100%);
    border: 1px solid #b7e4ce;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: background 0.3s, border-color 0.3s;
}

.wt-xy-progress-group.is-eligible {
    border-color: #9ed4bb;
    max-width: 900px;
    margin: auto;
    width: -webkit-fill-available;
}

.wt-xy-progress-header {
    display: flex;
    align-items: center;
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin: auto;
}

.wt-xy-progress-heading {
    line-height: 1.35;
    color: #1f2937;
}

.wt-xy-progress-label {
    font-size: 14px;
    color: #14532d;
    line-height: 1.35;
    text-align: center;
    margin-bottom: 12px;
}

.wt-xy-progress-label strong {
    color: #166534;
}

.wt-xy-progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    width: 100%;
    flex-wrap: nowrap;
    padding: 2px 0;
    max-width: 600px;
    margin: auto;
}

.wt-xy-progress-steps::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    height: 2px;
    background: #c7d9ce;
    transform: translateY(-50%);
    z-index: 0;
}

.wt-xy-progress-step {
    width: 44px;
    height: 34px;
    border-radius: 4px;
    border: 1px solid #b6d3c1;
    background: rgba(255, 255, 255, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.wt-xy-progress-step::after {
    display: none;
}

.wt-xy-progress-step.is-complete,
.wt-xy-progress-step.is-earned,
.wt-xy-progress-step.is-selected {
    background: linear-gradient(180deg, #17803c 0%, #0f6a31 100%);
    border-color: #0d5d2b;
}

.wt-xy-progress-step.is-pending {
    background: rgba(113, 128, 150, 0.18);
    border-color: rgba(113, 128, 150, 0.24);
    color: transparent;
}

.wt-xy-progress-step.is-gift {
    width: 44px;
    border-radius: 999px;
}

.wt-xy-progress-step.is-gift.is-pending {
    background: rgba(113, 128, 150, 0.14);
}

.wt-xy-progress-step-gift {
    width: 24px;
    height: 18px;
    display: block;
}

.wt-xy-progress-countdown {
    font-size: 15px;
    color: #1f2937;
    text-align: center;
    line-height: 1.35;
    margin-top: 14px;
}

.wt-xy-pick-btn {
    border: none;
    border-radius: 999px;
    background: #15803d;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
    align-self: center;
    transition: background 0.2s, transform 0.15s;
    margin: 10px;
}

.wt-xy-pick-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.wt-xy-pick-btn:active {
    transform: translateY(0);
}

.wt-xy-pick-btn:disabled {
    background: #86efac;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

@media (max-width: 600px) {
    .wt-xy-overlay {
        align-items: flex-start;
        padding: 10px;
    }

    .wt-xy-popup {
        width: 100%;
        max-height: calc(100dvh - 20px);
        padding: 18px 16px 16px;
    }

    .wt-xy-sections {
        padding-right: 2px;
    }

    .wt-xy-progress-group {
        padding: 12px 14px;
    }

    .wt-xy-progress-header,
    .wt-xy-progress-label {
        font-size: 13px;
    }

    .wt-xy-progress-step {
        width: 30px;
        height: 25px;
    }

    .wt-xy-progress-step.is-gift {
        width: 30px;
    }
}