/**
 * Product Showcase CSS for WC Vendor Dashboard
 *
 * @package WC_Vendor_Dashboard
 */

/* Main showcase wrapper */
.wcvd-showcase-wrapper {
    --wcvd-primary-color: var(--e-global-color-secondary);
    --wcvd-hover-color: var(--e-global-color-accent);
    --wcvd-hover-light: rgba(var(--e-global-color-accent-rgb, 98, 169, 73), 0.1);
    --wcvd-secondary-color: #f8f9fc;
    --wcvd-text-color: #444;
    --wcvd-light-gray: #f2f2f2;
    --wcvd-border-color: #e3e6f0;
    --wcvd-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --wcvd-transition: all 0.3s ease;
    --wcvd-card-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--wcvd-text-color);
    max-width: 1600px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Filter area */
.wcvd-showcase-filters {
    background-color: var(--wcvd-light-gray);
    border-radius: var(--wcvd-card-radius);
    box-shadow: var(--wcvd-shadow);
    padding: 20px;
    margin-bottom: 30px;
}

.wcvd-showcase-filters h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid var(--wcvd-border-color);
    padding-bottom: 15px;
}

.wcvd-showcase-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Search field and reset button in first row */
.wcvd-search-reset-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    flex: 0 0 100%;
    order: 1;
}

.wcvd-search-field {
    flex: 1;
    margin-bottom: 0 !important;
}

.wcvd-reset-button-container {
    padding-bottom: 8px;
}

/* Other filter fields in second row */
.wcvd-filter-checkboxes {
    flex: 1 1 200px !important;
    order: 2;
    margin-bottom: 10px;
}

/* Filter field label that acts as toggle */
.wcvd-filter-checkboxes > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    background-color: #fff;
    padding: 10px 12px;
    border: 1px solid var(--wcvd-border-color);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wcvd-showcase-filter-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.wcvd-showcase-filter-field input[type="text"],
.wcvd-showcase-filter-field input[type="number"],
.wcvd-showcase-filter-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wcvd-border-color);
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    transition: var(--wcvd-transition);
}

.wcvd-showcase-filter-field input[type="text"]:focus,
.wcvd-showcase-filter-field input[type="number"]:focus,
.wcvd-showcase-filter-field select:focus {
    border-color: var(--wcvd-primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.1);
}

/* Filter label with selected options */
.wcvd-filter-checkboxes > label .filter-label-text {
    font-weight: 500;
}

.wcvd-filter-checkboxes > label .selected-options-text {
    color: var(--wcvd-primary-color);
    font-weight: 600;
}

.wcvd-filter-checkboxes > label:after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.3s ease;
}

.wcvd-filter-checkboxes.active > label:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Selected options display area */
.wcvd-selected-options {
    margin: 5px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 30px;
}

.wcvd-selected-option {
    display: inline-flex;
    align-items: center;
    background-color: var(--wcvd-hover-light);
    color: var(--wcvd-primary-color);
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: 5px;
}

.wcvd-selected-option .remove {
    margin-left: 5px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

/* Popup checkbox list */
.wcvd-checkbox-list {
    max-height: 0;
    height: 250px; /* Fixed height for all filters */
    overflow: hidden;
    border: 1px solid var(--wcvd-border-color);
    border-radius: 4px;
    background-color: #fff;
    margin: 0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
    display: none; /* Hidden by default */
    width: 260px; /* Narrower dropdown width */
    max-width: 100%;
    position: absolute;
    left: 0;
    z-index: 100;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    transition: max-height 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.wcvd-filter-checkboxes.active .wcvd-checkbox-list {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    display: block; /* Shown when active */
}

.wcvd-checkbox-list:focus {
    outline: 1px solid var(--wcvd-primary-color);
}

.wcvd-checkbox-list-inner {
    /* Ensure content is properly displayed inside the scrollable area */
    width: 100%;
    position: relative;
}

/* Add webkit scrollbar styling for better appearance */
.wcvd-checkbox-list::-webkit-scrollbar {
    width: 8px;
}

.wcvd-checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.wcvd-checkbox-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.wcvd-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Make sure mobile scrolling works correctly */
@media (pointer: coarse) {
    .wcvd-filter-checkboxes.active .wcvd-checkbox-list {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        padding-right: 15px; /* Add extra padding for easier touch scrolling */
    }
}

.wcvd-checkbox-item {
    margin-bottom: 8px;
    padding: 5px 8px;
    transition: var(--wcvd-transition);
    border-radius: 3px;
    /* Ensure proper display */
    display: block;
    width: 100%;
}

.wcvd-checkbox-item:last-child {
    margin-bottom: 0;
}

.wcvd-checkbox-item:hover {
    background-color: var(--wcvd-hover-light);
}

.wcvd-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    width: 100%;
    flex-wrap: nowrap;
}

.wcvd-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
}

