/* Дополнительные стили для календаря с WooCommerce */

/* Стили для вариативных товаров */
.variation-info {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    display: block;
}

.product-name .woocommerce-sku {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
}

/* Стили для метабокса в админке */
.woocommerce-product-data {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.woocommerce-product-data h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* Адаптация календаря под вариации */
.production-table tr.variation-row {
    background-color: #f9f9f9;
}

.production-table tr.variation-row:hover {
    background-color: #f0f7ff;
}

.production-table tr.variation-row td:first-child {
    padding-left: 40px;
    font-weight: normal;
}

/* Иконка вариации */
.variation-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #46b450;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    margin-right: 5px;
}

/* Стили для фильтров в календаре */
.calendar-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 200px;
}

/* Статусы остатков WooCommerce */
.stock-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.stock-instock {
    background: #d1f0d1;
    color: #0c7c0c;
}

.stock-outofstock {
    background: #f8d7da;
    color: #dc3232;
}

.stock-onbackorder {
    background: #fff3cd;
    color: #856404;
}

/* Информация о товаре в календаре */
.product-info-tooltip {
    position: relative;
    cursor: help;
}

.product-info-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
}

/* Адаптивность для WooCommerce */
@media (max-width: 1200px) {
    .calendar-filters {
        flex-wrap: wrap;
    }
    
    .calendar-filters select {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .production-table tr.variation-row td:first-child {
        padding-left: 20px;
    }
    
    .variation-info {
        display: none;
    }
}
/* Стили для вариаций в календаре */
.variation-row td:first-child {
    padding-left: 40px;
    position: relative;
}

.variation-row td:first-child::before {
    content: '↳';
    position: absolute;
    left: 20px;
    color: #666;
}

.variation-sku {
    color: #666;
    font-size: 11px;
}

.variation-info {
    color: #46b450;
    font-size: 10px;
    font-style: italic;
}

/* Подсветка вариаций */
.variation-row {
    background-color: #f9f9f9;
}

.variation-row:hover {
    background-color: #f0f7ff;
}

/* Отступ для родительского товара с вариациями */
.product-row-with-variations {
    border-bottom: 2px solid #ddd;
}

/* Стили для родительской строки товара */
.parent-product-row {
    background-color: #e8f4f8;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px solid #ccc;
}

.parent-product-row:hover {
    background-color: #d0e8f2;
}

.parent-product-row .product-name {
    padding: 12px 15px;
    font-size: 14px;
}

.parent-toggle {
    user-select: none;
}

.toggle-icon {
    display: inline-block;
    width: 20px;
    text-align: center;
    transition: transform 0.2s;
    margin-right: 8px;
    font-weight: bold;
}

.parent-product-row.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.variation-count {
    color: #666;
    font-weight: normal;
    font-size: 12px;
    margin-left: 10px;
}

/* Стили для дочерних вариаций */
.child-variation {
    transition: opacity 0.2s, max-height 0.2s;
}

.child-variation.hidden {
    display: none;
}

/* Увеличенный отступ для вариаций */
.child-variation td.product-name {
    padding-left: 50px !important;
    position: relative;
}

.child-variation td.product-name::before {
    content: "└─";
    position: absolute;
    left: 25px;
    color: #999;
    font-weight: bold;
}

