/* ============================================
   RM Cart Thresholds - Front-end Styles
   ============================================ */

/* Cart page thresholds */
.rm-cart-thresholds {
    margin: 15px 0;
}

.rm-threshold-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.rm-threshold-item.rm-threshold-reached {
    background: #d4edda;
    border-color: #c3e6cb;
}

/* Message */
.rm-threshold-message {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.rm-threshold-message.rm-threshold-success {
    color: #155724;
    font-weight: 500;
}

.rm-threshold-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.rm-threshold-reached .rm-threshold-icon {
    color: #28a745;
}

.rm-threshold-text strong {
    color: #c0392b;
}

.rm-threshold-reached .rm-threshold-text strong {
    color: #155724;
}

/* Progress bar */
.rm-threshold-bar {
    height: 6px;
    background: #dee2e6;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.rm-threshold-progress {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

.rm-threshold-reached .rm-threshold-progress {
    background: linear-gradient(90deg, #28a745, #20c997);
}

/* Details line (current / target) */
.rm-threshold-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
}

/* Type-specific colors */
.rm-threshold-free_shipping .rm-threshold-progress {
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.rm-threshold-discount_percent .rm-threshold-progress {
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

.rm-threshold-discount_amount .rm-threshold-progress {
    background: linear-gradient(90deg, #9b59b6, #e74c3c);
}

/* Upcoming threshold (compact preview) */
.rm-threshold-upcoming {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: -4px;
    margin-bottom: 10px;
    background: #f1f3f5;
    border-left: 3px solid #adb5bd;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: #495057;
}

.rm-threshold-upcoming-icon {
    font-size: 14px;
    color: #868e96;
    flex-shrink: 0;
}

.rm-threshold-upcoming-text strong {
    color: #212529;
    font-weight: 600;
}

/* "All reached" celebration block */
.rm-threshold-item.rm-threshold-all-reached {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #b1dfbb;
    text-align: center;
}

.rm-threshold-all-reached .rm-threshold-icon {
    font-size: 22px;
}

/* ============================================
   Banner version (top of page)
   ============================================ */

.rm-cart-thresholds-banner {
    text-align: center;
    font-size: 13px;
}

.rm-banner-threshold {
    padding: 6px 15px;
    background: #fff3cd;
    color: #856404;
}

.rm-banner-threshold.rm-banner-reached {
    background: #d4edda;
    color: #155724;
}

.rm-banner-threshold.rm-banner-upcoming {
    background: #f1f3f5;
    color: #495057;
    font-size: 12px;
}

.rm-banner-threshold.rm-banner-all-reached {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    font-weight: 600;
}

.rm-banner-text strong {
    font-weight: 700;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .rm-threshold-item {
        padding: 12px;
    }

    .rm-threshold-message {
        font-size: 13px;
    }

    .rm-banner-threshold {
        font-size: 12px;
        padding: 5px 10px;
    }
}