.wcvd-checkbox-item input[type="checkbox"]:checked + .wcvd-checkbox-label {
    font-weight: bold;
    color: var(--wcvd-primary-color);
}

.wcvd-checkbox-item input[type="checkbox"]:checked + .wcvd-checkbox-label .wcvd-count {
    background-color: var(--wcvd-hover-light);
    color: var(--wcvd-primary-color);
}

.wcvd-checkbox-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.wcvd-count {
    font-size: 0.85em;
    color: #777;
    border-radius: 10px;
    background-color: #f5f5f5;
    padding: 2px 6px;
    min-width: 26px;
    text-align: center;
}

/* Style for filter options with zero products */
.wcvd-checkbox-item.wcvd-zero-count {
    opacity: 0.5;
}

.wcvd-checkbox-item.wcvd-zero-count .wcvd-checkbox-label {
    color: #999;
}

.wcvd-checkbox-item.wcvd-zero-count .wcvd-count {
    background-color: #f1f1f1;
    color: #999;
}

/* Filter actions */
.wcvd-showcase-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 100%;
    margin-top: 10px;
}

/* Hide Apply Filters button but keep Reset button */
.wcvd-apply-filters {
    display: none;
}

.wcvd-reset-filters {
    padding: 8px 15px;
    cursor: pointer;
}

/* Add Product button */
.wcvd-showcase-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding: 0 15px;
    position: relative;
    z-index: 5;
}

