/* МКТУ Модуль - Основные стили */
* {
    box-sizing: border-box;
}
.mktu-highlight-gray-green {
    background-color: #d6d6d6;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #212529;
}
.mktu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.mktu-search-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.mktu-search-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}
.mktu-search-input-container {
    position: relative;
    flex: 1;
}
.mktu-search-input {
    width: 100%;
    padding: 15px 120px 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
}
.mktu-search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.25);
}
.mktu-search-buttons {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
}
.mktu-search-btn,
.mktu-reset-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 13px 19px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}
.mktu-reset-btn {
    background: #6c757d;
}
.mktu-search-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}
.mktu-reset-btn:hover {
    background: #545b62;
    transform: scale(1.05);
}
.mktu-search-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}
.mktu-selected-classes-info {
    background: rgba(0, 123, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #007bff;
}
.mktu-search-note {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}
.mktu-search-in-selected {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}
.mktu-search-in-selected:hover {
    background: #218838;
}
.mktu-search-results {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    display: none;
    scroll-margin-top: 100px; /* Отступ при прокрутке к блоку */
}
.mktu-search-results.mktu-active {
    display: block;
}

.mktu-results-count {
    font-weight: bold;
    color: #007bff;
}
.mktu-result-item {
    margin-bottom: 15px;
}
.mktu-class-numbers-section {
    margin-bottom: 20px;
}
.mktu-class-numbers-header {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #495057;
}
.mktu-class-numbers-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}
.mktu-numbers-tab {
    padding: 10px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}
.mktu-numbers-tab.mktu-active {
    background: #007bff;
    color: white;
}
.mktu-class-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.mktu-class-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    color: #495057;
    border: 3px solid transparent;
    position: relative;
    outline: 1px solid #ccc; /* новая граница */
    outline-offset: -1px; /* чтобы outline был внутри */
}
.mktu-class-number:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}
.mktu-class-number.mktu-selected {
    background: #28a745;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}
.mktu-class-number.mktu-found {
    background: #ffc107;
    color: #212529;
    transform: scale(1.2);
    animation: mktu-pulse 2s infinite;
}
@keyframes mktu-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}
@keyframes mktu-bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}
.mktu-bounce-animation {
    animation: mktu-bounce 0.5s ease-in-out;
}
.mktu-class-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    display: none;
}
.mktu-class-controls.mktu-visible {
    display: flex;
}
.mktu-toggle-scroll-btn,
.mktu-clear-selection-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
}
.mktu-toggle-scroll-btn.mktu-active {
    background: #5cb85c;
}
.mktu-toggle-scroll-btn:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 5px;
    opacity: 0.9;
    z-index: 1000;
}
.mktu-toggle-scroll-btn:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: 0;
}
.mktu-clear-selection-btn {
    background: #ffc107;
    color: #212529;
}
.mktu-toggle-scroll-btn:hover,
.mktu-clear-selection-btn:hover {
    transform: scale(1.05);
}
.mktu-section-tabs {
    display: flex;
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}
.mktu-tab-button {
    flex: 1;
    padding: 20px 30px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    transition: all 0.3s;
}
.mktu-tab-button.mktu-active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}
.mktu-tab-button:hover:not(.mktu-active) {
    background: #e9ecef;
}
.mktu-section-content {
    display: none;
}
.mktu-section-content.mktu-active {
    display: block;
}
.mktu-class-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}
.mktu-class-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
.mktu-class-card.mktu-highlighted {
    border-color: #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}
.mktu-class-header {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ddd;
}
.mktu-class-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}
.mktu-class-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}
.mktu-class-title {
    font-size: 20px;
    font-weight: bold;
    color: #495057;
}
.mktu-expand-icon {
    font-size: 20px;
    color: #007bff;
    transition: transform 0.3s;
}
.mktu-class-card.mktu-expanded .mktu-expand-icon {
    transform: rotate(180deg);
}
.mktu-class-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.35s ease; /* 350ms */
}
.mktu-class-card.mktu-expanded .mktu-class-content {
    max-height: none;
    padding: 30px;
}
.mktu-class-section {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}
.mktu-class-section.mktu-explanation {
    background: #f0f8ff;
    border-left-color: #007bff;
}
.mktu-class-section.mktu-includes {
    background: #f0fff0;
    border-left-color: #28a745;
}
.mktu-class-section.mktu-excludes {
    background: #fff5f5;
    border-left-color: #dc3545;
}
.mktu-class-section.mktu-items {
    background: #fff9f0;
    border-left-color: #ffc107;
}
.mktu-class-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
}
.mktu-class-section.mktu-explanation h4 {
    color: #007bff;
}
.mktu-class-section.mktu-includes h4 {
    color: #28a745;
}
.mktu-class-section.mktu-excludes h4 {
    color: #dc3545;
}
.mktu-class-section.mktu-items h4 {
    color: #e67e22;
}
.mktu-class-section p {
    line-height: 1.6;
    color: #495057;
    margin-bottom: 10px;
}
.mktu-items-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.mktu-column-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #495057;
}
.mktu-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.mktu-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.mktu-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}
.mktu-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.mktu-slider {
    background-color: #28a745;
}

