/* UXD WooCommerce Upsell Frontend Styles */

.uxd-upsell-box {
    margin: 24px 0 20px 0;
    padding: 20px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    transition: all 0.25s ease;
    box-sizing: border-box;
    clear: both;
}

.uxd-upsell-box *,
.uxd-upsell-box *::before,
.uxd-upsell-box *::after {
    box-sizing: border-box;
}

.uxd-upsell-header {
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 12px;
}

.uxd-upsell-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.uxd-upsell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #fff4e5;
    color: #e65100;
    border-radius: 50%;
    flex-shrink: 0;
}

.uxd-upsell-heading {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.uxd-upsell-subtitle {
    margin: 6px 0 0 0;
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.4;
}

/* Options Container */
.uxd-upsell-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Option Card */
.uxd-option-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    user-select: none;
    margin: 0;
}

.uxd-option-card:hover {
    background: #fdfdfd;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.uxd-option-card.is-selected {
    background: #fbfcfe;
    border-color: #0f172a;
    box-shadow: 0 0 0 1px #0f172a, 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Custom Radio */
.uxd-option-radio {
    margin-top: 3px;
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.uxd-option-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.uxd-radio-custom {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    background: #fff;
    transition: all 0.2s ease;
}

.uxd-option-card.is-selected .uxd-radio-custom {
    border-color: #0f172a;
    background: #0f172a;
    box-shadow: inset 0 0 0 4px #fff;
}

/* Option Details */
.uxd-option-details {
    flex: 1;
}

.uxd-option-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.uxd-name-with-tag {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.uxd-option-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.uxd-option-tagline {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.uxd-option-price-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.uxd-price-included {
    background: #ecfdf5;
    color: #065f46;
}

.uxd-price-upgrade {
    background: #0f172a;
    color: #ffffff;
}

.uxd-option-description {
    margin: 4px 0 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #4b5563;
}

/* Footer & Breakdown */
.uxd-upsell-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.uxd-tier-hint {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

/* Loading Overlay when switching options */
.uxd-upsell-box.is-loading {
    opacity: 0.65;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .uxd-upsell-box {
        padding: 16px 14px;
    }
    .uxd-option-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .uxd-option-price-badge {
        align-self: flex-start;
    }
}
