/* Основные стили для таблицы прайсов */
.table-price-header button {
    float: right;
    background: red;
    color: #fff;
    margin-bottom: 10px;
}
.table-price-header{
   border: none!important;
}
#table-price tr {
    border-bottom: 1px solid;
}

#table-price td {
    padding: 5px 0;
    text-align: center;
}

.table-price-cat {
    text-align: left !important;
    font-weight: bold;
}

.table-old-price {
    color: red;
    text-decoration: line-through;
}

#price-loader {
    display: none;
    text-align: center;
}

#price-loader.open {
    display: block;
}

#price-loader span {
    width: 100%;
    color: #000;
    font-size: 2em;
}

#get-file-xls, #get-file-pdf {
    margin: 0 1em;
    font-size: 0.7em;
    padding: 5px;
}

.table-price-header button a {
    color: #fff !important;
    text-decoration: none !important;
}

/* Стили для ленивой подгрузки */
.price-loader {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 5px;
    margin: 10px 0;
}

#loading-indicator td {
    background: #f9f9f9 !important;
    border: none !important;
}

.loading-message {
    text-align: center;
    padding: 15px;
    color: #666;
    font-style: italic;
}

.all-loaded-message {
    text-align: center;
    padding: 20px;
    color: #666;
    background: #f0f8f0;
    border: 1px solid #d0e8d0;
    border-radius: 5px;
    margin: 10px 0;
}

/* Плавная анимация для новых элементов */
.price-item {
    transition: opacity 0.3s ease;
}

.price-item.new-item {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Улучшения для индикатора загрузки */
#price-loader {
    background: rgba(255,255,255,0.9);
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #ddd;
}

#price-loader h3 {
    margin: 0;
    color: #333;
}

/* СТИЛИ ДЛЯ АДМИНКИ */
.mg-admin-wrap {
    max-width: 800px;
    margin: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mg-form-row {
    margin-bottom: 20px;
}

.mg-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.mg-form-row select,
.mg-form-row input[type="text"] {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mg-admin-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mg-admin-btn:hover {
    background: #005a87;
}

.mg-success-msg {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #c3e6cb;
}

.mg-plugin-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007cba;
}

.mg-plugin-info h3 {
    margin-top: 0;
    color: #333;
}

.mg-plugin-info p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #666;
}

/* Мобильная адаптация */
@media screen and (max-width: 768px) {
    .table-price-header {
        text-align: center;
    }
    
    .table-price-header button {
        float: none;
        display: block;
        width: 100%;
        margin: 10px 0;
        padding: 12px;
        font-size: 1em;
    }
    
    #table-price {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #table-price thead {
        display: none;
    }
    
    #table-price tbody, 
    #table-price tr {
        display: block;
        width: 100%;
    }
    
    #table-price tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 15px 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        background: #fff;
    }
    
    #table-price td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 12px 8px !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    #table-price td:last-child {
        border-bottom: none !important;
    }
    
    #table-price td:before {
        content: attr(data-label);
        font-weight: bold;
        color: #333;
        min-width: 120px;
        max-width: 120px;
        margin-right: 15px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    /* Стили для изображений на мобильных */
    #table-price td:first-child {
        justify-content: flex-start;
        align-items: center;
    }
    
    #table-price td:first-child:before {
        align-self: flex-start;
        margin-top: 5px;
    }
    
    #table-price td:first-child img {
        max-width: 60px !important;
        max-height: 60px !important;
        margin: 0 !important;
        display: block;
    }
    
    /* Особые стили для ячейки с названием товара */
    #table-price td:nth-child(2) {
        align-items: flex-start;
        flex-direction: column;
    }
    
    #table-price td:nth-child(2):before {
        margin-bottom: 8px;
    }
    
    #table-price td:nth-child(2) > div {
        width: 100%;
    }
    
    /* Улучшаем отображение оптовых цен */
    .table-wholesale-price {
        font-size: 12px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
    }
    
    /* Улучшаем отображение кнопок скачивания на мобильных */
    #get-file-xls, #get-file-pdf {
        display: block;
        width: 100%;
        margin: 5px 0;
        padding: 12px;
        font-size: 0.9em;
    }
    
    /* Адаптивные улучшения для ленивой подгрузки */
    .price-loader {
        padding: 15px;
        font-size: 14px;
    }
    
    #loading-indicator td {
        padding: 15px 10px !important;
    }
    
    .all-loaded-message {
        padding: 15px;
        font-size: 14px;
    }
}

/* Дополнительные улучшения для очень маленьких экранов */
@media screen and (max-width: 480px) {
    #table-price td {
        padding: 10px 6px !important;
        font-size: 14px;
        flex-direction: column;
    }
    
    #table-price td:before {
        min-width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
        font-size: 13px;
        color: #666;
    }
    
    #table-price td:first-child {
        flex-direction: row;
        align-items: center;
    }
    
    #table-price td:first-child:before {
        min-width: 80px;
        max-width: 80px;
        margin-right: 10px;
        margin-bottom: 0;
    }
    
    .table-price-header h1 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    #table-price tr {
        padding: 12px 8px;
    }
}