input:checked+.mktu-slider:before {
    transform: translateX(26px);
}
.mktu-items-list {
    line-height: 1.2;
    color: #495057;
}
.mktu-items-list.mktu-column {
    white-space: pre-line;
}
.mktu-highlight-green {
    background-color: #90EE90;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: normal;
    color: #212529;
}
.mktu-highlight {
    background-color: #ffeb3b;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #212529;
    animation: mktu-highlightPulse 1s ease-in-out;
}
.mktu-highlight-gray {
    background-color: #d6d6d6;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #212529;
}
.mktu-highlight-red {
    background-color: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    animation: mktu-highlightPulse 1s ease-in-out;
}
@keyframes mktu-highlightPulse {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}
.mktu-no-results {
    text-align: center;
    padding: 60px 40px;
    color: #6c757d;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.mktu-no-results h3 {
    color: #495057;
    margin-bottom: 15px;
}
.mktu-class-search {
    margin-bottom: 20px;
}
.mktu-class-search-container {
    position: relative;
    display: flex;
    gap: 5px;
    align-items: center;
}
.mktu-class-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}
.mktu-class-search-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    white-space: nowrap;
}
.mktu-class-search-reset:hover {
    background: #545b62;
    transform: scale(1.05);
}
.mktu-guide-button-container {
    display: flex;
    justify-content: flex-end;
    /* Прижимаем кнопку к правому краю */
    margin-top: 10px;
    /* Отступ от блока "Выбрано классов" */
}
.mktu-guide-button {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}
.mktu-guide-button:hover {
    background: #138496;
}
.mktu-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 150px;
    padding-left: 20px;
    padding-right: 20px;
}
.mktu-guide-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    width: 100%;
}
@media (min-width: 768px) {
    .mktu-guide-content {
        max-width: 840px;
    }
    .mktu-guide-overlay {
        padding-left: 0;
        padding-right: 0;
    }
}
.mktu-class-link {
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}
.mktu-class-link:hover {
    color: #0056b3;
    background-color: rgba(0, 123, 255, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}
.mktu-guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 15px;
}
.mktu-guide-title {
    color: #495057;
    margin: 0;
}
.mktu-close-guide {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
}
.mktu-guide-text p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #495057;
}
.mktu-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.mktu-loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: mktu-spin 1s linear infinite;
}
@keyframes mktu-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.mktu-loader-text {
    margin-top: 20px;
    color: #495057;
    text-align: center;
    font-size: 16px;
}
@media (max-width: 768px) {
    .mktu-container {
        padding: 15px;
    }
    .mktu-search-section {
        padding: 20px;
    }
    .mktu-search-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .mktu-search-input {
        padding: 15px 20px;
        margin-bottom: 10px;
    }
    .mktu-search-buttons {
        position: static;
        transform: none;
        justify-content: center;
    }
    .mktu-class-numbers {
        gap: 6px;
    }
    .mktu-class-number {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
    .mktu-tab-button {
        padding: 15px 20px;
        font-size: 14px;
    }
    .mktu-class-header {
        padding: 20px;
    }
    .mktu-class-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 20px;
    }
    .mktu-class-title {
        font-size: 16px;
    }
    .mktu-class-card.mktu-expanded .mktu-class-content {
        padding: 15px;
    }
    .mktu-class-section {
        margin-bottom: 15px;
        padding: 15px;
        margin-left: -5px;
        margin-right: -5px;
    }
    .mktu-result-item {
        padding: 12px;
    }
    .mktu-result-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .mktu-guide-overlay {
        padding-top: 105px;
    }
}
/* Плавающая панель */
.mktu-floating-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.3s ease;
}
.mktu-floating-panel.mktu-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mktu-floating-panel.mktu-hidden-by-user {
    display: none !important;
}

.mktu-floating-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.mktu-floating-search {
    display: flex;
    gap: 5px;
    align-items: center;
}

.mktu-floating-search-input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

/* ИЗМЕНЕНО: синхронизированы размеры кнопок */
.mktu-floating-search-btn {
    padding: 8px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    height: 36px;
    box-sizing: border-box;
}

.mktu-floating-reset-btn {
    padding: 8px 15px; /* Было 8px 12px */
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    height: 36px; /* Добавлено */
    box-sizing: border-box; /* Добавлено */
}

