/*--------------------------- 
Add Plugin Front-End CSS here 
---------------------------*/

/* Styles for markets comparison table */
.markets-comparison {
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    border: none;
}
.markets-comparison td, 
.markets-comparison th {
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.markets-comparison th {
    font-size: 12px;
    font-weight: normal;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    height: 120px;
    white-space: nowrap;
    padding: 10px 0;
}

.markets-comparison th:first-child,
.markets-comparison th:last-child {
    writing-mode: horizontal-tb;
    transform: none;
    height: auto;
    text-align: left;
}

.markets-comparison tr:hover {
    background-color: transparent;
}

.markets-comparison .marketplace-logo {
    text-align: left;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    flex-direction: row;
    justify-content: flex-start;
    min-width: 120px;
    white-space: nowrap;
}

.markets-comparison .marketplace-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
   
}

.markets-comparison .status-icon {
    font-size: 18px;
    display: inline-block;
    vertical-align: middle;
}

.markets-comparison .price {
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
	display: flex;
    flex-direction: column;
    align-items: center;
}

.markets-comparison .price .current-price,
.markets-comparison .price .old-price {
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    white-space: nowrap;
    display: flex;
    justify-content: center;
}

/* Символ рубля должен быть такого же размера как цена */
.markets-comparison .price .current-price .currency,
.markets-comparison .price .old-price .currency {
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    padding-left: 5px;
}

.markets-comparison .view-button {
    background-color: #FFD700;
    color: #000;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}


/* Убираем границы у таблицы */
.markets-comparison,
.markets-comparison th,
.markets-comparison td {
    border: none !important;
}
.markets-comparison .marketplace-icon {
    max-width: 40px;
    margin-right: 0;
    margin-left: 0;
} 

.marketplace-icon {
    width: 100px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 10px;
}

.marketplace-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.marketplace-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.marketplace-row:last-child {
    border-bottom: none;
}

.marketplace-name {
    font-weight: bold;
    margin-right: 20px;
}

.marketplace-price {
    color: #333;
    font-size: 16px;
}

.marketplace-link {
    color: #0073aa;
    text-decoration: none;
}

.marketplace-link:hover {
    text-decoration: underline;
}



.markets-comparison th:first-child,
.markets-comparison td:first-child {
    width: 230px !important;
    text-align: left;
    vertical-align: middle;
	padding-left: 0;
}

.marketplace-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.marketplace-logo img {
    width: 80px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.marketplace-logo span {
    font-weight: bold;
    white-space: pre-wrap;
    overflow: hidden;
    text-overflow: ellipsis;
	margin-left: 20px;
}

.markets-comparison th,
.markets-comparison td {
    padding: 0 15px;
    margin: 10px 0;
    text-align: center;
    border: 1px solid #ddd;
}

.status-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    text-align: center;
}

.status-icon.yes {
    background-color: #4CAF50;
    color: white;
}

.status-icon.no {
    background-color: #B2B2B2;
    color: white;
}

.price {
    font-weight: bold;
    color: #000;
}

.view-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.view-button:hover {
    background-color: #1976D2;
}

.tpp-market-widget {
    font-family: 'Open Sans', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.tpp-market-widget h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}
.tpp-market-widget table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    margin-bottom: 20px;
}
.tpp-market-widget th, .tpp-market-widget td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.tpp-market-widget th {
    background: #f8f9fa;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    padding: 8px;
    text-align: center;
}
.tpp-market-widget .market-logo {
    width: 120px;
    height: 40px;
    object-fit: contain;
}
.tpp-market-widget .price {
    font-weight: 600;
    font-size: 125%;
    text-align: right;
    padding-right: 30px;
    width: 160px;
    color: #6C5FBC;
    white-space: nowrap;
}
.tpp-market-widget .features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.tpp-market-widget .feature {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}
.tpp-market-widget .buy-button {
    display: inline-block;
    box-sizing: border-box;
    color: rgb(0, 2, 22);
    text-align: center;
    font-weight: 600;
    transform: scale(1);
    font-size: 17px;
    background: rgb(254, 211, 52);
    padding: 6px 15px;
    border-radius: 4px;
    transition: transform 0.5s;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.tpp-market-widget .buy-button:hover {
    transform: scale(1.05);
}
.tpp-market-widget .buy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
.tpp-market-widget .market-row:hover {
    background: #f8f9fa;
    transition: background 0.3s ease;
}

.tpp-market-widget .view-button {
    display: inline-block;
    padding: 6px 15px;
    background: #554B91;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
    transition: background-color 0.3s;
}

.tpp-market-widget .view-button:hover {
    background: #6C5FBC;
}

.tpp-market-widget .status-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    text-align: center;
    color: white;
}

