/**
 * MTV Minimal Order Requests - Messages Styles
 * Frontend styles for order request messages
 */

/* Order request message containers */
.mtv-order-request-message,
.mtv-order-request-thankyou,
.mtv-order-request-email {
    padding: 1rem !important;
    margin: 1rem 0 !important;
    border-radius: 4px !important;
    background-color: #f8f9fa !important;
    border-left: 4px solid #007cba !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    float: none !important;
    position: relative !important;
    height: auto !important;
    display: block !important;
    overflow: visible !important;
    max-width: 1000px!important;
}

/* Form message specific styling */
.mtv-form-message {
    background-color: #e7f3ff !important;
    border-left-color: #0073aa !important;
    color: #0073aa !important;
}

/* Specific fixes for checkout layout issues */
#mtv-checkout-message {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    max-height: none !important;
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: auto !important;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
}

/* Prevent message from affecting checkout grid/flex layouts */
.wc-block-checkout #mtv-checkout-message,
.woocommerce-checkout #mtv-checkout-message {
    order: -1 !important;
    margin-bottom: 2rem !important;
}

/* Cart message specific styling */
#mtv-cart-message {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    max-height: none !important;
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: auto !important;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
}

/* Prevent cart message from affecting cart grid/flex layouts */
.wc-block-cart #mtv-cart-message,
.woocommerce-cart #mtv-cart-message {
    order: -1 !important;
    margin-bottom: 2rem !important;
}

.mtv-cart-message {
    background-color: #e7f3ff !important;
    border-left-color: #0073aa !important;
    color: #0073aa !important;
}

/* Thank you message specific styling */
.mtv-order-request-thankyou {
    background-color: #f0f8f0 !important;
    border-left-color: #46b450 !important;
    color: #32373c !important;
    margin:0 auto !important;
}

/* Thank you message in order confirmation area */
.woocommerce-order-confirmation-totals-wrapper .mtv-order-request-thankyou,
.woocommerce-order-details .mtv-order-request-thankyou,
.woocommerce-order-overview .mtv-order-request-thankyou {
    margin-bottom: 2rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.mtv-order-request-thankyou h2,
.mtv-order-request-thankyou h3 {
    color: #46b450;
    margin-top: 0;
}

/* Email message styling */
.mtv-order-request-email {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

/* WooCommerce notice integration */
.woocommerce-message.mtv-cart-notice {
    background-color: #e7f3ff;
    border-top-color: #0073aa;
}

/* Responsive design */
@media (max-width: 768px) {
    .mtv-order-request-message,
    .mtv-order-request-thankyou,
    .mtv-order-request-email {
        padding: 0.75rem;
        margin: 0.75rem 0;
        font-size: 0.9rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mtv-order-request-message,
    .mtv-order-request-thankyou,
    .mtv-order-request-email {
        border-width: 2px;
        border-style: solid;
    }
}

/* Print styles */
@media print {
    .mtv-order-request-message,
    .mtv-order-request-thankyou,
    .mtv-order-request-email {
        border: 1px solid #000;
        background: transparent !important;
        color: #000 !important;
    }
}
