/* Cohsar Discount Orchestrator — Frontend Styles v7.0 */

/* -----------------------------------------------
   Total Savings Line (cart / checkout / mini-cart)
------------------------------------------------ */
.cohsar-total-savings-line {
    background-color: #fdfdff;
}
.cohsar-total-savings-amount {
    font-weight: bold;
    color: #2c3e50;
}
.cohsar-savings-highlight {
    color: #1a7340;
    font-weight: 600;
}

/* -----------------------------------------------
   Offer Box (all display shortcodes)
------------------------------------------------ */
.cohsar-offer-box {
    margin-bottom: 15px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fafafa;
    line-height: 1.6;
}

.cohsar-offer-title {
    margin-bottom: 8px;
}

/* Individual engine tints */
.cohsar-country-offer  { border-left: 4px solid #1976d2; }
.cohsar-shipping-offer { border-left: 4px solid #0097a7; }
.cohsar-volume-offer   { border-left: 4px solid #388e3c; }
.cohsar-bogo-offer     { border-left: 4px solid #7b1fa2; }
.cohsar-you-save-offer { border-left: 4px solid #1a7340; background: #f0fff4; }

/* -----------------------------------------------
   Unified Progress Bars
------------------------------------------------ */
.cohsar-fs-progress-wrap,
.cohsar-volume-progress-wrap {
    margin: 12px 0;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 14px;
    text-align: center;
}

.cohsar-fs-message,
.cohsar-volume-message {
    font-weight: 500;
    margin-bottom: 8px;
}

.cohsar-progress-bar-container {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.cohsar-progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.cohsar-progress-bar--shipping {
    background: linear-gradient(to right, #00c6ff, #0072ff);
}

.cohsar-progress-bar--volume {
    background: linear-gradient(to right, #4caf50, #2e8b57);
}

/* -----------------------------------------------
   Cart Offer Nudges
------------------------------------------------ */
.woocommerce-cart .cohsar-fs-progress-wrap,
.woocommerce-cart .cohsar-volume-progress-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 10px 0;
    padding: 13px 15px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-left-width: 5px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.woocommerce-cart .cohsar-fs-progress-wrap::before,
.woocommerce-cart .cohsar-volume-progress-wrap::before {
    display: grid;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    place-items: center;
    color: #fff;
    font-weight: 700;
}

.woocommerce-cart .cohsar-fs-progress-wrap {
    border-left-color: #1d4ed8;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.woocommerce-cart .cohsar-fs-progress-wrap::before {
    content: "\1F69A";
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.woocommerce-cart .cohsar-volume-progress-wrap {
    border-left-color: #15803d;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.woocommerce-cart .cohsar-volume-progress-wrap::before {
    content: "%";
    background: linear-gradient(135deg, #16a34a, #65a30d);
}

.woocommerce-cart .cohsar-fs-message,
.woocommerce-cart .cohsar-volume-message {
    grid-column: 2;
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    line-height: 1.35;
}

.woocommerce-cart .cohsar-fs-message strong,
.woocommerce-cart .cohsar-volume-message strong {
    color: #111827;
    font-weight: 800;
}

.woocommerce-cart .cohsar-progress-bar-container {
    grid-column: 2;
    height: 6px;
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.09);
}

@media (max-width: 640px) {
    .woocommerce-cart .cohsar-fs-progress-wrap,
    .woocommerce-cart .cohsar-volume-progress-wrap {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 11px 12px;
    }

    .woocommerce-cart .cohsar-fs-progress-wrap::before,
    .woocommerce-cart .cohsar-volume-progress-wrap::before {
        width: 34px;
        height: 34px;
    }
}

/* -----------------------------------------------
   Product List Shortcodes
------------------------------------------------ */
.cohsar-product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cohsar-product-list li {
    margin-bottom: 6px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cohsar-product-list li:last-child {
    border-bottom: none;
}
.cohsar-discount-percent {
    color: #c62828;
    font-weight: bold;
}

/* Cart Abandonment offer (v8) */
.cohsar-abandonment-offer {
    border-left: 4px solid #e91e63;
    background: #fff5f8;
    animation: cohsar-pulse-border 2s ease-in-out infinite;
}

@keyframes cohsar-pulse-border {
    0%, 100% { border-left-color: #e91e63; }
    50%       { border-left-color: #ff80ab; }
}

/* ===============================================
   Cohsar Receipt Slip v9.5
   Buttons use inline styles in PHP.
   This CSS only handles print isolation + wrap.
================================================ */

/* Action bar — full reset so NO theme can float/fix/sticky it */
.cohsar-receipt-actions {
    display: block !important;
    position: static !important;
    float: none !important;
    clear: both !important;
    width: auto !important;
    margin: 12px 0 4px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    text-align: left !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
}

/* Slip wrapper — hidden until JS opens it */
.cohsar-receipt-wrap {
    display: none;
    clear: both;
    position: static !important;
    float: none !important;
    width: 100% !important;
    max-width: 660px;
    margin: 0 0 20px !important;
}

/* Print isolation — when printing, show ONLY the receipt */