.tpp-market-widget .status-icon.yes {
    background-color: #4CAF50;
}

.tpp-market-widget .status-icon.no {
    background-color: #B2B2B2;
}

@media (max-width: 768px) {
    .markets-comparison {
        display: block;
        width: 100%;
        margin: 0;
    }

    .markets-comparison thead {
        display: none;
    }

    .markets-comparison tbody {
        display: block;
    }

    .markets-comparison tr {
        display: flex !important;
        flex-direction: column;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
        padding: 20px 0;
    }

    .markets-comparison td {
        display: flex;
        padding: 10px;
        border: none;
        border-bottom: 1px solid #eee;
       
    }

    .markets-comparison td:last-child {
        border-bottom: none;
    }

    .markets-comparison td[data-label="Консультация"],
    .markets-comparison td[data-label="Бесплатная доставка"],
    .markets-comparison td[data-label="Рассрочка"],
    .markets-comparison td[data-label="Кредит"],
    .markets-comparison td[data-label="Расходные материалы"] {
        justify-content: space-between;
        align-items: center;
    }

    .markets-comparison td[data-label="Консультация"]::before,
    .markets-comparison td[data-label="Бесплатная доставка"]::before,
    .markets-comparison td[data-label="Рассрочка"]::before,
    .markets-comparison td[data-label="Кредит"]::before,
    .markets-comparison td[data-label="Расходные материалы"]::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
    }

    html body .markets-comparison .marketplace-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100% !important;
        padding: 0;
        background: transparent;
    }

    .markets-comparison .marketplace-icon {
        width: 120px;
        height: 40px;
        object-fit: contain;
        margin-bottom: 10px;
        margin-right: 0;
        margin-left: 0;
    }
    .markets-comparison th:first-child, .markets-comparison td:first-child {
        padding-left: 0;
    }
    .markets-comparison .marketplace-logo span {
        font-size: 16px;
        font-weight: bold;
    }

    .markets-comparison .price {
        justify-content: center;
        font-size: 18px;
        font-weight: bold;
        color: #333;
    }

    .markets-comparison .view-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px;
        color: white;
        text-decoration: none;
        border-radius: 4px;
        
    }


    .markets-comparison .status-icon {
        margin-left: auto;
    }
    .markets-comparison .marketplace-row-head, .hide-on-mobile {
        display: none !important;
    }

    .tpp-market-widget table {
        border-spacing: 3px;
    }
    
    .tpp-market-widget th {
        font-size: 11px;
        padding: 6px;
    }
    
    .tpp-market-widget .view-button {
        padding: 5px 12px;
        font-size: 14px;
    }
}

/* Общие стили для виджета */
.tpp-market-widget {
    font-family: 'Open Sans', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Стили для таблицы */
.tpp-market-widget table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    margin-bottom: 20px;
}

.tpp-market-widget th, 
.tpp-market-widget td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tpp-market-widget th {
    background: #f8f9fa;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    padding: 8px;
    text-align: center;
}

/* Стили для заголовка */
.tpp-market-widget h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Стили для логотипов */
.tpp-market-widget .market-logo {
    width: 120px;
    height: 40px;
    object-fit: contain;
}

/* Стили для цен */
.tpp-market-widget .price {
    font-weight: 600;
    font-size: 125%;
    text-align: right;
    padding-right: 30px;
    width: 160px;
    color: #6C5FBC;
}
.markets-comparison .price span {
    display: block;
    position: relative;
}
.markets-comparison .price .old-price {
    color: #8d8d8d;
    font-size: 14px;
    font-weight: bold;
    text-decoration: line-through;
}

