/**
 * Dynamic Order Management - Public/Customer Styles
 * @package DOMWoo
 */

/* Production Hub Container */
.woocommerce-order-production-hub {
    margin: 30px 0;
    padding: 25px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.woocommerce-order-production-hub h2 {
    margin: 0 0 20px 0;
    padding: 0 0 15px 0;
    border-bottom: 2px solid #e0e0e0;
    font-size: 24px;
    color: #333;
}

.woocommerce-order-production-hub h3 {
    margin: 25px 0 15px 0;
    font-size: 18px;
    color: #333;
}

/* Customer Chat Display */
.dom-woo-customer-chat {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.dom-woo-customer-chat .chat-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    max-width: 75%;
    clear: both;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dom-woo-customer-chat .chat-message.from-team {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    float: left;
    border-bottom-left-radius: 2px;
}

.dom-woo-customer-chat .chat-message.from-customer {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    float: right;
    border-bottom-right-radius: 2px;
}

.dom-woo-customer-chat .chat-meta {
    font-size: 12px;
    margin-bottom: 10px;
    opacity: 0.9;
    font-weight: 600;
}

.dom-woo-customer-chat .chat-meta strong {
    font-weight: 700;
}

.dom-woo-customer-chat .chat-time {
    font-weight: normal;
    opacity: 0.8;
    margin-left: 8px;
}

.dom-woo-customer-chat .chat-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.dom-woo-customer-chat .chat-attachment {
    margin-top: 12px;
}

.dom-woo-customer-chat .chat-attachment .button {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    display: inline-block;
    transition: all 0.3s;
}

.dom-woo-customer-chat .chat-attachment .button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.dom-woo-customer-chat::after {
    content: "";
    display: table;
    clear: both;
}

/* Customer Response Form */
.woocommerce-order-production-hub form {
    background: #fff;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.woocommerce-order-production-hub label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.woocommerce-order-production-hub textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    transition: border-color 0.3s;
}

.woocommerce-order-production-hub textarea:focus {
    outline: none;
    border-color: #667eea;
}

.woocommerce-order-production-hub input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
}

.woocommerce-order-production-hub input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.woocommerce-order-production-hub .form-row {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.woocommerce-order-production-hub .button {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
}

.woocommerce-order-production-hub .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.woocommerce-order-production-hub .button.alt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

.woocommerce-order-production-hub .button.alt:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Info Message */
.woocommerce-order-production-hub .woocommerce-info {
    padding: 15px 20px;
    background: #e7f3ff;
    border-left: 4px solid #2271b1;
    color: #0a4b78;
    border-radius: 4px;
    margin: 20px 0;
}

/* Review Button in Orders List */
.woocommerce-account .woocommerce-orders-table .wc-action-button-review {
    background: #ffba00 !important;
    color: #fff !important;
    border-color: #ffba00 !important;
    font-weight: 600;
    transition: all 0.3s;
}

.woocommerce-account .woocommerce-orders-table .wc-action-button-review:hover {
    background: #e9ab00 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255,186,0,0.3);
}

/* Separator */
.woocommerce-order-production-hub hr {
    margin: 25px 0;
    border: none;
    border-top: 2px solid #e0e0e0;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .woocommerce-order-production-hub {
        padding: 20px 15px;
    }
    
    .dom-woo-customer-chat .chat-message {
        max-width: 90%;
    }
    
    .woocommerce-order-production-hub .form-row {
        flex-direction: column;
    }
    
    .woocommerce-order-production-hub .button {
        width: 100%;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .woocommerce-order-production-hub h2 {
        font-size: 20px;
    }
    
    .woocommerce-order-production-hub h3 {
        font-size: 16px;
    }
    
    .dom-woo-customer-chat .chat-message {
        max-width: 95%;
        padding: 12px;
    }
}

/* Loading Animation */
.dom-woo-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dom-woo-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dom-woo-rotate 1s linear infinite;
}

@keyframes dom-woo-rotate {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.woocommerce-order-production-hub button:focus,
.woocommerce-order-production-hub input:focus,
.woocommerce-order-production-hub textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .woocommerce-order-production-hub form,
    .woocommerce-order-production-hub .button {
        display: none;
    }
    
    .dom-woo-customer-chat {
        max-height: none;
        overflow: visible;
    }
}