.wcvd-add-product {
    background: var(--wp--preset--color--secondary, #4CAF50);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcvd-add-product:hover {
    background: var(--wp--preset--color--accent, #2196F3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Products grid */
.wcvd-showcase-products {
    position: relative;
    min-height: 200px;
}

.wcvd-showcase-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: var(--wcvd-card-radius);
}

.wcvd-loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--wcvd-primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: wcvd-loader-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes wcvd-loader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wcvd-showcase-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

/* Grid template based on column count - fixed values */
.wcvd-showcase-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.wcvd-showcase-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.wcvd-showcase-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Fallback for when data-columns is not specified */
.wcvd-showcase-grid:not([data-columns]),
.wcvd-showcase-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

/* Product card */
.wcvd-showcase-product {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.wcvd-showcase-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.wcvd-showcase-product-image {
    position: relative;
    padding-top: 65%; /* Slightly adjusted aspect ratio */
    overflow: hidden;
    background-color: #f8f8f8;
}

.wcvd-showcase-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.wcvd-showcase-product:hover .wcvd-showcase-product-image img {
    transform: scale(1.08);
}

.wcvd-showcase-product-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wcvd-showcase-product-title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 600;
}

.wcvd-showcase-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wcvd-showcase-product-title a:hover {
    color: var(--e-global-color-secondary);
}

.wcvd-showcase-product-taxonomies {
    margin-bottom: 1.2rem;
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
}

.wcvd-taxonomy-item {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcvd-taxonomy-item:last-child {
    margin-bottom: 0;
}

.wcvd-taxonomy-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--e-global-color-secondary);
    font-size: 14px;
}

.wcvd-taxonomy-icon i {
    font-size: inherit;
}

.wcvd-taxonomy-label {
    font-weight: 600;
    color: #333;
}

.wcvd-taxonomy-value {
    color: var(--e-global-color-secondary);
    font-weight: 500;
}

.wcvd-showcase-product-description {
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    flex-grow: 1;
}

.wcvd-showcase-product-action {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.wcvd-vendor-actions {
    display: flex;
    gap: 10px;
}

.wcvd-edit-product,
.wcvd-delete-product {
    padding: 8px 15px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wcvd-edit-product {
    background-color: #4CAF50;
    color: white;
    border: 1px solid #45a049;
}

.wcvd-edit-product:hover {
    background-color: #45a049;
    color: white;
}

.wcvd-delete-product {
    background-color: #f44336;
    color: white;
    border: 1px solid #da190b;
}

.wcvd-delete-product:hover {
    background-color: #da190b;
    color: white;
}

/* Delete Confirmation Modal */
.wcvd-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.wcvd-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border-radius: 5px;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wcvd-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wcvd-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.wcvd-modal-close {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.wcvd-modal-close:hover {
    color: #666;
}

.wcvd-modal-body {
    padding: 20px;
}

.wcvd-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.wcvd-modal-cancel {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
}

.wcvd-modal-cancel:hover {
    background-color: #e9e9e9;
}

.wcvd-modal-confirm {
    background-color: #f44336;
    border: 1px solid #da190b;
    color: white;
}

.wcvd-modal-confirm:hover {
    background-color: #da190b;
}

/* Pagination */
.wcvd-showcase-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.wcvd-showcase-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background-color: #fff;
    border: 1px solid var(--wcvd-border-color);
    color: var(--wcvd-text-color);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--wcvd-transition);
}

.wcvd-showcase-pagination a:hover {
    background-color: var(--wcvd-hover-light);
    border-color: var(--wcvd-primary-color);
    color: var(--wcvd-primary-color);
}

.wcvd-showcase-pagination a.active {
    background-color: var(--wcvd-primary-color);
    border-color: var(--wcvd-primary-color);
    color: white;
}

/* No products message */
.wcvd-showcase-no-products {
    background-color: var(--wcvd-light-gray);
    padding: 30px;
    text-align: center;
    border-radius: var(--wcvd-card-radius);
    border: 1px solid var(--wcvd-border-color);
}

.wcvd-showcase-no-products p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wcvd-showcase-filters {
        padding: 15px;
    }
    
    .wcvd-showcase-filter-form {
        gap: 15px;
    }
    
    .wcvd-showcase-filter-field:not(:first-child) {
        flex: 1 1 100%;
    }
    
    .wcvd-showcase-grid {
        gap: 15px;
    }
    
    /* Grid template for mobile - max 2 columns */
    .wcvd-showcase-grid[data-columns="2"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wcvd-showcase-grid[data-columns="3"],
    .wcvd-showcase-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wcvd-showcase-product-details {
        padding: 1.2rem;
    }
    
    .wcvd-showcase-product-title {
        font-size: 1.1rem;
    }
    
    .wcvd-showcase-product-taxonomies {
        padding: 10px;
    }
    
    .wcvd-showcase-product-action {
        flex-direction: column;
    }
    
    .wcvd-vendor-actions {
        flex-direction: column;
    }
    
    .wcvd-modal-content {
        margin: 10% auto;
        width: 90%;
    }
}

@media (max-width: 480px) {
    /* On small screens, always use 1 column */
    .wcvd-showcase-grid,
    .wcvd-showcase-grid[data-columns="2"],
    .wcvd-showcase-grid[data-columns="3"],
    .wcvd-showcase-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .wcvd-showcase-pagination a {
        min-width: 35px;
        height: 35px;
    }
    
    .wcvd-showcase-product-details {
        padding: 1rem;
    }
}

/* Fix for dropdown positioning */
.wcvd-filter-checkboxes {
    position: relative;
}

/* Prevent tooltips on checkbox items */
.wcvd-checkbox-item label,
.wcvd-checkbox-item input[type="checkbox"],
.wcvd-checkbox-label {
    cursor: pointer;
    title: none;
    pointer-events: auto;
}

.wcvd-checkbox-item label[title],
.wcvd-checkbox-label[title] {
    title: "";
}

/* Hide selected options containers */
.wcvd-selected-options {
    display: none;
}

/* Product Edit Modal */
#wcvd-product-modal .wcvd-modal-content {
    max-width: 90%;
    width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
}

#wcvd-product-modal .wcvd-modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    padding: 0;
}

#wcvd-product-modal .wcvd-form-container {
    padding: 0;
}

#wcvd-product-modal .wcvd-loading {
    padding: 20px;
    text-align: center;
}

/* Make sure the form inside the modal uses the full width */
#wcvd-product-modal .wcvd-form-container form {
    margin: 0;
    padding: 20px;
}

/* Responsive styles for the edit modal */
@media screen and (max-width: 768px) {
    #wcvd-product-modal .wcvd-modal-content {
        width: 95%;
        margin: 2.5vh auto;
        max-height: 95vh;
    }
    
    #wcvd-product-modal .wcvd-modal-body {
        max-height: calc(95vh - 120px);
    }
}

#wcvd-add-new-product {
    background: var(--wp--preset--color--secondary, #4CAF50);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 250px;
    margin-left: auto;
}

#wcvd-add-new-product:hover {
    background: var(--wp--preset--color--accent, #2196F3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#wcvd-add-new-product-direct {

    display: inline-flex;
    align-items: center;
}

#wcvd-add-new-product-direct:hover {
    transform: none;
    box-shadow: none;
}

#wcvd-add-new-product-direct:active,
#wcvd-add-new-product-direct:focus {
    outline: none;
    box-shadow: none;
}

/* Styling for direct product modal */
#wcvd-product-modal-direct {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#wcvd-product-modal-direct .wcvd-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