.mktu-floating-reset-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.mktu-floating-numbers {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.mktu-floating-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start; /* Изменено с center на flex-start */
    gap: 8px;
}

.mktu-floating-group-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: bold;
    margin-right: 5px;
    margin-top: 3px; /* Добавлено для выравнивания с первой строкой */
    flex-shrink: 0;
    width: 50px;
}

.mktu-floating-group-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.mktu-floating-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    color: #495057;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mktu-floating-number:hover {
    background: #007bff;
    color: white;
    transform: scale(1.15);
}

.mktu-floating-number.mktu-selected {
    background: #28a745;
    color: white;
}

.mktu-floating-number.mktu-found {
    background: #ffc107;
    color: #212529;
}

.mktu-floating-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mktu-hide-panel-btn,
.mktu-collapse-all-btn {
    padding: 8px 15px;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.mktu-hide-panel-btn {
    background: #dc3545;
}

.mktu-hide-panel-btn:hover {
    background: #c82333;
}

.mktu-collapse-all-btn {
    background: #6c757d;
}

.mktu-collapse-all-btn:hover {
    background: #545b62;
}

.mktu-standalone-collapse-btn {
    position: fixed;
    top: 80px;
    right: calc(50% - 700px);
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 160px;
    text-align: center;
}

.mktu-standalone-collapse-btn.mktu-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mktu-standalone-collapse-btn:hover {
    background: #545b62;
    transform: translateY(0) scale(1.05);
}

@media (min-width: 1600px) {
    .mktu-standalone-collapse-btn {
        right: calc(50% - 720px);
    }
}

@media (max-width: 1599px) {
    .mktu-standalone-collapse-btn {
        right: 20px;
        left: auto;
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
    .mktu-floating-content {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }

    .mktu-floating-search {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        order: 1;
    }

    .mktu-floating-numbers {
        flex: 0 0 auto;
        width: 100%;
        order: 2;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .mktu-floating-group {
        width: 100%;
        justify-content: center;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .mktu-floating-group-label {
        width: auto;
        margin-right: 0;
        text-align: left;
        font-size: 14px;
        font-weight: bold;
        order: 1;
    }

    .mktu-floating-group-numbers {
        justify-content: center;
        max-width: 600px;
        order: 2;
    }

    .mktu-floating-actions {
        flex: 0 0 auto;
        order: 3;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        margin-top: 10px;
        width: 100%;
    }

    .mktu-hide-panel-btn,
    .mktu-collapse-all-btn {
        flex: 0 0 auto;
        padding: 10px 20px;
    }
}

/* Стили для секции скачивания выбранных классов */
.mktu-download-selected-section {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
    display: none; /* По умолчанию скрыта */
}

.mktu-download-selected-btn,
.mktu-copy-selected-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.mktu-copy-selected-btn {
    background: #17a2b8;
}

.mktu-download-selected-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.mktu-copy-selected-btn:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

/* Стили для кнопок копирования в карточках */
.mktu-copy-list-btn,
.mktu-copy-list-header-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.mktu-copy-list-header-btn {
    margin-left: 15px;
    background: #17a2b8;
    font-size: 13px;
    padding: 6px 12px;
}

.mktu-copy-list-btn:hover,
.mktu-copy-list-header-btn:hover {
    background: #545b62;
    transform: scale(1.05);
}

.mktu-copy-list-header-btn:hover {
    background: #138496;
}

/* Улучшенные стили для мобильной версии панели */
@media (max-width: 768px) {
    .mktu-floating-panel {
        padding: 4px 8px;
        min-height: auto;
    }
    
    .mktu-floating-content {
        flex-direction: column;
        gap: 4px;
        align-items: center;
        justify-content: flex-start;
    }
    
    .mktu-floating-search {
        display: flex !important;
        gap: 4px;
        align-items: center;
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        justify-content: center;
    }
    
    .mktu-floating-search-input {
        display: none !important;
    }
    
    .mktu-floating-search-btn {
        padding: 4px;
        font-size: 16px;
        height: 28px;
        width: 28px;
        min-width: 28px;
        border-radius: 50%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #007bff;
        color: white;
        border: none;
        cursor: pointer;
        text-indent: -9999px;
        overflow: hidden;
    }
    
    .mktu-floating-search-btn::before {
        content: '🔍';
        text-indent: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mktu-floating-reset-btn {
        padding: 4px;
        font-size: 16px;
        height: 28px;
        width: 28px;
        min-width: 28px;
        border-radius: 50%;
        background: #dc3545;
        color: white;
        border: none;
        cursor: pointer;
        text-indent: -9999px;
        overflow: hidden;
    }
    
    .mktu-floating-reset-btn::before {
        content: '↻';
        text-indent: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mktu-floating-numbers {
        order: 1;
        flex: 1 1 auto;
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .mktu-floating-group {
        flex-direction: row;
        align-items: center;
        gap: 2px;
        margin: 0;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .mktu-floating-header {
        display: none !important;
    }
    
    .mktu-floating-group-label {
        display: none !important;
    }
    
    .mktu-floating-group-numbers {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        justify-content: center;
    }
    
    .mktu-floating-number {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
    
    .mktu-floating-actions {
        display: none !important;
    }
    
    .mktu-hide-panel-btn,
    .mktu-collapse-all-btn {
        display: none !important;
    }
    
    #mktuFloatingNumbers {
        max-width: 100%;
    }
    
    .mktu-search-row {
        display: none !important;
    }
    
    .mktu-search-mode-container {
        display: none !important;
    }
    
    /* Стили для кнопок скачивания на мобильных */
    .mktu-download-selected-section {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .mktu-download-selected-btn,
    .mktu-copy-selected-btn {
        width: 100%;
        max-width: 280px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Кнопки копирования в карточках на мобильных */
    .mktu-copy-list-header-btn {
        margin-left: 10px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .mktu-copy-list-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .mktu-floating-group {
        display: flex;
        align-items: flex-start; /* Изменено с center на flex-start */
        flex-direction: row;
        gap: 8px;
    }
    
    .mktu-floating-group-label {
        width: auto;
        margin-right: 8px;
        margin-bottom: 0;
        margin-top: 3px; /* Добавлено для выравнивания с первой строкой */
        text-align: left;
        font-size: 14px;
        order: 1;
    }
    
    .mktu-floating-group-numbers {
        order: 2;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-start;
    }
    
    .mktu-floating-panel {
        padding: 10px 15px;
    }
    
    .mktu-floating-search {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .mktu-floating-panel {
        padding: 8px;
    }

    .mktu-floating-content {
        gap: 8px;
    }

    .mktu-floating-search-input {
        font-size: 12px;
        padding: 5px 10px;
    }

    .mktu-floating-search-btn,
    .mktu-floating-reset-btn {
        font-size: 12px;
        padding: 5px 10px;
        height: 30px;
    }

    .mktu-hide-panel-btn,
    .mktu-collapse-all-btn {
        font-size: 12px;
        padding: 6px 12px;
        min-width: 180px;
    }

    .mktu-floating-number {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    
    /* Дополнительные стили для мобильных */
    .mktu-download-selected-section {
        padding: 0 10px;
    }
    
    .mktu-download-selected-btn,
    .mktu-copy-selected-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}
.mktu-floating-header {
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    margin: 0px 0 0px;
    text-align: center;
    width: 100%;
}
/*Для ускорения ввода*/
.mktu-class-card {
    will-change: contents;
}
/*Кнопка свернуть внутри карточки*/
.mktu-card-footer {
    text-align: right; /* Выравнивание по правому краю */
    padding: 15px 15px 5px 0; /* Отступы: сверху 15px, справа 15px, снизу 5px, слева 0 */
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.mktu-collapse-card-btn {
    position: static;
    transform: none;
    margin: 0; /* Убираем автоматические отступы */
    display: inline-block;
    background: #6c757d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.mktu-collapse-card-btn:hover {
    background: #545b62;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mktu-card-footer {
        padding: 10px 10px 5px 0; /* Уменьшаем отступы на мобильных */
    }
    
    .mktu-collapse-card-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}
/* Для случаев, когда вкладка должна оставаться активной без выбора */
.mktu-tab-button.mktu-active {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white !important;
}
/* Стили для блока результатов поиска в карточке */
.mktu-search-results-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 6px;
    min-height: 36px;
    align-items: center;
}

.mktu-search-result-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: white;
    border-radius: 16px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 28px;
}

.mktu-search-result-count {
    font-weight: bold;
    color: #007bff;
}

.mktu-search-result-label {
    color: #495057;
}

.mktu-search-result-query {
    color: #6c757d;
    font-style: italic;
}

.mktu-search-result-jump-btn {
    border: none;
    padding: 2px 6px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    height: 22px;
    min-width: 50px;
}

.mktu-search-result-jump-btn.main-search {
    background: #ffc107;
    color: #212529;
}

.mktu-search-result-jump-btn.main-search:hover {
    background: #e0a800;
}

.mktu-search-result-jump-btn.local-search {
    background: #6c757d;
    color: white;
}

.mktu-search-result-jump-btn.local-search:hover {
    background: #5a6268;
}

@media (max-width: 768px) {
    .mktu-search-results-info {
        gap: 6px;
        padding: 5px;
    }
    
    .mktu-search-result-item {
        font-size: 11px;
        height: 26px;
    }
}
/* Стили для предпросмотра результатов поиска */
.mktu-class-preview {
    padding: 10px 15px;
    margin-top: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.mktu-class-preview.mktu-visible {
    display: block;
}

.mktu-preview-title {
    font-size: 13px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 8px;
}

.mktu-preview-item {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #495057;
}

.mktu-preview-more {
    color: #0066cc;
    cursor: pointer;
    margin: 10px 0;
    font-size: 14px;
    text-decoration: underline;
}

.mktu-preview-more:hover {
    color: #0056b3;
}
.mktu-exclude-item {
    color: #888;
    font-style: italic;
}
.mktu-preview-group-header {
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    color: #555;
}
.mktu-expand-all {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.mktu-highlight-preview {
    background-color: #d6d6d6;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #212529;
}

/* Стили для контейнера заголовка результатов */
.mktu-results-header-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
    position: unset;
    top: 100px;
    background: white;
    z-index: 10;
    padding-top: 15px;
}

.mktu-results-count-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mktu-results-count-text {
    font-weight: bold;
    color: #007bff;
}

.mktu-hidden-count {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Переключатель скрытия исключений */
.mktu-exclude-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    flex-wrap: wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mktu-exclude-toggle-label {
    font-size: 14px;
    color: #495057;
    white-space: nowrap;
}

.mktu-exclude-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.mktu-exclude-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mktu-exclude-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.mktu-exclude-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .mktu-exclude-toggle-slider {
    background-color: #dc3545;
}

input:checked + .mktu-exclude-toggle-slider:before {
    transform: translateX(20px);
}
.mktu-exclude-count {
    color: #dc3545; /* Цвет по умолчанию, если не сработает динамический */
    font-weight: bold;
}

@media (max-width: 768px) {
    .mktu-results-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mktu-exclude-toggle {
        margin-left: 0;
        width: 100%;
    }
}
/* Стили для кнопки "В начало класса" */
.mktu-scroll-to-top-btn {
    position: static;
    transform: none;
    margin: 0 5px 0 0;
    display: inline-block;
    background: #17a2b8;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.mktu-scroll-to-top-btn:hover {
    background: #138496;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mktu-card-footer {
        display: flex;
        flex-direction: column;
        gap: 5px;
        align-items: flex-end;
    }
    
    .mktu-scroll-to-top-btn,
    .mktu-collapse-card-btn {
        margin: 0;
        width: 120px;
        text-align: center;
    }
}
/* Анимация подсветки свернутой карточки */
@keyframes mktu-collapse-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0.5);
        transform: scale(1.05); /* Увеличиваем размер карточки для эффекта пульсации */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
        transform: scale(1); /* Возвращаем размер карточки к исходному */
    }
}

.mktu-collapse-highlight {
    animation: mktu-collapse-highlight 2.5s ease-out; /* Длительность анимации */
    border-color: #007bff !important; /* Убедимся, что анимация работает с border */
}

.mktu-class-card {
    transition: all 0.3s ease, border-color 0.3s ease;
}
/*Ссылки в превью*/
.mktu-preview-item .mktu-class-link {
    color: #007bff !important;
    text-decoration: underline;
    cursor: pointer;
}

.mktu-preview-item .mktu-class-link:hover {
    text-decoration: none;
    background-color: rgba(0, 123, 255, 0.1) !important;
}
/*Активный кружок в плавающей панели
.mktu-floating-number.mktu-active {
    background: #28a745 !important;
    color: white !important;
    transform: scale(1.15);
    box-shadow: 0 0 0 2px white, 0 0 0 4px #28a745;
}
/* Обновленные стили для активного кружка */
.mktu-floating-number.mktu-active {
    background: #28a745 !important;
    color: white !important;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px white, 0 0 0 4px #28a745;
    animation: mktu-active-pulse 1.5s infinite;
    position: relative;
    z-index: 1;
}
@keyframes mktu-active-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Подсветка синонимов */
.mktu-highlight-synonym {
    background-color: #2196f382 !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #212529;
    animation: mktu-highlightPulse 1s ease-in-out;
}

.mktu-preview-item .mktu-highlight-synonym {
    background-color: #2196f382 !important;
    text-decoration: underline;
    cursor: pointer;
}

.mktu-preview-item .mktu-highlight-synonym:hover {
    text-decoration: none;
    background-color: #2196f382 !important;
}
.mktu-fuzzy-search-badge {
    background-color: #ffc107;
    color: #212529;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    margin-left: 8px;
    font-weight: bold;
}
/* Счетчик неточных совпадений */
.mktu-search-result-jump-btn.fuzzy-search {
    background: #17a2b8;
    color: white;
}

.mktu-search-result-jump-btn.fuzzy-search:hover {
    background: #138496;
}
/* Стили для переключателя режима поиска */
.mktu-search-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
}

.mktu-search-mode-label {
    font-size: 14px;
    color: #495057;
    white-space: nowrap;
}

.mktu-search-mode-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.mktu-search-mode-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mktu-search-mode-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.mktu-search-mode-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .mktu-search-mode-slider {
    background-color: #2196F3;
}

input:checked + .mktu-search-mode-slider:before {
    transform: translateX(26px);
}

.mktu-search-mode-note {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
    margin-left: 15px; /* Выравниваем под переключателем */
    display: none;
}

/* Переключатель в плавающей панели - ОБНОВЛЕННЫЕ СТИЛИ */
.mktu-floating-search-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.mktu-floating-search-mode-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    overflow: hidden; /* Добавлено: скрывает выступающие элементы */
}

.mktu-floating-search-mode-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    left: -9999px; /* Добавлено: полностью убираем чекбокс из видимой области */
}

.mktu-floating-search-mode-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
    border: none; /* Добавлено: убираем границу */
    outline: none; /* Добавлено: убираем outline */
}

.mktu-floating-search-mode-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Добавлено: легкая тень для кнопки */
}

.mktu-floating-search-mode-toggle input:checked + .mktu-floating-search-mode-slider {
    background-color: #2196F3;
}

.mktu-floating-search-mode-toggle input:checked + .mktu-floating-search-mode-slider:before {
    transform: translateX(26px);
}

.mktu-floating-search-mode-label {
    font-size: 14px;
    color: #495057;
    white-space: nowrap;
}

/* Медиа-запросы оставляем без изменений */
@media (max-width: 768px) {
    .mktu-search-mode-container {
        margin-left: 0;
        width: 100%;
    }
    
    .mktu-search-mode-note {
        margin-left: 0;
        width: 100%;
    }
    
    .mktu-floating-search-mode {
        margin-top: 5px;
    }
}
/* Новый ряд для поиска и кнопок */
.mktu-search-row {
    display: flex;
    gap: 5px;
    align-items: center;
    width: 100%;
}

/* Контейнер для переключателя "Неточный" */
.mktu-search-mode-container {
    margin-top: 8px; /* Отступ от строки поиска */
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-start; /* Выравнивание по левому краю */
}

/* На десктопе переключатель будет под поиском */
@media (min-width: 769px) {
    .mktu-floating-search {
        flex-direction: column; /* Элементы в столбик */
        gap: 5px;
    }
}

/* На мобильных оставляем как было */
@media (max-width: 768px) {
    .mktu-floating-search {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .mktu-search-mode-container {
        margin-top: 0;
        margin-left: 10px;
    }
}
/* Настройки для iPad (768px–1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .mktu-floating-search {
        flex-direction: row;  /* Рядом на горизонтальном iPad */
        flex-wrap: wrap;      /* Перенос на 2 строки при нехватке места */
    }
    
    .mktu-search-row {
        flex: 1 1 100%;      /* Поиск + кнопки на всю ширину */
        margin-bottom: 5px;  /* Отступ до переключателя */
    }
    
    .mktu-search-mode-container {
        margin-top: 0;
        margin-left: 0;      /* Убираем отступ слева */
        justify-content: flex-start; /* Выравниваем по левому краю */
    }
}

/* Для вертикального iPad (меньше места) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .mktu-floating-search {
        flex-direction: column;  /* Столбиком */
    }
    
    .mktu-search-mode-container {
        margin-top: 8px;         /* Отступ от строки поиска */
    }
}
/* Стили для типа класса в Поисковых карточках */
.mktu-class-type {
    color: #6c757d !important;
    font-size: 0.85em;
    margin-left: 8px;
    font-weight: normal;
    opacity: 0.8;
}

/* Для карточек в результатах поиска */
#mktuSearchResults .mktu-class-type {
    display: inline-block;
    background-color: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .mktu-class-type {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
    
    #mktuSearchResults .mktu-class-type {
        display: inline-block;
        margin-top: 0;
    }
}
/* Стили для кнопок экспорта */
.mktu-export-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 10px;
}

