/**
 * @author [Webdojo] - Stile Box Upsell Multi-Prodotto e Variazioni
 */
.webdojo-upsell-container {
    margin: 30px 0;
    padding: 20px;
    background: #fdfdfd;
    border: 2px solid #f59100;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(245, 145, 0, 0.08);
}

.webdojo-upsell-main-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.webdojo-upsell-badge {
    background: #f59100;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.webdojo-upsell-main-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #222;
}

.webdojo-upsell-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.webdojo-upsell-item {
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.webdojo-upsell-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.webdojo-upsell-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.webdojo-upsell-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 5px;
    background: #fff;
}

.webdojo-upsell-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.webdojo-upsell-details {
    flex-grow: 1;
}

.webdojo-upsell-name {
    margin: 0 0 5px 0;
    font-weight: 700;
    color: #333;
    font-size: 14px;
}

.webdojo-upsell-variation-selector {
    margin: 8px 0;
}

.webdojo-upsell-variation-dropdown {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    color: #444;
    background: #fff;
}

.webdojo-upsell-price {
    font-weight: 800;
    color: #f59100;
    font-size: 16px;
}

.wj-placeholder {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    font-style: italic;
}

.webdojo-upsell-action {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    height: 40px;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.webdojo-upsell-qty-wrapper {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    padding: 0 5px;
    border-right: 1px solid #444;
}

.webdojo-upsell-qty {
    width: 40px !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    padding: 0 !important;
    -moz-appearance: textfield;
}

.webdojo-upsell-qty::-webkit-inner-spin-button, 
.webdojo-upsell-qty::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

.webdojo-btn-upsell-add {
    background: #222;
    color: #fff;
    border: none;
    padding: 0 15px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webdojo-btn-upsell-add:hover:not(:disabled) {
    background: #f59100;
}

.webdojo-upsell-action:has(.webdojo-btn-upsell-add:hover:not(:disabled)) {
    background: #f59100;
}

.webdojo-btn-upsell-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.webdojo-btn-upsell-add.success {
    background: #28a745;
}

.webdojo-upsell-action:has(.success) {
    background: #28a745;
}

/* Spinner */
.webdojo-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: wj-spin 0.8s linear infinite;
}

@keyframes wj-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .webdojo-upsell-content { flex-direction: column; text-align: center; }
    .webdojo-upsell-action { width: 100%; }
}
