/* ============================================================
   WC Popup Upsell – Modal stílusok
   ============================================================ */

/* Overlay / háttér – alap állapot: teljesen rejtett, semmi látványos stílus */
#wcpu-modal-overlay {
    display: none !important;
}

/* Nyitott állapot: JS hozzáadja a .wcpu-open osztályt */
#wcpu-modal-overlay.wcpu-open {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: wcpu-fade-in 0.22s ease forwards;
}

@keyframes wcpu-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal doboz */
.wcpu-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    animation: wcpu-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: inherit;
}

@keyframes wcpu-slide-up {
    from { transform: translateY(40px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Fejléc */
.wcpu-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.wcpu-modal__title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin: 0;
}

/* Bezáró gomb */
.wcpu-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.wcpu-modal__close:hover {
    background: #f5f5f5;
    color: #333;
}

.wcpu-modal__close svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Tartalom */
.wcpu-modal__body {
    display: flex;
    gap: 20px;
    padding: 24px;
    align-items: flex-start;
}

/* Termék kép */
.wcpu-modal__image-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    background: #fafafa;
}

.wcpu-modal__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Termék adatok */
.wcpu-modal__info {
    flex: 1;
    min-width: 0;
}

.wcpu-modal__product-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
    line-height: 1.3;
}

.wcpu-modal__product-name a {
    color: inherit;
    text-decoration: none;
}

.wcpu-modal__product-name a:hover {
    text-decoration: underline;
}

.wcpu-modal__price {
    font-size: 18px;
    font-weight: 700;
    color: #2e7d32;
    margin: 0 0 10px;
}

.wcpu-modal__price .woocommerce-Price-amount {
    color: inherit;
}

.wcpu-modal__desc {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gombok */
.wcpu-modal__footer {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Gombok – közös layout (színt, formát a téma adja a natv button osztályon át) */
.wcpu-btn {
    display: block;
    width: 100%;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.wcpu-btn:hover {
    text-decoration: none;
}

/* "Nem kérem" gomb – semleges, nem WC gomb stílusú */
.wcpu-btn--ghost {
    background: transparent;
    color: #999;
    border: 1.5px solid #e0e0e0;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.wcpu-btn--ghost:hover {
    background: #f5f5f5;
    color: #666;
}

/* Siker állapot (hozzáadva a kosárhoz visszajelzés) */
.wcpu-btn--success {
    opacity: 0.85;
    cursor: default;
}

/* Kosárikonos gomb tartalom */
.wcpu-btn__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wcpu-btn__inner svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Kosárba adva – checkmark animáció */
@keyframes wcpu-check-pop {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.wcpu-check-icon {
    animation: wcpu-check-pop 0.35s ease;
}

/* Reszponzív – kis képernyő */
@media (max-width: 480px) {
    .wcpu-modal__body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
        gap: 14px;
    }

    .wcpu-modal__image-wrap {
        width: 100px;
        height: 100px;
    }

    .wcpu-modal__footer {
        padding: 0 16px 20px;
    }

    .wcpu-modal__header {
        padding: 16px 16px 12px;
    }

    .wcpu-modal__product-name {
        font-size: 15px;
    }
}
