/* MOQ Mini-Cart Error Message */
.moq-mini-cart-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 15px;
    margin: 0 0 15px 0;
    color: #721c24;
}

.moq-error-message {
    margin: 0;
    padding: 5px 0;
    font-size: 14px;
    line-height: 1.5;
}

.moq-error-message:first-child {
    padding-top: 0;
}

.moq-error-message:last-child {
    padding-bottom: 0;
}

/* Error highlight animation */
.moq-error-highlight {
    animation: moqErrorPulse 0.5s ease-in-out;
}

@keyframes moqErrorPulse {
    0%, 100% {
        background-color: #f8d7da;
    }
    50% {
        background-color: #f5c2c7;
    }
}

/* Disabled checkout button */
.moq-disabled,
.moq-disabled:hover,
.moq-disabled:focus {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: #ccc !important;
    border-color: #999 !important;
    color: #666 !important;
}

/* Blocksy theme specific overrides */
#woo-cart-panel .moq-mini-cart-error {
    margin: 0 0 15px 0;
}

/* WooCommerce block cart compatibility */
.wc-block-mini-cart .moq-mini-cart-error {
    margin: 0 0 15px 0;
}

/* Ensure error appears above buttons */
.woocommerce-mini-cart__buttons {
    position: relative;
}

.moq-mini-cart-error + .woocommerce-mini-cart__buttons {
    margin-top: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .moq-mini-cart-error {
        padding: 10px 12px;
        font-size: 13px;
    }

    .moq-error-message {
        font-size: 13px;
    }
}

/* Additional Blocksy offcanvas specific styles */
.ct-panel .moq-mini-cart-error {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon for error message (optional enhancement) */
.moq-error-message::before {
    content: "⚠️ ";
    margin-right: 5px;
}

/* ========================================
   MOQ Product Page Warning
   ======================================== */
.moq-product-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 15px 0;
    color: #856404;
}

.moq-product-warning p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.moq-product-warning p::before {
    content: "⚠️ ";
    margin-right: 5px;
}

/* Shake animation for error state */
.moq-error-shake {
    animation: moqShake 0.5s ease-in-out;
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

@keyframes moqShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Product page disabled button */
form.cart .moq-disabled,
form.cart .moq-disabled:hover,
form.cart .moq-disabled:focus {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: #ccc !important;
    border-color: #999 !important;
    color: #666 !important;
}

/* Mobile responsiveness for product warning */
@media (max-width: 768px) {
    .moq-product-warning {
        padding: 8px 12px;
        margin: 10px 0;
    }

    .moq-product-warning p {
        font-size: 13px;
    }
}

/* ========================================
   Pallet Status — Compact
   ======================================== */
.pallet-status {
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.pallet-status__row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pallet-status__label {
    font-weight: 600;
    color: #1a1a1a;
    margin-right: 2px;
}

.pallet-status__segment {
    font-size: 13px;
}

.pallet-status__sep {
    color: #aaa;
    margin: 0 1px;
}

.pallet-status__icon {
    font-size: 13px;
    margin-left: 2px;
}

.pallet-status__extra {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

/* Status variants */
.pallet-status--ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.pallet-status--under {
    background: #ffebee;
    color: #c62828;
}

.pallet-status--incomplete {
    background: #fff3e0;
}

.pallet-status--incomplete .pallet-status__label {
    color: #1a1a1a;
}

.pallet-status--incomplete .pallet-status__extra {
    color: #e65100;
}

/* Mini-cart spacing */
#woo-cart-panel .pallet-status,
.ct-panel .pallet-status {
    margin: 0 0 10px 0;
}

#woo-cart-panel .moq-mini-cart-error,
.ct-panel .moq-mini-cart-error {
    margin: 0 0 15px 0;
}

.wc-block-mini-cart .pallet-status {
    margin: 0 0 10px 0;
}

.wc-block-mini-cart .moq-mini-cart-error {
    margin: 0 0 15px 0;
}