.mktu-export-btn:hover {
    background-color: #5a6268;
}

/* Для заголовка результатов */
.mktu-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Для карточки класса */
.mktu-search-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Стили для кнопок выбора и скачивания - добавлены новые */
.mktu-class-numbers-header {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #495057;
}

.mktu-class-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    display: none;
}

.mktu-class-controls.mktu-visible {
    display: flex;
}

/* Стили для уведомления о копировании */
.mktu-copied-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 10001;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Удаляем ненужные старые стили для кнопок прокрутки */
.mktu-toggle-scroll-btn,
.mktu-clear-selection-btn {
    display: none !important;
}

/* Добавляем адаптивность для новых кнопок */
@media (max-width: 768px) {
    .mktu-class-title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    .mktu-download-selected-section {
        padding: 0 10px;
    }
    
    .mktu-download-selected-btn,
    .mktu-copy-selected-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .mktu-copy-list-header-btn {
        margin-left: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .mktu-copy-list-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .mktu-class-numbers {
        gap: 5px;
    }
    
    .mktu-class-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .mktu-download-selected-btn,
    .mktu-copy-selected-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .mktu-copy-list-header-btn {
        display: none; /* На очень маленьких скрываем кнопку в заголовке */
    }
    
    .mktu-copy-list-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}
/* Стили для кнопок в заголовке карточки */
.mktu-header-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Контейнер для кнопок копирования в поисковых карточках */
.mktu-search-card-copy-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mktu-copy-matches-btn,
.mktu-copy-all-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    white-space: nowrap;
}