#wcvd-product-modal-direct .wcvd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

#wcvd-product-modal-direct .wcvd-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

#wcvd-product-modal-direct .wcvd-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

#wcvd-product-modal-direct .wcvd-modal-close:hover {
    color: #333;
}

#wcvd-product-modal-direct .wcvd-modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

#wcvd-product-modal-direct .wcvd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    font-size: 16px;
    color: #666;
}

#wcvd-product-modal-direct .wcvd-loading:before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Draft Product Styling */
.wcvd-product-draft {
    border: 1px dashed #b7b7b7 !important;
    background-color: #fcfcfc !important;
    position: relative;
}

.wcvd-product-draft:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(200, 200, 200, 0.05),
        rgba(200, 200, 200, 0.05) 10px,
        rgba(220, 220, 220, 0.05) 10px,
        rgba(220, 220, 220, 0.05) 20px
    );
    pointer-events: none;
    z-index: 1;
}

.wcvd-product-draft .wcvd-showcase-product-image:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.wcvd-product-draft .wcvd-showcase-product-title a {
    color: #777;
}

.wcvd-draft-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 152, 0, 0.85);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Readonly attribute field */
.wcvd-readonly-attribute {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 0;
    color: #666;
}

.wcvd-readonly-attribute strong {
    color: #333;
}

/* Add drag and drop styles after the existing CSS */

/* Drag and drop styles */
.wcvd-dragover,
.drag-over {
    border: 2px dashed var(--wcvd-primary-color) !important;
    background-color: rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.05) !important;
    opacity: 0.7;
}

/* Upload area styling */
.wcvd-form-images {
    margin-bottom: 20px;
}

/* File upload areas */
.wcvd-image-upload-area,
.wcvd-product-gallery-images {
    border: 2px dashed var(--wcvd-border-color);
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    background-color: var(--wcvd-light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
}

.wcvd-image-upload-area:hover,
.wcvd-product-gallery-images:hover,
.wcvd-image-upload-area.wcvd-hover,
.wcvd-product-gallery-images.wcvd-hover {
    border-color: var(--wcvd-primary-color);
    background-color: rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.02);
}

.wcvd-image-upload-area p {
    margin: 10px 0 0;
    font-size: 14px;
    color: #666;
}

.wcvd-product-image-preview {
    max-width: 100%;
    max-height: 200px;
    margin-bottom: 10px;
    border-radius: 4px;
}

/* Gallery containers */
.wcvd-product-gallery-images {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
    min-height: 100px;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Gallery image container */
.wcvd-gallery-image {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: move;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.wcvd-gallery-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wcvd-remove-gallery-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 16px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
}

.wcvd-gallery-image-placeholder {
    border: 2px dashed var(--wcvd-primary-color);
    background-color: rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.05);
    width: 80px;
    height: 80px;
    border-radius: 4px;
}

.wcvd-dragover,
.drag-over,
#wcvd-product-modal-direct .wcvd-dragover,
#wcvd-product-modal-direct .drag-over,
#wcvd-product-modal .wcvd-dragover,
#wcvd-product-modal .drag-over,
.wcvd-form-container .wcvd-dragover,
.wcvd-form-container .drag-over {
    border: 2px dashed var(--wcvd-primary-color) !important;
    background-color: rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.1) !important;
}

/* Upload overlay and spinner */
.wcvd-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.wcvd-upload-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wcvd-upload-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.2);
    border-top-color: var(--wcvd-primary-color);
    border-radius: 50%;
    animation: spinner-rotation 1s linear infinite;
}

@keyframes spinner-rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Styling for upload areas */
.wcvd-image-upload-area.uploading,
.wcvd-product-gallery-images.uploading {
    position: relative;
    overflow: hidden;
}

/* Featured image container styles */
#featured-image-upload {
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 1;
}

#featured-image-upload.wcvd-has-image p {
    display: none;
}

#featured-image-upload.wcvd-has-image:hover p {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    margin: 0;
    font-size: 12px;
}

/* Gallery image container styling */
#gallery-images-upload {
    width: 100%;
    z-index: 1;
    min-height: 60px;
    padding: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ddd;
    background-color: #f9f9f9;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

#gallery-images-upload:hover,
#gallery-images-upload.drag-over {
    border-color: var(--wcvd-primary-color);
    background-color: rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.05);
}

#gallery-images-upload.wcvd-has-image {
    border-color: var(--wcvd-primary-color);
    background-color: rgba(var(--e-global-color-primary-rgb, 98, 169, 73), 0.02);
}

.wcvd-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
} 