/*
 * MODIFICATION: All selectors are now prefixed with '.ftsvm-wrapper'
 * This scopes the styles to the plugin's components, preventing theme overrides.
 * EXCEPTION: Modal styles are left global because they are rendered in the footer, outside the wrapper.
 * ENHANCEMENT: Modal button styles are now more specific using IDs to override theme styles.
*/

@font-face {
  font-family: 'ft-sepehr';
  src:  url('../fonts/ft-sepehr.eot?bhxn2f');
  src:  url('../fonts/ft-sepehr.eot?bhxn2f#iefix') format('embedded-opentype'),
    url('../fonts/ft-sepehr.ttf?bhxn2f') format('truetype'),
    url('../fonts/ft-sepehr.woff?bhxn2f') format('woff'),
    url('../fonts/ft-sepehr.svg?bhxn2f#ft-sepehr') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}


.ftsvm-wrapper [class^="icon-"], .ftsvm-wrapper [class*=" icon-"],
.ftsvm-modal-content [class^="icon-"], .ftsvm-modal-content [class*=" icon-"] { /* Make icons work in modals too */
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'ft-sepehr' !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-alert-triangle:before { content: "\e900"; }
.icon-align-right:before { content: "\e901"; }
.icon-award:before { content: "\e902"; }
.icon-bar-chart-2:before { content: "\e903"; }
.icon-bell:before { content: "\e904"; }
.icon-bookmark:before { content: "\e905"; }
.icon-box:before { content: "\e906"; }
.icon-check:before { content: "\e92c"; }
.icon-clock:before { content: "\e907"; }
.icon-credit-card:before { content: "\e908"; }
.icon-eye:before { content: "\e909"; }
.icon-file-text:before { content: "\e90a"; }
.icon-gift:before { content: "\e90b"; }
.icon-globe:before { content: "\e90c"; }
.icon-grid:before { content: "\e90d"; }
.icon-hash:before { content: "\e90e"; }
.icon-headphones:before { content: "\e90f"; }
.icon-heart:before { content: "\e910"; }
.icon-help-circle:before { content: "\e911"; }
.icon-home:before { content: "\e912"; }
.icon-mail:before { content: "\e92b"; }
.icon-map-pin:before { content: "\e913"; }
.icon-menu:before { content: "\e914"; }
.icon-message-square:before { content: "\e915"; }
.icon-percent:before { content: "\e916"; }
.icon-phone:before { content: "\e917"; }
.icon-pie-chart:before { content: "\e918"; }
.icon-plus:before { content: "\e919"; }
.icon-plus-circle:before { content: "\e91a"; }
.icon-power:before { content: "\e91b"; }
.icon-printer:before { content: "\e91c"; }
.icon-save:before { content: "\e91d"; }
.icon-search:before { content: "\e91e"; }
.icon-settings:before { content: "\e91f"; }
.icon-share:before { content: "\e920"; }
.icon-share-2:before { content: "\e921"; }
.icon-shield:before { content: "\e922"; }
.icon-shopping-bag:before { content: "\e923"; }
.icon-shopping-cart:before { content: "\e924"; }
.icon-slash:before { content: "\e925"; }
.icon-star:before { content: "\e926"; }
.icon-trash-2:before { content: "\e927"; }
.icon-truck:before { content: "\e928"; }
.icon-unlock:before { content: "\e929"; }
.icon-users:before { content: "\e92a"; }


.ftsvm-status,
.ftsvm-status-wrapper .ftsvm-status {
    padding: 5px 10px;
    border-radius: 4px;
    line-height: normal;
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.ftsvm-status.ftsvm-status-pending,
.ftsvm-status-wrapper[data-status="pending"] .ftsvm-status {
    background-color: #f0b849; 
    color: #fff;
}

.ftsvm-status.status-approved,
.ftsvm-status-wrapper[data-status="publish"] .ftsvm-status {
    background-color: #4caf50; /* سبز */
    color: #fff;
}

.ftsvm-status.status-rejected,
.ftsvm-status-wrapper[data-status="rejected"] .ftsvm-status {
    background-color: #d63638; /* قرمز */
    color: #fff;
}

.ftsvm-status.status-suspended,
.ftsvm-status-wrapper[data-status="private"] .ftsvm-status {
    background-color: #555; /* خاکستری تیره */
    color: #fff;
}

.ftsvm-status.status-fired {
    background-color: #2271b1; /* آبی */
    color: #fff;
}

.ftsvm-wrapper .ftsvm-status-pending {
    background: #ff9800;
    color: #ffffff;
}


.ftsvm-wrapper .status-approved {
    background: #4caf50;
    color: #ffffff;
}

.ftsvm-wrapper .status-suspended {
    background: #f44336;
    color: #ffffff;
}

.ftsvm-wrapper .status-fired {
    background: #9e9e9e;
    color: #ffffff;
}

.ftsvm-wrapper .status-unknown {
    background: #607d8b;
    color: #ffffff;
}

/* START OF MODIFICATION: New style for "Main Product" badge */
.ftsvm-wrapper .ftsvm-status.ftsvm-status-new {
    background-color: #3498db;
    color: #fff;
    font-weight: bold;
    margin-left: 5px;
}
/* END OF MODIFICATION */

.ftsvm-wrapper .ftsvm-my-list-actions {
    margin-top: 15px;
    margin-bottom: 15px;
    clear: both;
}


.ftsvm-wrapper .ftsvm-toggle-my-list-button .ftsvm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ftsvm-spin 1s ease-in-out infinite;
    -webkit-animation: ftsvm-spin 1s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes ftsvm-spin {
    to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes ftsvm-spin {
    to { -webkit-transform: rotate(360deg); }
}

.ftsvm-wrapper .ftsvm-my-list-message {
    padding: 8px;
    border-radius: 3px;
    font-size: 0.9em;
}
.ftsvm-wrapper .ftsvm-my-list-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.ftsvm-wrapper .ftsvm-my-list-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ftsvm-wrapper .ftsvm-notice {
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 4px;
    margin: 15px 0;
}



.ftsvm-wrapper .ftsvm-price-from {
    font-size: 0.85em;
    color: #777;
    margin-right: 5px; 
}

.ftsvm-wrapper .ftsvm-unavailable {
    color: #a00;
    font-weight: bold;
}
.ftsvm-wrapper .ftsvm-no-offers-available, .ftsvm-wrapper .ftsvm-unavailable {
    display: block;
    margin: 10px 0;
}
.ftsvm-wrapper .ftsvm-other-vendors-list-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.ftsvm-wrapper .ftsvm-other-vendors-title {
    font-size: 1.5em;
    margin-bottom: 15px;
}
.ftsvm-wrapper .ftsvm-other-vendors-table {width: 100%;background: #fff;margin-bottom: 20px !important;border-radius: 7px !important;border: 1px solid #cfcfcf;}
.ftsvm-wrapper .ftsvm-other-vendors-table thead {
    background: transparent !important;
    border-width: inherit;
}
.ftsvm-wrapper .ftsvm-other-vendors-table th,
.ftsvm-wrapper .ftsvm-other-vendors-table td {
    border-bottom: 1px solid #eee;
    padding: 12px;
    text-align: right;
}
.ftsvm-wrapper .ftsvm-other-vendors-table th, .ftsvm-wrapper .ftsvm-other-vendors-table td:last-child {
    border-left: none
}
.ftsvm-wrapper .ftsvm-other-vendors-table th {
    font-weight: bold;
}
.ftsvm-wrapper .ftsvm-outofstock {
    color: #cc0000;
}
.ftsvm-wrapper .ftsvm-main-product-vendor-info {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
    padding-bottom: 5px;

}
.ftsvm-wrapper .ftsvm-vendor-shop-name,
.ftsvm-wrapper .ftsvm-vendor-user-name {
    display: block; 
}

.ftsvm-wrapper .ftsvm-other-vendors-table .ftsvm-quantity-cell .quantity {
    display: inline-block;
    max-width: 80px;
    margin: 0; /* Override theme styles */
}
.ftsvm-wrapper .ftsvm-other-vendors-table .ftsvm-quantity-cell .qty {
    width: 60px;
    text-align: center;
    padding: 5px;
    height: 32px; /* Set a consistent height */
    box-sizing: border-box; /* Ensure padding is included */
}

.ftsvm-wrapper .ftsvm-other-vendors-table .ftsvm-price-cell del { color: #999; }
.ftsvm-wrapper .ftsvm-other-vendors-table .ftsvm-price-cell ins { background: none; text-decoration: none; color: #27ae60; font-weight: bold; }
.ftsvm-wrapper .ftsvm-other-vendors-table .ftsvm-price-cell .amount { color: #333; font-size: 1em; }


.ftsvm-wrapper .ftsvm-offer-description {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dotted #e0e0e0;
}
.ftsvm-wrapper .ftsvm-offer-description p {
    margin: 0;
}

.ftsvm-wrapper .ftsvm-offer-free-shipping {
    font-size: 0.9em;
    font-weight: bold;
    color: #28a745;
    margin-top: 5px;
}
.ftsvm-status{
    min-width: 100px;
    font-size: 0.9em;
    padding: 3px 10px;
    border-radius: 4px;
    line-height: normal;
    text-align: center;
    display: inline-block;
}
.status-approved {
    background-color: #4caf50;
    color: #ffffff;
}
.ftsvm-status-pending {
    background-color: #ff9800;
    color: #ffffff;
}
.ftsvm-status-rejected {
    background-color: #f44336;
    color: #ffffff;
}
.status-fired {
    background-color: #9e9e9e;
    color: #ffffff;
}
.status-suspended {
    background-color: #7e0e06;
    color: #ffffff;
}
.ftsvm-status.is-main-offer {
    background-color: #03A9F4;
    color: #ffffff;
    font-weight: bold;
}

.ftsvm-status.is-secondary-offer {
    background-color: #9C27B0;
    color: #ffffff;
}

.ftsvm-wrapper .ftsvm-status.status-warning { background-color: #ffeaca; color: #ed8d00; }

.ftsvm-wrapper .ftsvm-send-message-button {
    margin-right: 5px !important;
    background-color: #f0f0f0 !important;
    color: #555 !important;
    border: 1px solid #ccc !important;
    padding: 5px !important;
    min-width: 32px;
    height: 32px;
    line-height: 1 !important;
    border-radius: 4px;
}

.ftsvm-wrapper .ftsvm-send-message-button:hover {
    background-color: #e0e0e0 !important;
    color: #333 !important;
    border-color: #bbb !important;
}
.ftsvm-wrapper .ftsvm-send-message-button [class*="icon-"] {
    margin: 0;
    vertical-align: middle;
}
.ftsvm-wrapper .ftsvm-list-add-to-cart-button {
    padding: 5px !important;
    min-width: 32px;
    height: 32px;
    line-height: 1 !important;
    background-color: #009688 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px;
}
.ftsvm-wrapper .ftsvm-list-add-to-cart-button:hover {
        background-color: #007065 !important;

}
.ftsvm-wrapper .ftsvm-action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}
/* 
 * MODIFICATION: Modal styles are now GLOBAL (not scoped inside .ftsvm-wrapper)
 * This is because the modal HTML is rendered in the footer, outside the main content wrapper.
 * ENHANCEMENT: Modal button styles are now more specific using IDs to override theme styles.
*/
.ftsvm-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.6); z-index: 100050; display: flex; align-items: center; justify-content: center; direction: rtl; animation: ftsvm-fadeIn 0.3s ease; }
.ftsvm-modal-content { background: #fff; border-radius: 6px; width: 90%; max-width: 500px; box-shadow: 0 5px 15px rgba(0,0,0,.5); animation: ftsvm-slideIn 0.3s ease; }
.ftsvm-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #ddd; }
.ftsvm-modal-header h3 { margin: 0; font-size: 18px; }
.ftsvm-modal-close { border: none; background: none; font-size: 24px; font-weight: bold; cursor: pointer; color: #666; padding: 0 10px; line-height: 1; }
.ftsvm-modal-body { padding: 20px; }
.ftsvm-modal-footer { padding: 15px; border-top: 1px solid #ddd; display: flex; justify-content: flex-end; gap: 10px; }
#ftsvm-modal-response { padding: 10px; margin-bottom: 15px; border-radius: 4px; }
#ftsvm-modal-response.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
#ftsvm-modal-response.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
#ftsvm-customer-message-form .form-row { margin-bottom: 15px; }
@keyframes ftsvm-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ftsvm-slideIn { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ftsvm-modal-content.error-modal .ftsvm-modal-header { border-bottom-color: #d63638; }
.ftsvm-modal-icon { font-size: 24px; vertical-align: middle; margin-left: 8px; display: inline-block; font-family: 'ft-sepehr' !important; }
.ftsvm-modal-icon.error .icon-alert-triangle:before { content: "\e900"; color: #d63638; }
.ftsvm-modal-icon.success .icon-check:before { content: "\e92c"; color: #28a745; }
.ftsvm-modal-body p { font-size: 15px; text-align: justify; line-height: 28px; color: #000; }
#ftsvm-atc-modal .button { background: #00897B !important; color: white !important; border: none !important; padding: 8px 15px !important; font-size: 14px !important; border-radius: 4px !important; }
#ftsvm-atc-modal .button:hover { background: #00695C !important; }
#ftsvm-atc-modal .button.wc-forward { background: #009688 !important; }
#ftsvm-atc-modal .button.ftsvm-modal-close { background: #f0f0f0 !important; color: #555 !important; }
#ftsvm-atc-modal .button.ftsvm-modal-close:hover { background: #e0e0e0 !important; }
#ftsvm-message-modal .button { background: #2271b1 !important; color: white !important; border: none !important; padding: 8px 15px !important; font-size: 14px !important; border-radius: 4px !important; }
#ftsvm-message-modal .button:hover { background: #1b6099 !important; }

/* Styles for vendor rating & sales */
.ftsvm-wrapper .ftsvm-vendor-rating { display: inline-flex; align-items: center; font-size: 0.9em; }
.ftsvm-wrapper .ftsvm-vendor-rating .ftsvm-rating-stars .dashicons { color: #f1c40f; font-size: 16px; width: 16px; height: 16px; text-decoration: none; }
.ftsvm-wrapper .ftsvm-vendor-rating .ftsvm-rating-text { color: #777; margin-right: 5px; }
.ftsvm-wrapper .ftsvm-vendor-sales-count { display: block; font-size: 0.8em; color: #777; }

/* Styles for "Other Vendors" table enhancements */
.ftsvm-wrapper .ftsvm-other-vendors-list-wrapper .ftsvm-sorting-controls { margin-bottom: 1em; display: flex; gap: 10px; align-items: center; }
.ftsvm-wrapper .ftsvm-other-vendors-list-wrapper .ftsvm-sorting-controls span { font-size: 25px; }
.ftsvm-wrapper .ftsvm-other-vendors-list-wrapper .ftsvm-sorting-controls button { background: #f0f0f0; border: 1px solid #ccc; color: #919191; padding: 2px 10px; cursor: pointer; border-radius: 3px; line-height: normal; font-size: 15px; font-weight: normal; }
.ftsvm-wrapper .ftsvm-other-vendors-list-wrapper .ftsvm-sorting-controls button.active { background: #26A69A; color: white; border-color: #26A69A; }
.ftsvm-wrapper .ftsvm-best-offer-badge { color: #155724; }
.ftsvm-wrapper .ftsvm-offer-row.best-offer { background-color: #f0fff0; border-right: 3px solid #28a745; }
.ftsvm-wrapper .ftsvm-vendor-store-title{color: #00695C;font-weight: bold;text-decoration: none !important;}
.ftsvm-wrapper a.ftsvm-vendor-store-title:hover { color: #000; }
.ftsvm-wrapper .ftsvm-quantity-cell .qty{ border-radius: 5px !important; }
.ftsvm-wrapper td.ftsvm-stock-cell, .ftsvm-wrapper td.ftsvm-action-cell, .ftsvm-wrapper td.ftsvm-quantity-cell, .ftsvm-wrapper td.ftsvm-price-cell, .ftsvm-wrapper td.ftsvm-rating-cell{ text-align: center; font-size: 15px; line-height: normal; }

/*
 * START: Final Fix for Add to Cart Button Icons & Overrides
*/

/* 1. Reset positioning context for our specific buttons */
.ftsvm-wrapper .ftsvm-list-add-to-cart-button,
.ftsvm-wrapper .single_add_to_cart_button.ftsvm-ajax-add-to-cart {
    position: relative;
    transition: all 0.3s ease;
}

/* 2. Hide WooCommerce's default ::after spinner and checkmark FOR OUR BUTTONS ONLY */
.ftsvm-wrapper .ftsvm-list-add-to-cart-button.loading::after,
.ftsvm-wrapper .single_add_to_cart_button.ftsvm-ajax-add-to-cart.loading::after,
.ftsvm-wrapper .ftsvm-list-add-to-cart-button.added::after,
.ftsvm-wrapper .single_add_to_cart_button.ftsvm-ajax-add-to-cart.added::after {
    display: none !important;
    content: '' !important;
}

/* 3. Style our custom icon spans */
.ftsvm-wrapper .ftsvm-list-add-to-cart-button span[class*="ftsvm-"],
.ftsvm-wrapper .single_add_to_cart_button.ftsvm-ajax-add-to-cart span[class*="ftsvm-"] {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    display: none; /* Hide all by default */
}

/* 4. Spinner styles */
.ftsvm-wrapper .ftsvm-spinner-inline {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ftsvm-spin 1s linear infinite;
}

/* 5. Show/Hide logic based on parent button classes */
/* Initial State */
.ftsvm-wrapper .ftsvm-list-add-to-cart-button:not(.loading):not(.added) .ftsvm-icon-atc {
    display: block;
}
/* Loading State */
.ftsvm-wrapper .ftsvm-list-add-to-cart-button.loading .ftsvm-spinner-inline {
    display: block;
}
/* Added State */
.ftsvm-wrapper .ftsvm-list-add-to-cart-button.added .ftsvm-icon-atc-success {
    display: block;
    color: #fff;
    font-size: 20px;
}
/*
 * END: Final Fix for Add to Cart Button Icons
*/

/* Styles for vendor info tooltip */
.ftsvm-wrapper .ftsvm-vendor-name-container { position: relative; display: inline-block; }
.ftsvm-wrapper .ftsvm-vendor-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 10px 15px; border-radius: 5px; z-index: 10; width: 240px; font-size: 0.9em; text-align: right; box-shadow: 0 2px 5px rgba(0,0,0,0.3); margin-bottom: 8px; }
.ftsvm-wrapper .ftsvm-vendor-tooltip:after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #333 transparent transparent transparent; }
.ftsvm-wrapper .ftsvm-vendor-name-container:hover .ftsvm-vendor-tooltip { display: block; }
.ftsvm-wrapper .ftsvm-vendor-tooltip h4 { margin: 0 0 8px 0; padding-bottom: 5px; border-bottom: 1px solid #555; color: #fff; font-size: 1em; }
.ftsvm-wrapper .ftsvm-vendor-tooltip ul { list-style: none; margin: 0; padding: 0; }
.ftsvm-wrapper .ftsvm-vendor-tooltip ul li { padding: 3px 0; }
.ftsvm-wrapper .ftsvm-vendor-tooltip ul li small { color: #ccc; }
.ftsvm-wrapper .ftsvm-tooltip-overall { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #555; }
.ftsvm-wrapper .ftsvm-tooltip-overall span { display: flex; justify-content: space-between; align-items: baseline; }
.ftsvm-wrapper .ftsvm-tooltip-overall span small { font-size: 0.8em; }
.ftsvm-wrapper .ftsvm-rating-bar-container { background: #555; border-radius: 5px; height: 8px; overflow: hidden; margin-top: 5px; }
.ftsvm-wrapper .ftsvm-rating-bar { height: 100%; border-radius: 5px; background-image: linear-gradient(to left, #e74c3c, #f1c40f, #2ecc71); }
.ftsvm-wrapper .ftsvm-offer-description-list { font-size: 0.85em; color: #666; display: flex; gap: 5px; }
.ftsvm-wrapper .ftsvm-best-offer-badge .icon-bookmark { margin-left: 5px; }
.ftsvm-wrapper .ftsvm-offer-description-list p { margin: 0; }
.ftsvm-wrapper th.vendor-rating-th { width: 120px; text-align: center; }
.ftsvm-wrapper th.vendor-price-th { width: 150px; text-align: center; }
.ftsvm-wrapper th.vendor-stock-th { width: 100px; text-align: center; }
.ftsvm-wrapper th.vendor-quantity-th { width: 50px; text-align: center; }
.ftsvm-wrapper th.vendor-action-th { width: 100px; text-align: center; }

/* START: Styles for Vendor Store Header Horizontal Detailed Rating */
.ftsvm-wrapper .ftsvm-vendor-store-header { background-color: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; margin-bottom: 2em; display: flex; flex-direction: column; align-items: stretch; gap: 15px; }
.ftsvm-wrapper .ftsvm-store-header-rating-details-horizontal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.ftsvm-wrapper .ftsvm-rating-overall-horizontal { display: flex; align-items: center; gap: 15px; padding-right: 5px; padding-left: 20px; border-right: 4px solid #00897B; }
.ftsvm-wrapper .ftsvm-rating-overall-horizontal .ftsvm-score-value { font-size: 2.5em; font-weight: 700; background: #00897B; padding: 10px; border-radius: 4px; color: #fff; line-height: 1; }
.ftsvm-wrapper .ftsvm-rating-overall-horizontal .ftsvm-score-label { display: flex; flex-direction: column; }
.ftsvm-wrapper .ftsvm-rating-overall-horizontal .ftsvm-score-label span { font-size: 1.1em; font-weight: 600; }
.ftsvm-wrapper .ftsvm-rating-overall-horizontal .ftsvm-score-label small { font-size: 0.85em; color: #777; }
.ftsvm-wrapper .ftsvm-rating-breakdown-horizontal { display: flex; gap: 40px; flex-grow: 1; justify-content: flex-start; }
.ftsvm-wrapper .ftsvm-breakdown-item-horizontal { display: flex; align-items: center; gap: 10px; text-align: right; }
.ftsvm-wrapper .ftsvm-breakdown-item-horizontal [class*="icon-"] { font-size: 20px; color: #ffffff; background: #80CBC4; border-radius: 4px; padding: 11px; }
.ftsvm-wrapper .ftsvm-breakdown-text { display: flex; flex-direction: column; margin-top: 10px; }
.ftsvm-wrapper .ftsvm-breakdown-item-horizontal .ftsvm-breakdown-score-horizontal { font-size: 1em; font-weight: bold; color: #333; line-height: 0.5; }
.ftsvm-wrapper .ftsvm-breakdown-item-horizontal .ftsvm-breakdown-score-horizontal small { font-size: 0.6em; font-weight: normal; color: #888; }
.ftsvm-wrapper .ftsvm-breakdown-item-horizontal .ftsvm-breakdown-label-horizontal { font-size: 0.9em; color: #666; line-height: normal; }
.ftsvm-wrapper .ftsvm-vendor-product-count { margin: 0; color: #555; font-size: 0.95em; width: 100%; text-align: right; }
.ftsvm-wrapper .ftsvm-shipping-badge.free-shipping { color: #28a745; font-weight: bold; }

@media screen and (max-width: 768px) {
    .ftsvm-wrapper .ftsvm-store-header-rating-details-horizontal { gap: 25px; border-bottom: none; }
    .ftsvm-wrapper .ftsvm-rating-overall-horizontal { padding-left: 0; border-left: none; width: 100%; }
    .ftsvm-wrapper .ftsvm-rating-breakdown-horizontal { gap: 10px; flex-grow: 1; justify-content: flex-start; flex-direction: column; }
    .ftsvm-wrapper .ftsvm-vendor-product-count { padding-top: 15px; border-top: 1px solid #eee; }
    .ftsvm-wrapper .ftsvm-other-vendors-table thead { display: none; }
    .ftsvm-wrapper .ftsvm-other-vendors-table tr { display: block; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 4px; padding: 10px; }
    .ftsvm-wrapper .ftsvm-other-vendors-table td { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 8px 0; border: none; border-bottom: 1px dotted #eee; }
    .ftsvm-wrapper .ftsvm-other-vendors-table td:last-child { border-bottom: 0; }
    .ftsvm-wrapper .ftsvm-other-vendors-table td:before { content: attr(data-title); font-weight: bold; padding-right: 10px; }
    .ftsvm-wrapper .ftsvm-other-vendors-table td.ftsvm-action-cell { flex-direction: column; align-items: stretch; }
    .ftsvm-wrapper .ftsvm-other-vendors-table td.ftsvm-action-cell .ftsvm-action-buttons { width: 100%; justify-content: space-between; }
    .ftsvm-wrapper .ftsvm-other-vendors-table td.ftsvm-action-cell .button { flex-grow: 1; margin: 5px 0 0 0 !important; }
    .ftsvm-wrapper .ftsvm-other-vendors-table td.ftsvm-quantity-cell .quantity { margin-left: 0; }
}








/* sepehr/plugins/tickets/assets/tickets.css */

/* --- استایل کلی لیست تیکت‌ها (جدول) --- */
.ftsvm-customer-tickets-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ftsvm-tickets-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
}

.ftsvm-tickets-table thead th {
    background-color: #f9f9f9;
    font-weight: 700;
    color: #444;
    border-bottom: 2px solid #eee;
    padding: 15px;
}

.ftsvm-tickets-table td {
    padding: 15px;
    vertical-align: middle;
}

.ticket-subject-link {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}
.ticket-subject-link:hover {
    color: #0073aa;
}

.ticket-vendor-name {
    color: #666;
    font-size: 0.9em;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
}
.ftsvm-term-badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    line-height: normal;
}
/* بج‌های وضعیت */
.ftsvm-status-badge { padding: 5px 10px; border-radius: 15px; color: #fff; font-size: 0.8em; font-weight: bold; white-space: nowrap; }
.ftsvm-status-badge.status-open { background-color: #2196F3; } /* آبی */
.ftsvm-status-badge.status-in-progress { background-color: #FF9800; } /* نارنجی */
.ftsvm-status-badge.status-answered { background-color: #4CAF50; } /* سبز */
.ftsvm-status-badge.status-customer-reply { background-color: #9C27B0; } /* بنفش */
.ftsvm-status-badge.status-on-hold { background-color: #607D8B; } /* خاکستری آبی */
.ftsvm-status-badge.status-closed { background-color: #9E9E9E; } /* خاکستری */

/* --- استایل صفحه تکی تیکت (مکالمه) --- */
.ftsvm-single-ticket .entry-title {
    font-size: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #333;
}

/* باکس اطلاعات تیکت */
.ftsvm-ticket-meta { 
    background: #f8f9fa; 
    padding: 15px; 
    margin-bottom: 30px; 
    border: 1px solid #e9ecef; 
    border-radius: 8px; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
    font-size: 0.95em;
}
.ftsvm-ticket-meta span { color: #555; }
.ftsvm-ticket-meta strong { color: #333; }

/* استایل پیام‌ها */
.ftsvm-ticket-conversation { 
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ftsvm-ticket-message { 
    border: 1px solid #e5e5e5; 
    border-radius: 8px; 
    overflow: hidden;
    background: #fff;
    position: relative;
}

/* هدر پیام */
.ftsvm-ticket-message .message-author { 
    padding: 12px 15px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    border-bottom: 1px solid #f0f0f0;
}
.ftsvm-ticket-message .message-author img { 
    border-radius: 50%; 
    width: 40px; 
    height: 40px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.ftsvm-ticket-message .message-author strong { font-size: 1.05em; color: #333; }
.ftsvm-ticket-message .message-author time { margin-right: auto; color: #999; font-size: 0.85em; direction: ltr; }

/* بدنه پیام */
.ftsvm-ticket-message .message-content { 
    padding: 20px; 
    line-height: 1.8; 
    color: #444;
    font-size: 15px;
}

/* رنگ‌بندی بر اساس نقش */
/* پیام مشتری (سفید/خاکستری) */
.ftsvm-ticket-message.customer-reply .message-author { background: #f9f9f9; }
.ftsvm-ticket-message.customer-reply { border-left: 4px solid #ccc; }

/* پیام فروشنده (سبز ملایم) */
.ftsvm-ticket-message.vendor-reply .message-author { background: #e8f5e9; }
.ftsvm-ticket-message.vendor-reply { border-color: #c8e6c9; border-left: 4px solid #4CAF50; }

/* پیام پشتیبان/ادمین (آبی/زرد ملایم) */
.ftsvm-ticket-message.support-reply .message-author { background: #e3f2fd; }
.ftsvm-ticket-message.support-reply { border-color: #bbdefb; border-left: 4px solid #2196F3; }



/* --- کانتینر اصلی فرم --- */
.ftsvm-submit-ticket-form-wrapper {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
    max-width: 800px;
    margin: 30px auto;
    font-family: inherit; /* ارث‌بری فونت قالب */
}

.ftsvm-submit-ticket-form-wrapper h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

/* --- استایل پیام‌های خطا و موفقیت --- */
#ftsvm-ticket-form-response {
    margin-bottom: 25px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none; /* توسط JS نمایش داده می‌شود */
    align-items: center;
    line-height: 1.6;
}

/* حالت موفقیت */
#ftsvm-ticket-form-response.success {
    background-color: #e8f5e9; /* سبز خیلی روشن */
    color: #2e7d32; /* سبز تیره */
    border: 1px solid #c8e6c9;
    border-right: 5px solid #2e7d32;
}

/* حالت خطا */
#ftsvm-ticket-form-response.error, 
#ftsvm-ticket-form-response .woocommerce-error {
    background-color: #ffebee; /* قرمز خیلی روشن */
    color: #c62828; /* قرمز تیره */
    border: 1px solid #ffcdd2;
    border-right: 5px solid #c62828;
}

#ftsvm-ticket-form-response p {
    margin: 0;
    padding: 0;
}

/* --- استایل فیلدها و لیبل‌ها --- */
.ftsvm-submit-ticket-form-wrapper .form-row {
    margin-bottom: 20px;
}

.ftsvm-submit-ticket-form-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.ftsvm-submit-ticket-form-wrapper .required {
    color: #e53935;
    text-decoration: none;
    margin-right: 3px;
}

.ftsvm-submit-ticket-form-wrapper input[type="text"],
.ftsvm-submit-ticket-form-wrapper textarea,
.ftsvm-submit-ticket-form-wrapper select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ftsvm-submit-ticket-form-wrapper input[type="text"]:focus,
.ftsvm-submit-ticket-form-wrapper textarea:focus,
.ftsvm-submit-ticket-form-wrapper select:focus {
    border-color: #6c5ce7; /* رنگ بنفش */
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    outline: none;
}

/* --- استایل Select2 (اگر استفاده شده باشد) --- */
.ftsvm-submit-ticket-form-wrapper .select2-container .select2-selection--single {
    height: 46px; /* هماهنگ با اینپوت‌ها */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.ftsvm-submit-ticket-form-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
    padding-right: 15px;
}

.ftsvm-submit-ticket-form-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
}

/* --- استایل آپلود فایل --- */
.ftsvm-submit-ticket-form-wrapper input[type="file"] {
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    border: 1px dashed #ccc;
    cursor: pointer;
}

/* --- دکمه ارسال --- */
.ftsvm-submit-ticket-form-wrapper button[type="submit"] {
    background-color: #6c5ce7; /* بنفش */
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ftsvm-submit-ticket-form-wrapper button[type="submit"]:hover {
    background-color: #5b4cc4;
    transform: translateY(-2px);
}

.ftsvm-submit-ticket-form-wrapper button[type="submit"]:disabled {
    background-color: #a29bfe;
    cursor: not-allowed;
    transform: none;
}

/* ریسپانسیو */
@media (min-width: 768px) {
    .ftsvm-submit-ticket-form-wrapper button[type="submit"] {
        width: auto;
        min-width: 200px;
    }
    
    .form-row-first, .form-row-last {
        width: 48%;
        display: inline-block;
    }
    .form-row-first { float: right; margin-left: 4%; }
    .form-row-last { float: left; margin-right: 0; }
}



/* باکس دانلود فایل */
.ftsvm-attachment-link { 
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 1px dashed #eee; 
}
.ftsvm-attachment-link a { 
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px; 
    background-color: #f1f3f5; 
    border-radius: 20px; 
    font-size: 0.9em; 
    color: #495057; 
    text-decoration: none;
    transition: all 0.2s;
}
.ftsvm-attachment-link a:hover { 
    background-color: #e9ecef; 
    color: #222;
}
.ftsvm-attachment-link a:before {
    content: '\f316'; /* Dashicon paperclip */
    font-family: dashicons;
}

/* فرم ارسال پاسخ */
.ftsvm-ticket-reply-form { 
    margin-top: 40px; 
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.ftsvm-ticket-reply-form h3 { margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }

/* رسپانسیو */
@media (max-width: 768px) {
    .ftsvm-tickets-table thead { display: none; }
    .ftsvm-tickets-table tr { display: block; margin-bottom: 15px; border: 1px solid #eee; border-radius: 8px; padding: 10px; }
    .ftsvm-tickets-table td { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dotted #eee; }
    .ftsvm-tickets-table td:last-child { border-bottom: none; }
    .ftsvm-tickets-table td:before { content: attr(data-title); font-weight: bold; color: #777; }
    
    .ticket-details-container { grid-template-columns: 1fr; }
}

.ftsvm-awaiting-mod {
    background: #F44336;
    color: #fff;
    padding: 3px 6px;
    border-radius: 19px;
    font-size: 11px;
}

/* --- FTSVM Shortcodes & Leaderboard Styles --- */
.ftsvm-leaderboard-wrapper { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); margin-bottom: 30px; }
.ftsvm-leaderboard-title { text-align: center; font-size: 1.2rem; margin-bottom: 20px; border-bottom: 2px solid #f1f1f1; padding-bottom: 10px; color: #333; }
.ftsvm-leaderboard-list { list-style: none; padding: 0; margin: 0; }
.ftsvm-leaderboard-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px dashed #eee; transition: background 0.2s; }
.ftsvm-leaderboard-item:last-child { border-bottom: none; }
.ftsvm-leaderboard-item:hover { background-color: #fafafa; }
.rank-badge { width: 24px; height: 24px; background: #eee; color: #555; border-radius: 50%; text-align: center; line-height: 24px; font-weight: bold; font-size: 12px; margin-left: 15px; }
.ftsvm-leaderboard-item.rank-1 .rank-badge { background: #FFD700; color: #fff; transform: scale(1.2); }
.ftsvm-leaderboard-item.rank-2 .rank-badge { background: #C0C0C0; color: #fff; }
.ftsvm-leaderboard-item.rank-3 .rank-badge { background: #CD7F32; color: #fff; }
.vendor-avatar img { border-radius: 50%; width: 40px; height: 40px; object-fit: cover; border: 1px solid #eee; margin-left: 10px; }
.vendor-info { display: flex; flex-direction: column; justify-content: center; }
.vendor-info .vendor-name { font-weight: bold; color: #333; text-decoration: none; font-size: 0.95rem; }
.vendor-info .metric-value { color: #28a745; font-weight: bold; font-size: 0.85rem; }
.vendor-info .metric-rating { color: #f39c12; font-size: 0.85rem; display: flex; align-items: center; gap: 3px; }

/* Product Page Shortcodes */
.ftsvm-shipping-text-badge { background: #e3f2fd; color: #0d47a1; padding: 4px 8px; border-radius: 4px; font-size: 0.9em; display: inline-flex; align-items: center; gap: 5px; }
.ftsvm-free-shipping-badge { background: #e8f5e9; color: #2e7d32; padding: 4px 8px; border-radius: 4px; font-size: 0.9em; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #c8e6c9; }
.ftsvm-offer-description-box { background: #fff3e0; border: 1px dashed #ffcc80; padding: 10px; border-radius: 5px; font-size: 0.9em; margin: 10px 0; color: #e65100; }
.ftsvm-vendor-rating-container { display: inline-flex; align-items: center; gap: 2px; }
.ftsvm-rating-score { font-weight: bold; color: #333; }
.ftsvm-vendor-location { color: #666; font-size: 0.9em; display: inline-flex; align-items: center; gap: 3px; }



.ftsvm-toggle-my-list-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

/* حالت غیرفعال/لودینگ */
.ftsvm-toggle-my-list-button:disabled,
.ftsvm-toggle-my-list-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* انیمیشن اسپینر */
.ftsvm-toggle-my-list-button .ftsvm-spinner {
    display: none; /* پیش‌فرض مخفی */
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ftsvm-spin 0.8s linear infinite;
}

@keyframes ftsvm-spin {
    to { transform: rotate(360deg); }
}

/* استایل پیام‌ها */
.ftsvm-my-list-message {
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    line-height: 1.4;
}
.ftsvm-my-list-message.success {
    background-color: #e7f4e4;
    color: #0c5460;
    border: 1px solid #c3e6cb;
}
.ftsvm-my-list-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}



/* New styles for numeric rating display in vendor lists */
.ftsvm-wrapper .ftsvm-vendor-rating.ftsvm-rating-numeric {
    display: inline-flex;
    align-items: baseline; /* برای تراز بهتر عدد بزرگ و کوچک */
    gap: 2px;
}

.ftsvm-wrapper .ftsvm-rating-numeric .ftsvm-score-value {
    font-size: 1.1em; /* بزرگ‌تر */
    font-weight: 700; /* ضخیم‌تر */
    color: #333;
    line-height: 1;
}

.ftsvm-wrapper .ftsvm-rating-numeric .ftsvm-score-base {
    font-size: 0.85em; /* کوچک‌تر */
    color: #777; /* کم‌رنگ‌تر */
    font-weight: 400;
    line-height: 1;
}

.ftsvm-wrapper .ftsvm-no-rating {
    font-size: 0.9em;
    color: #0073aa;
    font-weight: bold;
}


/* Styles for vendor info tooltip */
.ftsvm-wrapper .ftsvm-vendor-name-container { 
    position: relative; 
    display: inline-block; 
}
.ftsvm-wrapper .ftsvm-vendor-tooltip { 
    display: none; 
    position: absolute; 
    bottom: 100%; 
    left: 50%; 
    transform: translateX(-50%); 
    background: #333; 
    color: #fff; 
    padding: 10px 15px; 
    border-radius: 5px; 
    z-index: 10; 
    width: 240px; 
    font-size: 0.9em; 
    text-align: right; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); 
    margin-bottom: 8px; 
}
.ftsvm-wrapper .ftsvm-vendor-tooltip:after { 
    content: ''; 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    margin-left: -5px; 
    border-width: 5px; 
    border-style: solid; 
    border-color: #333 transparent transparent transparent; 
}
.ftsvm-wrapper .ftsvm-vendor-name-container:hover .ftsvm-vendor-tooltip { 
    display: block; 
}
.ftsvm-wrapper .ftsvm-vendor-tooltip h4 { 
    margin: 0 0 8px 0; 
    padding-bottom: 5px; 
    border-bottom: 1px solid #555; 
    color: #fff; 
    font-size: 1em; 
}
.ftsvm-wrapper .ftsvm-vendor-tooltip ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
}
.ftsvm-wrapper .ftsvm-vendor-tooltip ul li { 
    padding: 3px 0; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ftsvm-wrapper .ftsvm-vendor-tooltip ul li small { 
    color: #ccc; 
    margin-right: 5px;
}
.ftsvm-wrapper .ftsvm-tooltip-overall { 
    margin-bottom: 10px; 
    padding-bottom: 10px; 
    border-bottom: 1px solid #555; 
}
.ftsvm-wrapper .ftsvm-tooltip-overall span { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
}
.ftsvm-wrapper .ftsvm-tooltip-overall span small { 
    font-size: 0.8em; 
}
.ftsvm-wrapper .ftsvm-rating-bar-container { 
    background: #555; 
    border-radius: 5px; 
    height: 8px; 
    overflow: hidden; 
    margin-top: 5px; 
}
.ftsvm-wrapper .ftsvm-rating-bar { 
    height: 100%; 
    border-radius: 5px; 
    background-image: linear-gradient(to left, #e74c3c, #f1c40f, #2ecc71); 
}