.mktu-copy-all-btn {
    background: #6c757d;
}

.mktu-copy-matches-btn:hover {
    background: #138496;
    transform: scale(1.05);
}

.mktu-copy-all-btn:hover {
    background: #545b62;
    transform: scale(1.05);
}

/* Иконка копирования в заголовке карточки */
.mktu-icon-copy {
    padding: 4px 6px !important;
    font-size: 16px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 50% !important;
    background: #17a2b8 !important;
}

.mktu-icon-copy:hover {
    background: #138496 !important;
    transform: scale(1.15) !important;
}

@media (max-width: 768px) {
    .mktu-header-buttons {
        flex-direction: row;
        gap: 5px;
        margin-left: 0;
        margin-top: 0;
        width: auto;
        justify-content: flex-start;
    }
    
    .mktu-copy-matches-btn,
    .mktu-copy-all-btn {
        width: auto;
        text-align: center;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .mktu-search-card-copy-buttons {
        flex-direction: row;
        gap: 6px;
        margin-top: 8px;
    }
}
/* Стили для растягивания модуля по всей ширине */
.mktu-full-width-module {
    position: relative;
    width: 100%;
    background: transparent;
    overflow: visible !important;
}

/* Фон на всю ширину ТОЛЬКО для компьютеров (ширина от 768px) */
@media (min-width: 768px) {
    .mktu-full-width-module {
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        background: linear-gradient(135deg, rgb(255 255 255 / 52%) 0%, rgb(241 238 238 / 46%) 100%);
        padding: 20px 0;
        transition: background 0.8s ease;
        overflow: visible !important;
    }
    
    .mktu-full-width-module:hover {
        background: linear-gradient(180deg, rgb(255 255 255 / 75%) 0%, rgb(245 245 245 / 70%) 50%, rgb(235 235 235 / 65%) 100%);
    }
}

/* Сброс для мобильных */
@media (max-width: 767px) {
    .mktu-full-width-module {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
        background: transparent !important;
        padding: 0 !important;
        overflow: visible !important;
    }
}

/* УБИРАЕМ OVERFLOW ВО ВСЕХ РОДИТЕЛЬСКИХ КОНТЕЙНЕРАХ */
.mktu-full-width-module .mktu-container {
    overflow: visible !important;
}

/* Убедимся, что плавающая панель находится поверх растянутого модуля */
.mktu-full-width-module .mktu-floating-panel {
    position: fixed !important;
    z-index: 9999 !important;
}

.mktu-full-width-module .mktu-standalone-collapse-btn {
    position: fixed !important;
    z-index: 99999 !important;
}
/* ДОБАВЬТЕ ЭТИ СТИЛИ В КОНЕЦ ФАЙЛА mktu10.css */

/* Стили для информационной подсказки */
.mktu-selection-hint {
    text-align: center;
    margin: 15px 0 10px;
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
    transition: all 0.3s ease;
}

/* Контейнер для элементов управления выбором */
.mktu-selection-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

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

/* Кнопка сброса выбора */
.mktu-clear-selection {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.mktu-clear-selection:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* Основная кнопка скачивания */
.mktu-download-selected-main {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.mktu-download-selected-main:hover {
    background: linear-gradient(135deg, #218838, #1ca588);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Модальное окно выбора формата скачивания */
.mktu-download-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.mktu-download-modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mktu-download-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.mktu-download-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.mktu-download-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.mktu-download-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mktu-download-options {
    padding: 20px;
}

.mktu-download-option {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
}

.mktu-download-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.mktu-download-option:last-child {
    margin-bottom: 0;
}

.mktu-download-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.mktu-download-text {
    flex: 1;
}

.mktu-download-text strong {
    display: block;
    margin-bottom: 5px;
    color: #495057;
}

.mktu-download-text small {
    color: #6c757d;
    font-size: 12px;
}

.mktu-download-info {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.mktu-download-info p {
    margin: 5px 0;
    color: #495057;
}

.mktu-download-info small {
    color: #6c757d;
    font-size: 12px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .mktu-selection-controls {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .mktu-selection-hint {
        font-size: 13px;
        margin: 10px 0 8px;
    }
    
    .mktu-clear-selection,
    .mktu-download-selected-main {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .mktu-download-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .mktu-download-option {
        padding: 12px;
    }
    
    .mktu-download-icon {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .mktu-selection-controls {
        padding: 10px;
    }
    
    .mktu-selected-classes-info {
        font-size: 13px;
    }
    
    .mktu-clear-selection {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .mktu-download-selected-main {
        padding: 8px 16px;
        font-size: 14px;
    }
}
/* Styles for Selection Controls */
.mktu-selection-container {
    margin-top: 20px;
    text-align: center;
}

.mktu-selection-hint {
    color: #6c757d;
    font-style: italic;
    font-size: 16px;
    padding: 10px;
}

.mktu-selection-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.mktu-selection-info {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

.mktu-selection-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mktu-reset-selection-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.mktu-reset-selection-btn:hover {
    background: #c82333;
}

.mktu-dropdown-container {
    position: relative;
    display: inline-block;
}

.mktu-main-action-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.mktu-main-action-btn:hover {
    background: #218838;
}

.mktu-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 100;
    border-radius: 5px;
    margin-top: 5px;
    border: 1px solid #ddd;
}

.mktu-dropdown-menu.show {
    display: block;
}

.mktu-dropdown-item {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.mktu-dropdown-item:hover {
    background-color: #f1f1f1;
    color: #007bff;
}

@media (max-width: 768px) {
    .mktu-selection-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .mktu-selection-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .mktu-reset-selection-btn, .mktu-main-action-btn {
        width: 100%;
    }
    
    .mktu-dropdown-container {
        width: 100%;
    }
    
    .mktu-dropdown-menu {
        width: 100%;
    }
}

/* Styles for Selection Controls */
.mktu-selection-instruction {
    text-align: center;
    margin-top: 15px;
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.mktu-download-selected-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.mktu-selection-info-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#mktuSelectedClassesCount {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

.mktu-btn-reset, .mktu-btn-download {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.mktu-btn-reset {
    background-color: #dc3545;
    color: white;
}

.mktu-btn-reset:hover {
    background-color: #c82333;
}

.mktu-btn-download {
    background-color: #28a745;
    color: white;
}

.mktu-btn-download:hover {
    background-color: #218838;
}

/* Modal Styles */
.mktu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.mktu-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.mktu-close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.mktu-close-modal:hover {
    color: #000;
}

.mktu-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.mktu-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mktu-modal-buttons button {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.mktu-modal-buttons button:hover {
    background-color: #e2e6ea;
    border-color: #cbd3da;
}
/* ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ВЫБРАННЫХ КРУЖОЧКОВ С ЖЕЛТОЙ ПОДСВЕТКОЙ 
   ТОЛЬКО ДЛЯ РАЗДЕЛА "ВЫБРАТЬ И СКАЧАТЬ ПЕРЕЧЕНЬ" */

/* Базовые стили для кружочков с найденными совпадениями - ТОЛЬКО в основном разделе */
.mktu-class-numbers .mktu-class-number.mktu-found {
    background: #ffc107;
    color: #212529;
    transform: scale(1.2);
    animation: mktu-pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
}

/* КОГДА КРУЖОЧЕК ВЫБРАН И ОН ЖЕЛТЫЙ (имеет оба класса mktu-found и mktu-selected) 
   ТОЛЬКО в основном разделе - УВЕЛИЧЕННАЯ СПЕЦИФИЧНОСТЬ */
#mktuClassNumbers .mktu-class-number.mktu-found.mktu-selected,
.mktu-class-numbers-section .mktu-class-numbers .mktu-class-number.mktu-found.mktu-selected {
    background: #64a728e0 !important; /* Зеленый фон при выборе */
    color: white !important;
    transform: scale(1.15) !important;
    /* СОХРАНЯЕМ ЖЕЛТУЮ ПУЛЬСАЦИЮ поверх зеленого фона */
    animation: mktu-pulse-green 2s infinite !important;
}

/* Новая анимация пульсации для зеленых кружочков с желтым свечением */
@keyframes mktu-pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Обычные выбранные кружочки (без желтой подсветки) - оставляем как было */
.mktu-class-numbers .mktu-class-number.mktu-selected {
    background: #28a745;
    color: white;
    transform: scale(1.15);
}