/**
 * Transtoyou Upsell Popup - Modern Design System
 * Version: 2.0
 * Matching shipping-conflict-popup design exactly
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Animation Timing */
    --tty-animation-fast: 0.2s;
    --tty-animation-normal: 0.3s;
    --tty-animation-slow: 0.5s;

    /* Easing Functions */
    --tty-ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --tty-ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);
    --tty-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   Popup Base Structure
   ============================================ */
#tty-upsell-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    perspective: 1000px;
    display: none;
}

/* Active state - toon de popup */
#tty-upsell-popup.active {
    display: block;
}

/* Overlay with blur effect - EXACT same as shipping popup */
#tty-upsell-popup .popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity var(--tty-animation-normal) ease;
}

#tty-upsell-popup.active .popup-overlay {
    opacity: 1;
}


/* Popup Content - Modern design */
#tty-upsell-popup .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 30px;
    transform: translate(-50%, -50%) scale(0.9) rotateX(10deg);
    background: var(--tty-bg-primary, #ffffff);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 580px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all var(--tty-animation-normal) var(--tty-ease-out);
}

#tty-upsell-popup.active .popup-content {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1) rotateX(0);
}

/* ============================================
   Popup Header
   ============================================ */
#tty-upsell-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 16px 32px;
    border-bottom: 1px solid var(--tty-border-light, #eaeaea);
    border-radius: 30px 30px 0px 0px;
    background: linear-gradient(180deg,
            var(--tty-bg-primary, #ffffff) 0%,
            rgba(var(--tty-bg-primary-rgb, 255, 255, 255), 0.95) 100%);
            
}

#tty-upsell-popup .popup-header h3 {
  margin: 0;
  font-size: 20px;
  align-items: center;
  display: flex;
  color: var(--tty-text-primary);
}

#tty-upsell-popup .popup-header h3 i {
  margin-right: 12px;
  font-size: 30px;
  color: var(--tty-header-primary);
}

/* Close Button - Exact same style as shipping popup */
#tty-upsell-popup .close-popup {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--tty-animation-normal) ease;
    color: var(--tty-text-secondary, #666);
    font-size: 20px;
    overflow: hidden;
    position: absolute;
    right: 22px;
    top: -22px;
    box-shadow: 0 1px 7px rgba(13, 13, 13, 0.24);
    background: #fff;
}

#tty-upsell-popup .close-popup::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #ff4444;
    transform: scale(0);
    transition: transform var(--tty-animation-normal) ease;
    border-radius: 50%;
}

#tty-upsell-popup .close-popup:hover {
    color: white;
    transform: rotate(90deg);
}

#tty-upsell-popup .close-popup:hover::before {
    transform: scale(1);
}

#tty-upsell-popup .close-popup i {
    position: relative;
    z-index: 1;
}

/* ============================================
   Popup Body
   ============================================ */
#tty-upsell-popup .popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: var(--tty-bg-primary, #ffffff);
    overscroll-behavior: contain;
}

/* Custom Scrollbar */
#tty-upsell-popup .popup-body::-webkit-scrollbar {
    width: 10px;
}

#tty-upsell-popup .popup-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

#tty-upsell-popup .popup-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

#tty-upsell-popup .popup-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* ============================================
   Success Message
   ============================================ */
.added-product-message {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg,
            rgba(40, 167, 69, 0.08) 0%,
            rgba(40, 167, 69, 0.04) 100%);
    border-radius: 16px;
    border: 2px solid rgba(40, 167, 69, 0.2);
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    align-items: center;
}

.added-product-message p {
  margin: 0px;
}

.added-product-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #28a745;
}

.success-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg,
            #28a745 0%,
            #34ce57 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(40, 167, 69, 0.2);
}

.success-icon i {
    font-size: 28px;
    color: white;
}

