/* Download Control Public Styles */

/* Custom Sale Badge with Percentage */
.onsale.dc-percentage-badge {
    background: #e74c3c !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3) !important;
    text-align: center !important;
    line-height: 1 !important;
    min-width: auto !important;
    max-width: 80px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Ensure it works on product images */
.woocommerce span.onsale.dc-percentage-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 9 !important;
    margin: 0 !important;
}

/* Shop page and archive styling */
.woocommerce ul.products li.product .onsale.dc-percentage-badge {
    top: 12px !important;
    right: 12px !important;
}

/* Single product page styling */
.woocommerce div.product .onsale.dc-percentage-badge {
    top: 15px !important;
    right: 15px !important;
}

/* LICENSE TERMS STYLING - Clean White Background with Black Text */
.dc-license-terms {
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.dc-license-terms h3 {
    margin: 0 0 15px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    border-bottom: 2px solid #0073aa !important;
    padding-bottom: 8px !important;
}

.dc-license-details {
    margin-bottom: 15px !important;
}

.dc-license-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #eee !important;
}

.dc-license-item:last-child {
    border-bottom: none !important;
}

.dc-license-label {
    font-weight: 500 !important;
    color: #333333 !important;
    font-size: 14px !important;
}

.dc-license-value {
    font-weight: 600 !important;
    color: #000000 !important;
    font-size: 14px !important;
    background: #f9f9f9 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
}

.dc-license-description {
    background: #ffffff !important;
    padding: 15px !important;
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333333 !important;
    margin-top: 15px !important;
}

.dc-license-description::before {
    content: "ℹ️" !important;
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* Cart License Terms - Clean White */
.dc-cart-license-terms {
    margin-top: 8px !important;
    padding: 8px 12px !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
    border-left: 3px solid #0073aa !important;
}

.dc-license-summary {
    color: #333333 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* Checkout License Terms - Clean White */
.dc-checkout-license-terms {
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.dc-checkout-license-terms h3 {
    margin: 0 0 15px 0 !important;
    color: #000000 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

.dc-checkout-license-notice p {
    margin: 0 0 15px 0 !important;
    color: #333333 !important;
}

.dc-checkout-product-license {
    margin-bottom: 10px !important;
    padding: 10px !important;
    background: #f9f9f9 !important;
    border-radius: 4px !important;
    border-left: 3px solid #0073aa !important;
    border: 1px solid #ddd !important;
}

.dc-checkout-product-license strong {
    color: #000000 !important;
}

/* Order License Terms - Clean White */
.dc-order-license-terms {
    margin-top: 10px !important;
    padding: 10px !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
    border-left: 3px solid #0073aa !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #333333 !important;
}

/* Email License Terms */
.dc-email-license-terms {
    font-family: Arial, sans-serif !important;
    background: #ffffff !important;
    color: #333333 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dc-license-terms {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .dc-license-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .dc-license-value {
        align-self: flex-end !important;
    }
    
    .dc-checkout-license-terms {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .dc-cart-license-terms {
        padding: 6px 10px !important;
    }
    
    .dc-license-summary {
        font-size: 11px !important;
    }
}

/* WooCommerce Integration */
.woocommerce div.product .dc-license-terms {
    margin: 20px 0 !important;
}

.woocommerce div.product .dc-license-terms h3 {
    font-size: 1.2em !important;
}

.woocommerce .dc-cart-license-terms,
.woocommerce-cart .dc-cart-license-terms {
    margin-top: 5px !important;
}

.woocommerce-checkout .dc-checkout-license-terms {
    margin: 20px 0 !important;
}

.woocommerce-order .dc-order-license-terms {
    margin-top: 8px !important;
}

/* Force white background and black text - Override any theme styles */
.dc-license-terms,
.dc-license-terms *,
.dc-cart-license-terms,
.dc-cart-license-terms *,
.dc-checkout-license-terms,
.dc-checkout-license-terms *,
.dc-order-license-terms,
.dc-order-license-terms * {
    background-color: inherit !important;
    color: inherit !important;
}

.dc-license-terms {
    background-color: #ffffff !important;
    color: #333333 !important;
}

.dc-license-terms h3 {
    color: #000000 !important;
}

.dc-license-label {
    color: #333333 !important;
}

.dc-license-value {
    color: #000000 !important;
    background-color: #f9f9f9 !important;
}

.dc-license-description {
    color: #333333 !important;
    background-color: #ffffff !important;
}

.dc-cart-license-terms {
    background-color: #ffffff !important;
    color: #333333 !important;
}

.dc-checkout-license-terms {
    background-color: #ffffff !important;
    color: #333333 !important;
}

.dc-checkout-license-terms h3 {
    color: #000000 !important;
}

.dc-order-license-terms {
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* Customer Order View License Terms */
.woocommerce-order-license-terms {
    margin: 30px 0 !important;
    padding: 20px !important;
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.woocommerce-order-license-terms__title {
    margin: 0 0 20px 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    border-bottom: 2px solid #0073aa !important;
    padding-bottom: 10px !important;
}

.dc-customer-order-license-terms {
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 5px !important;
    border-left: 4px solid #0073aa !important;
}

.dc-customer-order-license-terms h4 {
    margin: 0 0 10px 0 !important;
    color: #495057 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

/* Thank You Page License Terms */
.dc-thankyou-license-terms {
    margin-bottom: 20px !important;
    padding: 20px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 5px !important;
    border-left: 4px solid #28a745 !important;
}

.dc-thankyou-license-terms h3 {
    margin: 0 0 15px 0 !important;
    color: #495057 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

/* Admin Order License Terms */
.dc-admin-license-terms {
    font-size: 12px !important;
    color: #666 !important;
    line-height: 1.3 !important;
}

.dc-license-terms-header {
    width: 150px !important;
    font-size: 12px !important;
}

/* Order Item Meta License Terms */
.dc-order-license-terms {
    margin: 10px 0 !important;
    padding: 10px !important;
    background: #f8f9fa !important;
    border-left: 4px solid #007cba !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #333333 !important;
    border: 1px solid #ddd !important;
}

.dc-order-license-terms strong {
    color: #007cba !important;
    font-weight: 600 !important;
}

/* Ensure proper spacing in order details */
.woocommerce-order-details .dc-order-license-terms {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}

/* Mobile responsiveness for order views */
@media (max-width: 768px) {
    .woocommerce-order-license-terms {
        padding: 15px !important;
        margin: 20px 0 !important;
    }
    
    .woocommerce-order-license-terms__title {
        font-size: 18px !important;
    }
    
    .dc-customer-order-license-terms {
        padding: 12px !important;
    }
    
    .dc-thankyou-license-terms {
        padding: 15px !important;
    }
    
    .dc-thankyou-license-terms h3 {
        font-size: 16px !important;
    }
}

/* Print styles for order pages */
@media print {
    .woocommerce-order-license-terms,
    .dc-customer-order-license-terms,
    .dc-thankyou-license-terms,
    .dc-order-license-terms {
        background: #ffffff !important;
        border: 1px solid #000000 !important;
        color: #000000 !important;
        page-break-inside: avoid !important;
    }
    
    .woocommerce-order-license-terms__title,
    .dc-customer-order-license-terms h4,
    .dc-thankyou-license-terms h3 {
        color: #000000 !important;
    }
}