/* Weight Discount Frontend Styling */

/* Make original unit price less prominent when discount is shown */
.product-line-info .unit-price {
    opacity: 0.6;
    font-size: 0.9em;
}

/* Style the discounted price */
.pswd-discounted-unit-price {
    display: block;
    font-size: 0.9em;
    color: #28a745 !important;
    font-weight: 600 !important;
    margin-top: 2px;
}

/* Add some visual hierarchy */
.product-line-info:has(.pswd-discounted-unit-price) .unit-price {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Ensure proper spacing */
.pswd-discounted-unit-price + .unit-price,
.unit-price + .pswd-discounted-unit-price {
    margin-top: 2px;
}

/* Order confirmation discount styles */
.weight-discount-info {
    margin: 8px 0;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.weight-discount-info .pswd-original-price {
    text-decoration: line-through;
    color: #6c757d;
}

.weight-discount-info .pswd-discounted-price {
    color: #28a745;
    font-weight: 600;
    margin-left: 8px;
}

/* Per-line Weight Discount Notices */
.pswd-line-notice {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 8px 0 4px 0;
    border-radius: 4px;
    font-size: 13px;
    gap: 8px;
    border: 1px solid transparent;
}

/* Product page specific margin */
#pswd-product-discount-notice.pswd-line-notice {
    margin-top: 15px;
}

/* Success state - discount is active (green) */
.pswd-line-notice.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.pswd-line-notice.alert-success .material-icons {
    font-size: 16px;
    color: #28a745;
    flex-shrink: 0;
}

/* Info state - more kg needed for discount (blue) */
.pswd-line-notice.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.pswd-line-notice.alert-info .material-icons {
    font-size: 16px;
    color: #17a2b8;
    flex-shrink: 0;
}

/* Message content */
.pswd-line-notice .pswd-message {
    flex: 1;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pswd-line-notice {
        padding: 6px 10px;
        font-size: 12px;
        gap: 6px;
    }

    .pswd-line-notice .material-icons {
        font-size: 14px;
    }
}