.added-product-message strong {
    font-weight: 700;
    color: var(--tty-primary, #005f5f);
}

/* ============================================
   Upsell Description Box
   ============================================ */
.upsell-description-box {
    text-align: center;
    margin-bottom: 24px;
}

.upsell-description-box p {
    margin: 0;
    font-size: 16px;
    color: var(--tty-text-secondary, #666);
    line-height: 1.6;
}

/* ============================================
   Upsell Products Grid
   ============================================ */
.upsell-products-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
}

/* Individual Product Item */
.upsell-product-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--tty-bg-secondary, #f9f9f9);
    border: 2px solid var(--tty-border-light, #eaeaea);
    border-radius: 16px;
    position: relative;
    transition: all var(--tty-animation-normal) ease;
    animation: slideInItem var(--tty-animation-slow) var(--tty-ease-out) both;
    cursor: pointer;
}

@keyframes slideInItem {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upsell-product-item:hover {
    border-color: var(--tty-primary, #005f5f);
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 95, 95, 0.1);
    background: var(--tty-bg-primary, #ffffff);
}

.upsell-product-item.selected {
    border-color: var(--tty-primary, #005f5f);
    background-color: #f5fafa;
}

/* Checkbox */
.upsell-product-checkbox {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

.upsell-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--tty-primary, #005f5f);
}

/* Positie aanpassen */
.upsell-product-selection {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
}

/* Verberg de standaard checkbox */
.upsell-checkbox {
    display: none;
}

/* Selection badge */
.selection-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: white;
    border: 2px solid var(--tty-primary, #005f5f);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--tty-primary, #005f5f);
    transition: all var(--tty-animation-fast) ease;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.selection-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 95, 95, 0.2);
}

/* Badge text */
.badge-text-add,
.badge-text-added {
    transition: all var(--tty-animation-fast) ease;
}

.badge-text-added,
.fa-box-circle-check {
    display: none;
}

/* Checked state */
.upsell-checkbox:checked~.selection-badge {
    background: var(--tty-primary, #005f5f);
    color: white;
    padding-right: 12px;
}

.upsell-checkbox:checked~.selection-badge .badge-text-add {
    display: none;
}

.upsell-checkbox:checked~.selection-badge .badge-text-added {
    display: block;
}

.upsell-checkbox:checked~.selection-badge .fa-box-circle-check {
    display: block;
    font-size: 12px;
    animation: checkIn var(--tty-animation-fast) var(--tty-ease-spring);
}

@keyframes checkIn {
    0% {
        transform: scale(0) rotate(-180deg);
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

/* Animatie class voor selectie feedback */
.upsell-product-selection.animate-selection .selection-badge {
    animation: selectionPulse 0.3s ease-out;
}

@keyframes selectionPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Update de selected card state - zachter effect */
.upsell-product-item.selected {
    border-color: var(--tty-primary, #005f5f);
    background: linear-gradient(to bottom right,
            rgba(0, 95, 95, 0.02),
            transparent);
    box-shadow: 0 0 0 1px rgba(0, 95, 95, 0.1);
}

/* Dark theme support voor badge */
[data-theme="dark"] .selection-badge {
    background: var(--tty-bg-tertiary, #2a3a3e);
    border-color: var(--tty-primary, #006e6e);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .upsell-checkbox:checked~.selection-badge {
    background: var(--tty-primary, #006e6e);
    color: white;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .upsell-product-selection {
        position: static;
        margin-top: 12px;
        display: flex;
        justify-content: center;
    }

    .selection-badge {
        padding: 8px 20px;
        font-size: 15px;
    }
}


/* Product Image */
.product-image {
    flex-shrink: 0;
}

.product-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--tty-border-light, #eaeaea);
    transition: transform var(--tty-animation-normal) ease;
}

.upsell-product-item:hover .product-image img {
    transform: scale(1.05);
}

/* Product Details */
.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.product-details h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--tty-text-primary, #121212);
    line-height: 1.3;
}

.product-details h4 label {
    cursor: pointer;
    display: block;
}

/* Variant Info */
.upsell-products-grid .variant-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-direction: row;
}

.variant-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: rgba(0, 95, 95, 0.08);
    color: var(--tty-primary, #005f5f);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(0, 95, 95, 0.1);
    transition: all var(--tty-animation-fast) ease;
}

#tty-upsell-popup .variant-badge:hover {
    background: rgba(0, 95, 95, 0.12);
    transform: translateY(-1px);
}

/* Variable Product Indicator */
#tty-upsell-popup .variable-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(229, 146, 76, 0.08);
    color: var(--tty-secondary, #E5924C);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(229, 146, 76, 0.1);
}

#tty-upsell-popup .variable-badge i {
    font-size: 12px;
}

/* Product Price */
#tty-upsell-popup .product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

#tty-upsell-popup .product-price .price {
    font-size: 22px;
    font-weight: 700;
    color: var(--tty-primary, #005f5f);
}

#tty-upsell-popup .product-price del {
    color: var(--tty-text-muted, #999);
    font-size: 0.85em;
    font-weight: 400;
}

#tty-upsell-popup .product-price ins {
    text-decoration: none;
}

/* Product Actions */
#tty-upsell-popup .product-actions {
    flex-shrink: 0;
    display: flex;
    align-items: end;
}

#tty-upsell-popup .view-product-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 95, 95, 0.08);
    color: var(--tty-primary, #005f5f);
    border-radius: 50%;
    transition: all var(--tty-animation-fast) ease;
    text-decoration: none;
}

.view-product-link:hover {
    background: var(--tty-primary, #005f5f);
    color: white;
    transform: scale(1.1);
}

.view-product-link i {
    font-size: 16px;
}

/* ============================================
   Popup Actions
   ============================================ */
#tty-upsell-popup .popup-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 32px;
    border-radius: 0px 0px 30px 30px;
    border-top: 1px solid var(--tty-border-light, #eaeaea);
}

/* Action Buttons Row */
.action-buttons-row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

/* Button Base Styles */
#tty-upsell-popup .button {
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-family: 'Figtree', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--tty-animation-normal) ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
    min-height: 48px;
    text-decoration: none;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

/* Primary Button - Add Selected Products */
#tty-upsell-popup .button-primary {
    background: linear-gradient(135deg,
            var(--tty-primary, #005F5F) 0%,
            var(--tty-primary-light, #2e8a8a) 100%);
    color: white;
    width: 100%;
    box-shadow:
        0 4px 14px rgba(0, 95, 95, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#tty-upsell-popup .button-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 100%);
    opacity: 0;
    transition: opacity var(--tty-animation-normal) ease;
}

#tty-upsell-popup .button-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(0, 95, 95, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#tty-upsell-popup .button-primary:hover::before {
    opacity: 1;
}

#tty-upsell-popup .button-primary:active {
    transform: translateY(0);
}

#tty-upsell-popup .button-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Secondary Button */
#tty-upsell-popup .button-secondary {
    border: 2px solid var(--tty-border-light, #e9e9ed);
    background: var(--tty-bg-secondary);
    color: var(--tty-text-primary);
}

#tty-upsell-popup .button-secondary:hover {
    background: var(--tty-bg-secondary, #f9f9f9);
    border-color: var(--tty-primary, #005F5F);
    color: var(--tty-primary, #005F5F);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Orange Button - View Cart */
#tty-upsell-popup .button-orange {
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--tty-primary);
  text-align: center;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: var(--tty-primary);
  color: white;
  width: fit-content;
}

#tty-upsell-popup .button-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 1px 10px rgba(0, 95, 95, 0.3);
}

/* Button Icons */
#tty-upsell-popup .button i {
    font-size: 18px;
    transition: transform var(--tty-animation-normal) ease;
}

#tty-upsell-popup .button:hover i.fa-right-long {
    transform: translateX(4px);
}

#tty-upsell-popup .button:hover i.fa-left-long {
    transform: translateX(-4px);
}

#tty-upsell-popup .button:hover i.fa-cart-shopping-fast {
    animation: cartBounce 0.5s ease-out;
}