/* Убираем SVG зачеркивание, используем стандартное CSS */
.markets-comparison .price .old-price::after {
    display: none;
}
/* Стили для фич */
.tpp-market-widget .features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tpp-market-widget .feature {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* Стили для кнопок */
.tpp-market-widget .buy-button {
    display: inline-block;
    box-sizing: border-box;
    color: rgb(0, 2, 22);
    text-align: center;
    font-weight: 600;
    transform: scale(1);
    font-size: 17px;
    background: rgb(254, 211, 52);
    padding: 6px 15px;
    border-radius: 4px;
    transition: transform 0.5s;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.tpp-market-widget .buy-button:hover {
    transform: scale(1.05);
}

/* Эффект переливания для кнопок */
.tpp-market-widget .buy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Эффект при наведении на строку */
.tpp-market-widget .market-row:hover {
    background: #f8f9fa;
    transition: background 0.3s ease;
}

/* Стили для иконок маркетплейсов */
.marketplace-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-right: 10px;
}

.marketplace-icon img {
    max-width: 100%;
    height: auto;
}

/* Стили для строк маркетплейсов */
.marketplace-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.marketplace-name {
    flex: 1;
    font-weight: bold;
}

.marketplace-price {
    margin: 0 15px;
    color: #e74c3c;
    font-weight: bold;
}

.marketplace-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.marketplace-link:hover {
    color: #2980b9;
}

.table-wrapper {
    border: 0px solid red;
    border-radius: 20px;
    padding: 0px;
    position: relative;
	margin: 65px auto 0;
    max-width: 690px;
    
}
.table-wrapper::before {
    content: "Где купить";
    position: absolute;
    top: -40px;
    font-size: 25px;
    font-weight: 600;
}
/* Стили для кнопок */
.markets-comparison .view-button,
.tpp-market-widget .view-button {
    display: inline-block;
    padding: 6px 15px;
    background:  rgb(254, 211, 52);
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
    transition: background-color 0.3s;
}

.markets-comparison .view-button:hover,
.tpp-market-widget .view-button:hover {
    background: #6C5FBC;
}

/* Стили для заголовков таблицы */
.markets-comparison th,
.tpp-market-widget th {
    background: transparent;
    font-weight: 500;
    
    font-size: 14px;
    padding: 8px;
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    font-weight: bolder;
    text-align: left;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .tpp-market-widget table {
        display: block;
    }
    
    .tpp-market-widget thead {
        display: none;
    }
    
    .tpp-market-widget tbody {
        display: block;
    }
    
    .tpp-market-widget tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 5px;
    }
    
    .tpp-market-widget td {
        display: block;
        text-align: right;
        padding: 8px 15px;
        border: none;
    }
    
    .tpp-market-widget td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
    
    .tpp-market-widget .marketplace-logo {
        display: none;
    }
    
    .tpp-market-widget .marketplace-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tpp-market-widget .marketplace-name {
        margin-bottom: 5px;
    }
    
    .tpp-market-widget .marketplace-price {
        margin: 5px 0;
    }
        
    .table-wrapper {
        width: 100%;
        margin: 65px 0px;
        padding: 0;
        border: 0;
    }
    
    /* Стили для мобильной версии таблицы сравнения */
    .markets-comparison {
        font-size: 12px;
    }
    
    .markets-comparison th {
        height: 80px;
        font-size: 10px;
        padding: 5px 0;
    }
    
    .markets-comparison .marketplace-logo {
        text-align: center;
        justify-content: center;
        min-width: 80px;
        padding-top: 20px; /* Увеличиваем отступ сверху в 2.5 раза */
        flex-direction: column;
        gap: 8px; /* Одинаковые отступы между иконкой и названием */
    }
    
    .markets-comparison .marketplace-icon {
        width: 30px;
        height: 30px;
        margin: 0 auto;
    }
    
    .markets-comparison .price {
        font-size: 14px;
    }
    
    .markets-comparison .price .current-price {
        font-size: 14px;
        font-weight: bold;
    }
    
    .markets-comparison .price .old-price {
        font-size: 12px;
        font-weight: bold;
        text-decoration: line-through;
        color: #8d8d8d;
    }
    
    /* Убираем SVG зачеркивание для мобильной версии */
    .markets-comparison .price .old-price::after {
        display: none;
    }
    
    .markets-comparison .view-button {
        font-size: 12px;
        padding: 6px 15px;
        max-width: 80%;
    }
}

