/* Modern Addon Styles */
.wccpa-addons-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.wccpa-addons-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #111827;
    font-weight: 600;
}

.wccpa-addon-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.wccpa-addon-item:last-child {
    margin-bottom: 0;
}

.wccpa-addon-item:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.wccpa-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Custom Checkbox */
.wccpa-custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    display: inline-block;
    transition: all 0.2s ease;
    background: white;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Checkbox Checked State */
.wccpa-checkbox:checked + .wccpa-custom-checkbox {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

/* Checkmark Icon */
.wccpa-checkbox:checked + .wccpa-custom-checkbox::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wccpa-addon-title {
    font-size: 15px;
    color: #374151;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wccpa-addon-price-display {
    color: #059669;
    font-weight: 600;
    font-size: 14px;
}

/* Total Price Display Update Area */
.wccpa-total-price-display {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    font-size: 18px;
    font-weight: bold;
    color: #111827;
    display: none; /* Shown dynamically by JS if addons are checked */
}

/* Image Thumbnail */
.wccpa-addon-thumbnail {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 12px;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    cursor: zoom-in;
    box-sizing: border-box;
}

.wccpa-addon-thumbnail:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Modern Lightbox Popup */
.wccpa-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wccpa-popup-overlay.wccpa-active {
    opacity: 1;
    pointer-events: auto;
}

.wccpa-popup-content {
    position: relative;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wccpa-popup-overlay.wccpa-active .wccpa-popup-content {
    transform: scale(1);
}

.wccpa-popup-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: block;
}

.wccpa-popup-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: #111827;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s, transform 0.2s;
}

.wccpa-popup-close:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .wccpa-popup-close {
        top: -45px;
        right: 0;
    }
}
