/**
 * Enhanced Enquiry List Styling for EIM Product Gallery
 * This CSS creates a modern, responsive list with proper columns and button styling
 */

/* Main Container */
.eimpg-enquiries-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    margin: 20px 0;
    max-width: 100%;
}

/* Filter Bar */
.eimpg-filter-bar {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eimpg-filter-bar form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.eimpg-search-field {
    flex: 3;
    min-width: 250px;
}

.eimpg-status-field {
    flex: 1;
    min-width: 150px;
}

.eimpg-date-fields {
    flex: 2;
    display: flex;
    gap: 10px;
    min-width: 250px;
}

.eimpg-date-fields input {
    flex: 1;
}

.eimpg-filter-buttons {
    display: flex;
    gap: 10px;
}

.eimpg-filter-bar input,
.eimpg-filter-bar select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.eimpg-filter-bar input:focus,
.eimpg-filter-bar select:focus {
    border-color: #4A6CF7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
    outline: none;
}

.eimpg-filter-bar label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
}

.eimpg-apply-btn, 
.eimpg-reset-btn {
    padding: 10px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    min-width: 100px;
    text-align: center;
}

.eimpg-apply-btn {
    background: #4A6CF7;
    color: white;
}

.eimpg-apply-btn:hover {
    background: #3954CC;
    transform: translateY(-1px);
}

.eimpg-reset-btn {
    background: #f5f5f5;
    color: #333;
}

.eimpg-reset-btn:hover {
    background: #e5e5e5;
}

/* No Enquiries Message */
.eimpg-no-enquiries {
    background: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eimpg-no-enquiries p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Enquiry Row - Modern Card Style */
.eimpg-enquiry-row {
    background: #fff;
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #f59e0b; /* Default: pending */
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.eimpg-enquiry-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.eimpg-enquiry-row.eimpg-finalised {
    border-left-color: #10b981;
}

.eimpg-enquiry-row.eimpg-updated {
    background-color: rgba(74, 108, 247, 0.05);
}

/* Header Section */
.eimpg-enquiry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.eimpg-enquiry-date {
    color: #666;
    font-size: 0.9em;
}

/* Custom Checkbox */
.eimpg-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.eimpg-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.eimpg-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s;
}

.eimpg-checkbox:hover input ~ .eimpg-checkmark {
    background-color: #e5e5e5;
}

.eimpg-checkbox input:checked ~ .eimpg-checkmark {
    background-color: #10b981;
    border-color: #10b981;
}

.eimpg-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    transition: all 0.2s;
}

.eimpg-checkbox input:checked ~ .eimpg-checkmark:after {
    display: block;
}

.eimpg-checkbox .eimpg-checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.eimpg-status-label {
    margin-left: 10px;
    font-size: 14px;
}

/* Main Content Grid */
.eimpg-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .eimpg-main-content {
        grid-template-columns: 1fr;
    }
}

/* Content Styling */
.eimpg-enquiry-name {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.eimpg-enquiry-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eimpg-enquiry-email,
.eimpg-enquiry-contact {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.eimpg-enquiry-email i,
.eimpg-enquiry-contact i {
    margin-right: 8px;
    color: #4B5563;
}

.eimpg-enquiry-email a {
    color: #4A6CF7;
    text-decoration: none;
}

.eimpg-enquiry-email a:hover {
    text-decoration: underline;
}

.eimpg-enquiry-total {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 10px;
    text-align: center;
}

/* Product List Section */
.eimpg-product-list-section {
    border-radius: 6px;
    overflow: hidden;
}

.eimpg-product-list-header {
    background: #f1f5f9;
    padding: 10px 15px;
    font-weight: 600;
    color: #4B5563;
    border-bottom: 1px solid #e5e7eb;
}

.eimpg-product-list {
    background: #f9fafb;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 6px 6px;
}

.eimpg-product-item {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
}

.eimpg-product-item:last-child {
    border-bottom: none;
}

.eimpg-item-qty {
    font-weight: 600;
    color: #4A6CF7;
    margin-right: 8px;
    min-width: 30px;
}

/* Action Buttons */
.eimpg-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.eimpg-view-btn,
.eimpg-pdf-btn,
.eimpg-notes-btn {
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: white !important;
}

.eimpg-view-btn i,
.eimpg-pdf-btn i,
.eimpg-notes-btn i {
    margin-right: 6px;
}

.eimpg-view-btn {
    background: #4A6CF7;
    border: 1px solid #3954CC;
}

.eimpg-view-btn:hover {
    background: #3954CC;
    transform: translateY(-1px);
}

.eimpg-pdf-btn {
    background: #ef4444;
    border: 1px solid #dc2626;
}

.eimpg-pdf-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.eimpg-notes-btn {
    background: #6B7280;
    border: 1px solid #4B5563;
}

.eimpg-notes-btn:hover {
    background: #4B5563;
    transform: translateY(-1px);
}

/* Notes Section */
.eimpg-notes-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.eimpg-notes-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eimpg-notes-content {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.2s;
    min-height: 100px;
}

.eimpg-notes-content:focus {
    border-color: #4A6CF7;
    outline: none;
}

.eimpg-save-btn {
    align-self: flex-end;
    padding: 8px 15px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.eimpg-save-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Pagination */
.eimpg-pagination {
    margin-top: 25px;
    text-align: center;
}

.eimpg-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border-radius: 4px;
    text-decoration: none;
    background: #fff;
    color: #4A6CF7;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.eimpg-pagination .page-numbers.current {
    background: #4A6CF7;
    color: #fff;
    border-color: #4A6CF7;
}

.eimpg-pagination .page-numbers:hover:not(.current) {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Add subtle animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.eimpg-enquiry-row {
    animation: fadeIn 0.3s ease-out;
}