.markets-comparison td[data-label="Условия"] span {
    font-size: 14px;
    text-transform: none !important;
    letter-spacing: 0;
}
.markets-comparison td[data-label="Условия"] {
    min-width: 160px;
    width: auto;
}
@media (max-width: 700px) {
    .markets-comparison th, .markets-comparison td {
        padding: 6px 4px;
        font-size: 13px;
        margin: 0;
    }
    .markets-comparison .marketplace-logo {
        min-width: 80px;
    }
    .markets-comparison td[data-label="Условия"] {
        min-width: 100px;
    }
    
    .marketplace-logo span {
        margin-left: 0;
    }
}

/* === Стили для пакетной обработки связывания статей === */

.tpp-batch-linking-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tpp-batch-linking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tpp-batch-linking-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.tpp-batch-linking-buttons {
    display: flex;
    gap: 10px;
}

.tpp-batch-linking-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tpp-batch-linking-btn.primary {
    background: #0073aa;
    color: white;
}

.tpp-batch-linking-btn.primary:hover:not(:disabled) {
    background: #005a87;
}

.tpp-batch-linking-btn.danger {
    background: #dc3232;
    color: white;
}

.tpp-batch-linking-btn.danger:hover:not(:disabled) {
    background: #a00;
}

.tpp-batch-linking-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tpp-batch-status {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.tpp-batch-status.idle {
    background: #f0f0f1;
    color: #666;
    border: 1px solid #ddd;
}

.tpp-batch-status.processing {
    background: #e7f3ff;
    color: #0073aa;
    border: 1px solid #0073aa;
}

.tpp-batch-status.completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tpp-batch-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tpp-batch-progress-container {
    display: none;
    margin: 15px 0;
}

.tpp-batch-progress-container.show {
    display: block;
}

.tpp-progress-bar-container {
    background: #f0f0f1;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.tpp-progress-bar {
    background: linear-gradient(90deg, #0073aa, #005a87);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.tpp-progress-text {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.tpp-batch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.tpp-stat-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.tpp-stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tpp-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.tpp-batch-errors {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.tpp-batch-errors.show {
    display: block;
}

.tpp-batch-errors-title {
    font-size: 14px;
    font-weight: 600;
    color: #721c24;
    margin-bottom: 10px;
}

.tpp-batch-errors-list {
    max-height: 150px;
    overflow-y: auto;
}

.tpp-error-item {
    font-size: 12px;
    color: #721c24;
    padding: 4px 0;
    border-bottom: 1px solid #f5c6cb;
}

.tpp-error-item:last-child {
    border-bottom: none;
}

.tpp-notification {
    position: fixed;
    top: 32px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    max-width: 400px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tpp-notification.tpp-success {
    background: #28a745;
}

.tpp-notification.tpp-error {
    background: #dc3545;
}

.tpp-notification.tpp-info {
    background: #17a2b8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .tpp-batch-linking-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .tpp-batch-linking-buttons {
        justify-content: center;
    }
    
    .tpp-batch-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .tpp-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}




.ts-mc-ns {
	width: 80% !important;
	
}
.ts-mc-ns tbody {
	display: flex;
	flex-direction: column;
	width: 100%;
}
.ts-mc-ns tbody tr {
	display: flex;
	justify-content: space-around;
	width: 100%;
}
.ts-mc-ns tbody tr th {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 10%;
}
.ts-mc-ns tbody tr td {
	display: flex;
	width: 10%;
	justify-content: space-around;
	align-items: center;
	margin-top: 0;
}
.ts-mc-ns tbody tr .marketplace-logo {
	justify-content: flex-start;
}
.ts-mc-ns tbody tr td .view-button {
	display: flex;
	align-content: center;
	align-items: center;
	height: 25px;
}
.markets-comparison .price .current-price, .markets-comparison .price .old-price {
	align-items: center;
}


@media (max-width: 768px) {
    .ts-mc-ns tbody tr td .view-button {
		justify-content: center;
	}
	.ts-mc-ns tbody tr td {
		width: auto;
	}
}