@keyframes cartBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* ============================================
   Continue Shopping Options
   ============================================ */
.continue-options-view {
    display: none;
}

#tty-upsell-popup .continue-options-view {
    max-height: 90vh;
}

#tty-upsell-popup .popup-body {
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}
#tty-upsell-popup .main-popup-view .popup-body {
    max-height: calc(90vh - 319px);
}

.continue-options-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.continue-option-card {
    background: var(--tty-bg-secondary, #f9f9f9);
    border: 2px solid var(--tty-border-light, #eaeaea);
    border-radius: 24px;
    overflow: hidden;
    transition: all var(--tty-animation-normal) ease;
}

.continue-option-card:hover {
    border-color: var(--tty-primary, #005f5f);
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 95, 95, 0.1);
    background: var(--tty-bg-primary, #ffffff);
}

.continue-option {
    display: flex;
    padding: 14px;
    color: var(--tty-text-primary, #121212);
    text-decoration: none;
    align-items: center;
    gap: 20px;
}

.continue-option-card .option-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            rgba(0, 95, 95, 0.1) 0%,
            rgba(0, 95, 95, 0.05) 100%);
    border-radius: 16px;
    margin: 0px;
}

.continue-option-card .option-icon i {
    font-size: 32px;
    color: var(--tty-primary, #005f5f);
    transition: transform var(--tty-animation-normal) ease;
}

.continue-option-card .continue-option-card:hover .option-icon i {
    transform: scale(1.1);
}

.continue-option-card .option-content {
    flex: 1;
}

.continue-option-card .option-content h4 {
    margin: 0 0 3px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--tty-text-primary, #121212);
    line-height: 1.3;
}

.continue-option-card .option-content p {
    margin: 0;
    font-size: 15px;
    color: var(--tty-text-secondary, #666);
    line-height: 1.5;
}

/* ============================================
   Loader
   ============================================ */
.upsell-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    z-index: 10;
}

.woocommerce .upsell-loader .loader::before {
    display: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 95, 95, 0.1);
    border-top: 4px solid var(--tty-primary, #005f5f);
    border-radius: 50%;
    animation: l2 1s infinite linear;
    margin-bottom: 16px;
}

@keyframes l2 {
    to {
        transform: rotate(1turn)
    }
}

.upsell-loader p {
    margin: 0;
    font-size: 16px;
    color: var(--tty-text-primary, #121212);
    font-weight: 500;
}

/* ============================================
   Message Box
   ============================================ */
.message-box {
    padding: 12px 20px;
    border-radius: 12px;
    margin: 0 32px 20px 32px;
    font-weight: 500;
    text-align: center;
    animation: slideIn var(--tty-animation-normal) ease-out;
}

.message-box.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-box.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Dark Theme Support
   ============================================ */
[data-theme="dark"] #tty-upsell-popup .popup-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] #tty-upsell-popup .popup-content {
    background: var(--tty-bg-primary, #121212);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] #tty-upsell-popup .popup-header {
    background: linear-gradient(180deg,
            var(--tty-bg-primary, #121212) 0%,
            rgba(18, 18, 18, 0.95) 100%);
    border-bottom-color: var(--tty-border-medium, #2e2e2e);
}

[data-theme="dark"] #tty-upsell-popup .close-popup {
    background: rgba(255, 255, 255, 0.05);
    color: var(--tty-text-secondary, #999);
}

[data-theme="dark"] .added-product-message {
    background: linear-gradient(135deg,
            rgba(40, 167, 69, 0.05) 0%,
            rgba(40, 167, 69, 0.02) 100%);
    border-color: rgba(40, 167, 69, 0.15);
}

[data-theme="dark"] .upsell-product-item {
    background: var(--tty-bg-secondary, #1e2a2e);
    border-color: var(--tty-border-medium, #2e2e2e);
}

[data-theme="dark"] .upsell-product-item:hover {
    background: var(--tty-bg-tertiary, #2a3a3e);
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .upsell-product-item.selected {
    background-color: rgba(0, 95, 95, 0.1);
}

[data-theme="dark"] .variant-badge {
    background: rgba(0, 95, 95, 0.15);
    border-color: rgba(0, 95, 95, 0.2);
}

[data-theme="dark"] .variable-badge {
    background: rgba(229, 146, 76, 0.15);
    border-color: rgba(229, 146, 76, 0.2);
}

[data-theme="dark"] .continue-option-card {
    background: var(--tty-bg-secondary, #1e2a2e);
    border-color: var(--tty-border-medium, #2e2e2e);
}

[data-theme="dark"] .continue-option-card:hover {
    background: var(--tty-bg-tertiary, #2a3a3e);
}

[data-theme="dark"] #tty-upsell-popup .popup-actions {
    background: linear-gradient(180deg,
            rgba(30, 42, 46, 0.5) 0%,
            var(--tty-bg-secondary, #1e2a2e) 100%);
    border-top-color: var(--tty-border-medium, #2e2e2e);
}

[data-theme="dark"] #tty-upsell-popup .button-secondary {
    background: var(--tty-bg-tertiary, #2a3a3e);
    color: var(--tty-text-primary, #f0f0f0);
    border-color: var(--tty-border-medium, #2e2e2e);
}

[data-theme="dark"] #tty-upsell-popup .button-secondary:hover {
    background: var(--tty-bg-secondary, #1e2a2e);
    border-color: var(--tty-primary, #006e6e);
    color: var(--tty-primary-light, #4aadad);
}

/* Scrollbar Dark Theme */
[data-theme="dark"] #tty-upsell-popup .popup-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] #tty-upsell-popup .popup-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #tty-upsell-popup .popup-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    #tty-upsell-popup .popup-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }

    #tty-upsell-popup .popup-header {
        padding: 20px 24px;
    }

    #tty-upsell-popup .popup-header h3 {
        font-size: 20px;
    }

    #tty-upsell-popup .popup-header h3 i {
        font-size: 24px;
    }

    #tty-upsell-popup .popup-body {
        padding: 24px;
    }

    .added-product-message {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .upsell-product-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .upsell-product-checkbox {
        top: 12px;
        right: 12px;
    }

    .product-image img {
        width: 120px;
        height: 120px;
    }

    .product-details {
        align-items: center;
    }

    .variant-info {
        justify-content: center;
    }

    .product-actions {
        position: absolute;
        top: 12px;
        left: 12px;
    }

    .action-buttons-row {
        flex-direction: column;
    }

    #tty-upsell-popup .button-secondary,
    #tty-upsell-popup .button-orange {
        width: 100%;
    }

    .option-icon {
        width: 48px;
        height: 48px;
    }

    .option-icon i {
        font-size: 24px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    #tty-upsell-popup .popup-header h3 {
        font-size: 20px;
        gap: 10px;
    }

    #tty-upsell-popup .continue-option {
        padding: 10px;
    }

    #tty-upsell-popup .option-icon {
        width: 60px;
        height: 60px;
    }

    #tty-upsell-popup .option-content h4 {
        font-size: 20px;
    }

    #tty-upsell-popup .option-content p {
        font-size: 14px;
        margin: 0;
    }

    .success-icon {
        width: 48px;
        height: 48px;
    }

    .success-icon i {
        font-size: 24px;
    }

    .product-image img {
        width: 100px;
        height: 100px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    #tty-upsell-popup,
    #tty-upsell-popup * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #tty-upsell-popup.active .popup-content {
        transform: translate(-50%, -50%) !important;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    #tty-upsell-popup .popup-content {
        border: 2px solid;
    }

    .upsell-product-item,
    .continue-option-card {
        border-width: 3px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #tty-upsell-popup {
        display: none !important;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

/* Prevent body scroll when popup is open */
body.tty-popup-open {
    overflow: hidden;
    position: relative;
}

/* Prevent iOS bounce */
body.tty-popup-open::before {
    content: '';
    position: fixed;
    top: -1px;
    left: 0;
    width: 100%;
    height: calc(100% + 2px);
    background: transparent;
    z-index: -1;
}