/* Empêcher le scroll du body quand la popup est ouverte */
body.osc-upsell-popup-open {
    overflow: hidden;
}

/* Popup Upsell Styles */
.osc-upsell-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.osc-upsell-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.osc-upsell-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.osc-upsell-popup-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
}

.osc-upsell-illustration, .osc-upsell-popup-content-inner {
    width: 50%;
}

.osc-upsell-illustration img {
    object-fit: cover;
    height: 100%!important;
    width: 100%;
}

.osc-upsell-popup.show .osc-upsell-popup-content {
    transform: scale(1);
}

/* Header */
.osc-upsell-popup-header {
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 24px 24px 16px;
}

.osc-upsell-popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--e-global-color-primary, #333);
    font-family: "EB Garamond", serif;
}

.osc-upsell-popup-close {
    background: none !important;
    border: none !important;
    color: #999 !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    background-color: transparent !important;
}

.osc-upsell-popup-close svg {
    width: 15px;
    height: 15px;
}

.osc-upsell-popup-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Body */
.osc-upsell-popup-body {
    padding: 0 24px 24px 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.osc-upsell-popup-body h2 {
    font-size: 24px;
    font-family: var(--e-global-typography-accent-font-family);
    color: var(--e-global-color-primary);
    font-weight: 600;
    text-align: center;
}

.osc-upsell-popup-subtitle {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #666;
    text-align: center;
}

.osc-upsell-popup-products {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.osc-upsell-popup-product {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.osc-upsell-popup-product:hover {
    border-color: var(--e-global-color-primary, #007cba);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
}

.osc-upsell-popup-product.added {
    border-color: #4CAF50;
    background: #f8fff8;
}

.osc-upsell-popup-product-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.osc-upsell-popup-product-image img {
    width: 100%;
    height: 100%!important;
    object-fit: cover;
    border-radius: 8px;
}

.osc-upsell-popup-product-info {
    flex: 1;
    min-width: 0;
}

.osc-upsell-popup-product-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--e-global-color-primary, #333);
    font-family: "EB Garamond", serif;
    line-height: 1.3;
}

.osc-upsell-popup-product-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--e-global-color-primary, #007cba);
}

.osc-upsell-popup-add-button {
    background: var(--e-global-color-primary, #007cba);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.osc-upsell-popup-add-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.osc-upsell-popup-add-button.added {
    background: #4CAF50;
    pointer-events: none;
}

.osc-upsell-popup-add-button.added .osc-upsell-popup-add-text {
    display: none;
}

.osc-upsell-popup-add-button.added .osc-upsell-popup-add-icon {
    display: block;
}

.osc-upsell-popup-add-icon {
    display: none;
    font-size: 18px;
    font-weight: bold;
}

/* Footer */
.osc-upsell-popup-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.osc-upsell-popup-skip {
    background: transparent;
    border: 2px solid #ddd;
    color: #666;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.osc-upsell-popup-skip:hover {
    border-color: #999;
    color: #333;
}

.osc-upsell-popup-continue {
    background: var(--e-global-color-primary, #007cba);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.osc-upsell-popup-continue:hover:not(:disabled) {
    background: #005a87;
}

.osc-upsell-popup-continue:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.osc-upsell-popup-no-thanks {
    width: 100% !important;
    background: transparent !important;
    color: var(--e-global-color-primary) !important;
    font-size: 13px !important;
    border: 2px solid var(--e-global-color-primary) !important;
    border-radius: 13px !important;
    transition: all 0.2s ease !important;
    padding: 12px 24px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    outline: none !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
}

.osc-upsell-popup-no-thanks:hover {
    background: var(--e-global-color-primary) !important;
    color: #fff !important;
    border-color: var(--e-global-color-primary) !important;
}

/* État de chargement du bouton Ajouter */
.osc-upsell-popup-add-button.loading {
    color: transparent !important;
    position: relative;
}

.osc-upsell-popup-add-button.loading::after {
    content: "";
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: osc-spinner 0.6s linear infinite;
}

@keyframes osc-spinner {
    to { transform: rotate(360deg); }
}

/* État ajouté du bouton */
.osc-upsell-popup-add-button.added {
    background-color: #4CAF50;
    color: white;
    cursor: default;
}

.osc-upsell-popup-add-button.added .osc-upsell-popup-add-text {
    color: white;
}

.osc-upsell-popup-add-button.added .osc-upsell-popup-add-icon {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .osc-upsell-popup-content {
        width: 85%;
        max-height: 90vh;
        flex-direction: column;
    }

    .osc-upsell-illustration, .osc-upsell-popup-content-inner {
        width: 100%;
    }

    .osc-upsell-illustration {
        order: 2;
        height: 300px;
    }

    .osc-upsell-illustration img {
        height: 300px;
    }

    .osc-upsell-popup-add-button {
        display: block!important;
        width: 100%!important;
        margin-top: 12px;
        margin-left: 0;
        margin-right: 0;
        border: none !important;
        border-radius: 8px;
        box-sizing: border-box;
    }
    
    .osc-upsell-popup-header h2 {
        font-size: 20px;
    }
    
    .osc-upsell-popup-product {
        padding: 12px;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .osc-upsell-popup-product-image {
        width: 50px;
        height: 50px;
    }
    
    .osc-upsell-popup-add-button {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .osc-upsell-popup-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .osc-upsell-popup-skip,
    .osc-upsell-popup-continue {
        width: 100%;
    }
} 