.wcfm-customer-messages {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
}

.wcfm-customer-messages h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 18px;
}

.wcfm-messages-list {
    margin-top: 15px;
}

.wcfm-message-item {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fafafa;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wcfm-message-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
    font-size: 13px;
}

.wcfm-message-content {
    margin-bottom: 15px;
}

.wcfm-original-message {
    background: #f0f8ff;
    padding: 10px;
    border-left: 2px solid #0073aa;
    margin-bottom: 10px;
    border-radius: 2px;
}

.wcfm-message-replies {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 2px;
    border: 1px solid #eee;
}

.wcfm-message-replies h4 {
    margin-top: 0;
    color: #333;
}

.wcfm-message-reply {
    background: #fff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 2px;
    border: 1px solid #e5e5e5;
}

.wcfm-message-reply:last-child {
    margin-bottom: 0;
}

.wcfm-message-reply strong {
    color: #0073aa;
}

.wcfm-reply-attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.wcfm-message-meta {
    color: #666;
    font-size: 0.85em;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* Pagination styles */
.wcfm-pagination {
    text-align: center;
    margin: 20px 0;
    padding: 10px 0;
}

.wcfm-pagination a,
.wcfm-pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #0073aa;
}

.wcfm-pagination a:hover {
    background-color: #f5f5f5;
}

.wcfm-pagination .current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    font-weight: bold;
}

.wcfm-pagination .dots {
    border: none;
    background: none;
    color: #999;
}

/* Collapsible replies */
.wcfm-collapsible-replies {
    margin-top: 10px;
}

.wcfm-toggle-replies {
    background: #f0f8ff;
    border: 1px solid #0073aa;
    color: #0073aa;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.wcfm-toggle-replies:hover {
    background: #e1f0fa;
}

.wcfm-hidden-replies {
    display: none;
}

.wcfm-messages-notice {
    background: #fff8e5;
    border: 1px solid #ffb900;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    color: #333;
}

small {
    color: #777;
    font-size: 0.8em;
}

/* Loading indicator */
.wcfm-customer-messages p:contains('Loading...') {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Always visible enquiry form styles */
.wcfm-enquiry-form-always-visible {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
}

.wcfm-enquiry-form-always-visible h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 18px;
    text-align: left;
}

.wcfm-enquiry-form-always-visible .wcfm_popup_label {
    margin: 10px 0 5px 0;
    font-weight: bold;
    color: #555;
}

.wcfm-enquiry-form-always-visible .wcfm_popup_input,
.wcfm-enquiry-form-always-visible .wcfm_popup_textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.wcfm-enquiry-form-always-visible .wcfm_popup_textarea {
    min-height: 100px;
    resize: vertical;
}

.wcfm-enquiry-form-always-visible .wcfm_popup_button {
    background: #0073aa;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.wcfm-enquiry-form-always-visible .wcfm_popup_button:hover {
    background: #005a87;
}

.wcfm-enquiry-form-always-visible .required {
    color: #d63638;
}

.wcfm-enquiry-form-always-visible .comment-notes {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

/* Responsive styles for WCFM enquiry popup */
@media screen and (max-width: 768px) {
    #colorbox, #cboxWrapper {
        width: 95% !important;
        max-width: 95% !important;
        left: 2.5% !important;
        margin-left: 0 !important;
    }
    
    #cboxContent {
        width: 100% !important;
        padding: 10px !important;
    }
    
    #cboxLoadedContent {
        width: 100% !important;
        overflow: auto !important;
        max-height: 70vh !important;
    }
    
    #enquiry_form_wrapper {
        width: 100% !important;
        padding: 10px !important;
    }
    
    .wcfm_popup_wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .wcfm_popup_input, 
    .wcfm_popup_textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #enquiry_comment {
        min-height: 120px !important;
    }
    
    .wcfm_popup_button {
        width: 100% !important;
        margin-top: 10px !important;
    }
    
    h2 {
        font-size: 16px !important;
        text-align: center !important;
        float: none !important;
    }
    
    .wcfm_popup_label {
        font-size: 14px !important;
    }
    
    #cboxClose {
        top: 5px !important;
        right: 5px !important;
    }
    
    /* Fix for inline styles */
    #cboxContent[style*="float: left"] {
        float: none !important;
    }
    
    #cboxLoadedContent[style*="width: 0px"] {
        width: 100% !important;
    }
    
    /* Always visible form responsive */
    .wcfm-enquiry-form-always-visible {
        padding: 15px;
    }
    
    .wcfm-enquiry-form-always-visible .wcfm_popup_input,
    .wcfm-enquiry-form-always-visible .wcfm_popup_textarea {
        font-size: 16px; /* Better for mobile touch */
    }
}

@media screen and (max-width: 480px) {
    #colorbox, #cboxWrapper {
        width: 98% !important;
        max-width: 98% !important;
        left: 1% !important;
    }
    
    #cboxLoadedContent {
        padding: 5px !important;
        max-height: 65vh !important;
    }
    
    .wcfm_popup_wrapper {
        padding: 5px !important;
    }
    
    .wcfm_popup_label strong {
        font-size: 13px !important;
    }
    
    #enquiry_comment {
        min-height: 100px !important;
        font-size: 14px !important;
    }
    
    /* Override problematic inline styles */
    #cboxContent[style*="width: 147px"] {
        width: 100% !important;
    }
    
    #cboxLoadedContent[style*="width: 0px"] {
        width: 100% !important;
    }
    
    /* Always visible form responsive */
    .wcfm-enquiry-form-always-visible {
        padding: 10px;
    }
    
    .wcfm-enquiry-form-always-visible h2 {
        font-size: 16px;
    }
}