/* Улучшения для планшетов */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    #table-price {
        font-size: 14px;
    }
    
    #table-price td {
        padding: 8px 5px;
    }
}

/* Гарантия, что на ПК все остается как было */
@media screen and (min-width: 769px) {
    #table-price {
        display: table;
        width: 100%;
        border-collapse: collapse;
    }
    
    #table-price thead {
        display: table-header-group;
    }
    
    #table-price tbody {
        display: table-row-group;
    }
    
    #table-price tr {
        display: table-row;
        border-bottom: 1px solid #ddd;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }
    
    #table-price td {
        display: table-cell;
        padding: 10px;
        border: 1px solid #ddd;
        text-align: center;
        width: auto;
    }
    
    #table-price td:before {
        display: none;
    }
    
    #table-price td:first-child img {
        float: left;
        margin-right: 10px;
        max-width: 60px;
        max-height: 60px;
    }
}


/* СТИЛИ ДЛЯ АДМИНКИ */
.mg-admin-wrap {
    max-width: 800px;
    margin: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mg-form-row {
    margin-bottom: 20px;
}

.mg-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.mg-form-row select,
.mg-form-row input[type="text"] {
    width: 100%;
    max-width: 300px;
    padding: 0px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mg-admin-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mg-admin-btn:hover {
    background: #005a87;
}

.mg-success-msg {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #c3e6cb;
}

.mg-plugin-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007cba;
}

.mg-plugin-info h3 {
    margin-top: 0;
    color: #333;
}

.mg-plugin-info p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #666;
}


/* Мобильная адаптация для админки */
@media screen and (max-width: 768px) {
    .mg-admin-wrap {
        margin: 15px;
        padding: 25px 20px;
    }
    
    .mg-admin-wrap h1 {
        font-size: 1.8em;
    }
    
    .mg-form-row {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .mg-form-control {
        max-width: 100%;
        padding: 12px 15px;
    }
    
    .mg-button-row {
        padding: 20px;
        margin-top: 30px;
    }
    
    .mg-admin-btn {
        width: 100%;
        padding: 14px 20px !important;
        min-width: auto;
    }
    
    .mg-plugin-info {
        padding: 20px;
        margin-top: 30px;
    }
}
.mg-admin-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 16px 40px !important;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    justify-content: center;
    margin: 15px 0 !important;
    text-decoration: none !important;
}

.mg-admin-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
   
}

.mg-admin-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.3);
}

.mg-admin-btn:disabled {
    background: #a0aec0 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* Дополнительные улучшения для очень маленьких экранов */
@media screen and (max-width: 480px) {
    .mg-admin-wrap {
        margin: 10px;
        padding: 20px 15px;
    }
    
    .mg-admin-wrap h1 {
        font-size: 1.6em;
    }
    
    .mg-form-row {
        padding: 15px;
    }
    
    .mg-button-row {
        padding: 15px;
    }
}

/* Улучшения для планшетов */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .mg-admin-wrap {
        max-width: 85%;
    }
}

/* СТИЛИ ДЛЯ ВЫБОРА КАТЕГОРИЙ */
.price-category-filter {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.filter-header {
    margin-bottom: 15px;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
}

.category-select-wrapper {
    position: relative;
    max-width: 400px;
}

.category-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 12px;
    pointer-events: none;
}

#category-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
}

#category-select:hover {
    border-color: #007cba;
}

#category-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.category-info {
    margin-top: 12px;
    padding: 10px 12px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    font-size: 13px;
    color: #0066cc;
}

.category-info strong {
    font-weight: 600;
}

/* Мобильная адаптация */
@media screen and (max-width: 768px) {
    .price-category-filter {
        margin: 20px 0;
        padding: 15px;
    }
    
    .category-select-wrapper {
        max-width: 100%;
    }
    
    #category-select {
        padding: 14px 16px;
    }
}

@media screen and (max-width: 480px) {
    .price-category-filter {
        padding: 12px;
    }
    
    .filter-header h3 {
        font-size: 1em;
    }
}



/* СТИЛИ ДЛЯ ВЫБОРА КАТЕГОРИЙ */
.price-category-filter {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.filter-header {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
}

.category-select-wrapper {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.category-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 12px;
    pointer-events: none;
}

#category-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
}

#category-select:hover {
    border-color: #007cba;
}

#category-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.category-info {
    margin-top: 12px;
    padding: 10px 12px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    font-size: 13px;
    color: #0066cc;
}

.category-info strong {
    font-weight: 600;
}

/* Мобильная адаптация */
@media screen and (max-width: 768px) {
    .price-category-filter {
        margin: 20px 0;
        padding: 15px;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .category-select-wrapper {
        max-width: 100%;
    }
    
    #category-select {
        padding: 14px 16px;
    }
}

@media screen and (max-width: 480px) {
    .price-category-filter {
        padding: 12px;
    }
    
    .filter-header h3 {
        font-size: 1em;
    }
}