/* Icon Catalog Addon Styles */

.yan-tools-icon-catalog {
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.yan-tools-modal-header h3 {
    color: #ffffff;
}
.yan-tools-icon-catalog .yan-tools-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.yan-tools-icon-catalog .yan-tools-header h2 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 600;
}

.yan-tools-icon-catalog .yan-tools-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Настройки фильтров */
.yan-tools-icon-settings {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

/* Блок 1: Поиск */
.yan-tools-search-block {
    margin-bottom: 0px;
    padding-bottom: 7px;
    border-bottom: 1px solid #e9ecef;
}

.yan-tools-search-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

/* Строка с быстрыми тегами и выбором формата */
.yan-tools-quick-tags-format-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-left: 60px; /* Отступ для выравнивания с поисковой строкой (48px кнопка + 12px gap) */
    padding-right: 48px; /* Отступ для выравнивания с семейством (36px кнопка + 12px gap) */
}

/* Быстрые теги - менее заметные и компактные */
.yan-tools-quick-tags {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    flex-wrap: wrap;
    opacity: 0.8;
}

.yan-tools-quick-tag {
    display: inline-block;
    padding: 2px 4px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 11px;
    color: #000000;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    font-weight: 400;
}

.yan-tools-quick-tag:hover {
    background: rgba(0, 154, 140, 0.08);
    border-color: rgba(0, 154, 140, 0.2);
    color: #009A8C;
    opacity: 1;
}

.yan-tools-quick-tag:active {
    transform: scale(0.98);
}

.yan-tools-quick-tag.active {
    background: rgba(0, 154, 140, 0.12);
    border-color: rgba(0, 154, 140, 0.3);
    color: #009A8C;
    opacity: 1;
    font-weight: 500;
}

.yan-tools-search-wrapper-inline {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    overflow: visible;
}

.yan-tools-search-wrapper-inline:focus-within {
    border-color: #009A8C;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 154, 140, 0.1);
}

.yan-tools-search-input-inline {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 0;
    font-size: 15px;
    background: transparent;
    outline: none;
    min-width: 200px;
}

.yan-tools-search-input-inline::placeholder {
    color: #adb5bd;
}

.yan-tools-search-filters-inline {
    display: flex;
    align-items: center;
    gap: 0;
    border-left: 1px solid #e9ecef;
    padding-left: 8px;
    background: transparent;
}

.yan-tools-search-header-tags-wrapper {
    display: none;
}

.yan-tools-tags-container {
    display: none;
}

.yan-tools-quick-tags-desktop {
    display: flex;
}

.yan-tools-search-filter-inline {
    padding: 8px 10px;
    border: none;
    border-radius: 0;
    font-size: 12px;
    background: transparent;
    color: #495057;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    min-width: 120px;
    max-width: 150px;
}

.yan-tools-search-filter-inline:focus {
    background-color: rgba(102, 126, 234, 0.05);
}

.yan-tools-search-filter-inline:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Контейнер для селекта семейств с кнопками навигации */
.yan-tools-family-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.yan-tools-family-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.yan-tools-family-nav-btn:hover:not(:disabled) {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.yan-tools-family-nav-btn:active:not(:disabled) {
    background-color: rgba(102, 126, 234, 0.2);
    transform: scale(0.95);
}

.yan-tools-family-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.yan-tools-family-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.yan-tools-family-select-wrapper .yan-tools-search-filter-inline {
    flex: 1;
    min-width: 0;
}

.yan-tools-btn-add-icon {
    padding: 0;
    background: transparent;
    color: transparent;
    border: none;
    border-radius: 0;
    font-size: 0;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 50px;
    height: 50px;
}

.yan-tools-btn-add-icon svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.yan-tools-btn-add-icon span {
    display: none;
}

.yan-tools-btn-add-icon:hover {
    transform: translateY(-2px);
}

/* Кнопка избранного */
.yan-tools-btn-favorites {
    padding: 0;
    background: transparent;
    color: #dc3545;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.yan-tools-btn-favorites:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #c82333;
}

.yan-tools-btn-favorites svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.yan-tools-btn-favorites:hover {
    transform: translateY(-2px);
}

.yan-tools-btn-favorites.active {
    background: #e91e63;
    color: #ffffff;
}

.yan-tools-btn-favorites.active:hover {
    background: #c2185b;
}

/* Кнопка переключения режима просмотра */
.yan-tools-btn-view-mode {
    padding: 0;
    background: #009A8C;
    color: white;
    border: 1px solid #009A8C;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.yan-tools-btn-view-mode:hover {
    background: #007a6f;
    border-color: #007a6f;
    color: white;
}

.yan-tools-btn-view-mode.active {
    background: #009A8C;
    border-color: #009A8C;
    color: white;
}

.yan-tools-btn-view-mode svg {
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

/* Блок 2: Настройки (компактный) */
.yan-tools-settings-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
}

.yan-tools-settings-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.yan-tools-size-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.yan-tools-settings-right {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

/* Кнопки формата */
.yan-tools-format-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yan-tools-format-label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
    margin-bottom: 4px;
}

/* Обертка для формата и размеров */
.yan-tools-format-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yan-tools-format-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

/* Размеры - показываются при hover на выбор формата */
.yan-tools-size-buttons-hover {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding: 8px;
    padding-top: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 200px;
}

/* Псевдоэлемент для создания зазора, чтобы меню не исчезало при переходе мыши */
.yan-tools-size-buttons-hover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
}

.yan-tools-format-wrapper:hover .yan-tools-size-buttons-hover,
.yan-tools-size-buttons-hover:hover {
    display: flex;
}

.yan-tools-format-btn {
    padding: 5px 10px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    background: transparent;
    color: #6c757d;
    white-space: nowrap;
    line-height: 1.2;
}

.yan-tools-format-btn:hover {
    background: rgba(0, 154, 140, 0.08);
    border-color: #009A8C;
    color: #009A8C;
}

.yan-tools-format-btn.active {
    background: #009A8C;
    border-color: #009A8C;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 154, 140, 0.2);
}

.yan-tools-format-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.yan-tools-format-btn:hover svg {
    opacity: 0.9;
}

.yan-tools-format-btn.active svg {
    opacity: 1;
}

/* Чекбокс CMYK BLACK */
.yan-tools-cmyk-black-item {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.yan-tools-cmyk-black-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

/* Стили для чекбокса CMYK в выпадающем меню размеров */
.yan-tools-size-buttons-hover .yan-tools-cmyk-black-item {
    margin-top: 8px;
    padding: 8px 0;
    padding-top: 8px;
    background: transparent;
    border: none;
    border-top: 1px solid #e9ecef;
    border-radius: 0;
    width: 100%;
}

.yan-tools-size-buttons-hover .yan-tools-cmyk-black-item label {
    font-size: 11px;
    font-weight: 500;
    gap: 6px;
}

/* Группы кнопок рамки */
.yan-tools-border-controls-row {
    margin-top: 6px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.yan-tools-border-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yan-tools-border-section-label {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    margin: 0;
    padding: 0;
    height: 20px;
    line-height: 20px;
    display: block;
}

.yan-tools-border-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.yan-tools-border-position-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.yan-tools-border-width-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid #e9ecef;
}

.yan-tools-border-width-control label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Общий стиль для всех ползунков */
input[type="range"] {
    accent-color: #009A8C;
}

.yan-tools-border-width-control input[type="range"] {
    width: 80px;
    margin: 0;
    vertical-align: middle;
}

/* Блок анимаций с двумя столбиками */
.yan-tools-animations-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.yan-tools-animation-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.yan-tools-animation-item label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
}

/* Компактные настройки */
.yan-tools-setting-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
    flex: 1;
}

.yan-tools-setting-compact label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
}

.yan-tools-select-compact {
    padding: 8px 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: white;
    min-width: 100px;
}

.yan-tools-select-compact:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Группа цветов */
.yan-tools-colors-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.yan-tools-color-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.yan-tools-color-item label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
}

.yan-tools-label-with-clear {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.yan-tools-btn-clear-small {
    padding: 0;
    width: 14px;
    height: 14px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 9px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.yan-tools-btn-clear-small:hover {
    background: #c82333;
    transform: scale(1.1);
}

.yan-tools-color-input-compact {
    width: 100px;
    height: 35px;
    border: 0px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px;
    position: relative;
}

.yan-tools-color-input-compact:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Сетка прозрачности для пустого фона */
.yan-tools-color-transparent {
    background-image: 
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.yan-tools-color-transparent::-webkit-color-swatch-wrapper {
    padding: 0;
}

.yan-tools-color-transparent::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* Кнопка дополнительных настроек */
.yan-tools-btn-advanced {
    padding: 0;
    background: transparent;
    color: #6c757d;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: normal;
    transition: all 0.2s ease;
    width: 48px;
    height: 48px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yan-tools-btn-advanced:hover {
    background: rgba(0, 154, 140, 0.08);
    border-color: #009A8C;
    color: #009A8C;
}

.yan-tools-btn-advanced.active {
    background: #009A8C;
    border-color: #009A8C;
    color: white;
}


/* Дополнительные настройки */
.yan-tools-advanced-settings {
    margin-top: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.yan-tools-advanced-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.yan-tools-advanced-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.yan-tools-advanced-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yan-tools-advanced-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (max-width: 900px) {
    .yan-tools-advanced-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .yan-tools-advanced-row {
        grid-template-columns: 1fr;
    }
}

.yan-tools-advanced-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
}

.yan-tools-advanced-column:empty {
    display: none;
}

.yan-tools-advanced-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.yan-tools-advanced-item {
    display: flex;
    flex-direction: column;
    gap: 0px;
    padding: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.yan-tools-advanced-item:hover {
    border-color: #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Ползунки в одну строку: название слева, значение справа, ползунок между */
.yan-tools-range-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
}

.yan-tools-range-label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 120px;
}

.yan-tools-advanced-item > label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

/* Стили для перенесенных настроек в дополнительном меню */
.yan-tools-advanced-item label:not(:has(input[type="checkbox"])) {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0;
    margin-top: 0;
}

.yan-tools-advanced-item .yan-tools-select-compact {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
}

.yan-tools-advanced-item .yan-tools-colors-group {
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
}

.yan-tools-advanced-item .yan-tools-color-item {
    flex: 1;
}

.yan-tools-advanced-item .yan-tools-color-item label {
    font-size: 11px;
    margin-bottom: 4px;
}

.yan-tools-checkbox-advanced {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #009A8C;
    flex-shrink: 0;
}

.yan-tools-advanced-controls {
    margin-left: 24px;
    margin-top: 4px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yan-tools-advanced-control-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yan-tools-advanced-control-row label {
    font-size: 11px;
    color: #6c757d;
    min-width: 70px;
    flex-shrink: 0;
}

.yan-tools-range-input {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    margin: 0;
    min-width: 0;
}

.yan-tools-range-input::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 3px;
    background: #e9ecef;
}

.yan-tools-range-input::-moz-range-track {
    height: 5px;
    border-radius: 3px;
    background: #e9ecef;
}

.yan-tools-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #009A8C;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: -4.5px;
}

.yan-tools-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(0, 154, 140, 0.15);
}

.yan-tools-range-input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #009A8C;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.yan-tools-range-input::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.yan-tools-range-value {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Инвертированный ползунок (прозрачность: 100% слева, 0% справа) */
.yan-tools-range-inverted {
    direction: rtl;
}

/* Кнопка сброса всех настроек */
.yan-tools-btn-reset-all {
    padding: 0;
    background: transparent;
    color: #dc3545;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: normal;
    transition: all 0.2s ease;
    width: 48px;
    height: 48px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yan-tools-btn-reset-all:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #c82333;
}


/* Шаблоны */
.yan-tools-templates-group {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.yan-tools-template-item {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.yan-tools-template-item:hover {
    background: rgba(0, 154, 140, 0.08);
    border-color: #009A8C;
    transform: scale(1.05);
}

.yan-tools-template-item.active {
    border-color: #009A8C;
    background: rgba(0, 154, 140, 0.12);
    box-shadow: 0 1px 3px rgba(0, 154, 140, 0.2);
}

.yan-tools-template-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.yan-tools-template-placeholder:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.yan-tools-template-icon {
    font-size: 20px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.yan-tools-template-item:hover .yan-tools-template-icon {
    opacity: 1;
}

.yan-tools-template-item.active .yan-tools-template-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.yan-tools-template-item svg {
    width: 100%;
    height: 100%;
    padding: 4px;
    box-sizing: border-box;
}

.yan-tools-template-item.active svg {

}

/* Настройки рамки */
.yan-tools-border-settings {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid #f0f0f0;
}

/* Настройки рамки в одну строку (внутри колонки) */
.yan-tools-border-settings-inline {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.yan-tools-border-settings-inline .yan-tools-setting-compact {
    min-width: 80px;
    flex: 1;
}

/* Настройки рамки в одну строку (внутри колонки) */
.yan-tools-border-settings-inline {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.yan-tools-settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.yan-tools-settings-row:last-child {
    margin-bottom: 0;
}

.yan-tools-setting-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.yan-tools-setting-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}

.yan-tools-input,
.yan-tools-select {
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

.yan-tools-input:focus,
.yan-tools-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.yan-tools-select option:disabled {
    color: #9ca3af;
    font-style: italic;
    background-color: #f3f4f6;
}

.yan-tools-color-input {
    width: 100%;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yan-tools-color-input:hover {
    border-color: #667eea;
}

.yan-tools-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yan-tools-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.yan-tools-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.yan-tools-search-group {
    flex: 2;
    min-width: 250px;
}

/* Галерея иконок */
.yan-tools-icon-gallery {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
    min-height: 400px;
}

.yan-tools-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 16px;
}

.yan-tools-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.yan-tools-icon-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 160px;
    z-index: 1;
}

.yan-tools-icon-item:hover {
    border-color: #667eea;
    transform: scale(2);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    background: white;
    z-index: 10;
}

.yan-tools-icon-item:hover .yan-tools-icon-preview {
    transform: none;
}

.yan-tools-icon-item:hover .yan-tools-icon-actions {
    opacity: 1;
    visibility: visible;
}

.yan-tools-icon-preview {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.yan-tools-icon-preview svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

.yan-tools-icon-info {
    text-align: center;
    width: 100%;
}

.yan-tools-icon-name {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
    line-height: 1.4;
    flex-shrink: 0;
}

.yan-tools-icon-downloads-badge {
    position: absolute;
    bottom: 2px;
    right: 4px;
    background: transparent;
    color: #dadada;
    font-size: 11px;
    font-weight: 600;
    padding: 0;
    border-radius: 0;
    min-width: auto;
    text-align: right;
    line-height: 1.2;
    box-shadow: none;
    z-index: 2;
    transition: all 0.2s ease;
}

.yan-tools-icon-item:hover .yan-tools-icon-downloads-badge {
    color: #495057;
    transform: none;
}

.yan-tools-icon-family-name {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    color: #dadada;
    font-size: 11px;
    font-weight: 500;
    padding: 0;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px);
    z-index: 2;
    transition: all 0.2s ease;
}

/* Кнопка лайка */
.yan-tools-icon-like-btn {
    position: absolute;
    bottom: -4px;
    left: -4px;
    width: 25px;
    height: 26px;
    background: rgb(255 255 255 / 0%);
    border: 0px solid #e91e63;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    line-height: 1;
}

.yan-tools-icon-like-btn:hover {
    background: #e91e63;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.4);
}

.yan-tools-icon-like-btn.liked {
    background: #e91e63;
    color: white;
}

.yan-tools-icon-like-btn.liked:hover {
    background: #c2185b;
    border-color: #c2185b;
}

.yan-tools-icon-item {
    cursor: pointer;
}

/* Модальное окно */
.yan-tools-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.yan-tools-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.yan-tools-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.yan-tools-modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

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

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

.yan-tools-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* Вкладки */
.yan-tools-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.yan-tools-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.yan-tools-tab:hover {
    color: #667eea;
}

.yan-tools-tab.active {
    color: #009A8C;
    border-bottom-color: #009A8C;
}

.yan-tools-tab-content {
    display: none;
}

.yan-tools-tab-content.active {
    display: block;
}

/* Область загрузки */
.yan-tools-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8f9fa;
}

.yan-tools-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.yan-tools-upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.yan-tools-upload-area p {
    margin: 10px 0;
    color: #6c757d;
}

.yan-tools-upload-list {
    margin-top: 20px;
}

.yan-tools-upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
}

.yan-tools-upload-item-name {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.yan-tools-upload-item-status {
    font-size: 12px;
    color: #6c757d;
    margin-left: 10px;
}

.yan-tools-upload-item-status.success {
    color: #28a745;
}

.yan-tools-upload-item-status.error {
    color: #dc3545;
}

/* Форма */
.yan-tools-form-group {
    margin-bottom: 20px;
}

.yan-tools-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}

.yan-tools-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 150px;
}

.yan-tools-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .yan-tools-icon-catalog {
        padding: 10px;
    }
    
    .yan-tools-settings-row {
        flex-direction: column;
    }
    
    .yan-tools-setting-group {
        min-width: 100%;
    }
    
    .yan-tools-icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .yan-tools-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .yan-tools-quick-tags-desktop {
        display: none !important;
    }
    
    .yan-tools-tags-container {
        display: flex !important;
        align-items: flex-start;
        gap: 8px;
        margin-top: 8px;
        order: 2;
        width: 100%;
    }
    
    .yan-tools-search-header-tags-wrapper {
        display: block !important;
        flex-shrink: 0;
        min-width: 80px;
        max-width: 120px;
    }
    
    .yan-tools-search-header-tags-wrapper #icon-tag-filter-mobile {
        width: 100%;
        padding: 10px 28px 10px 10px;
        border: 2px solid #e9ecef;
        border-radius: 10px;
        background: #f8f9fa;
        font-size: 12px;
        min-width: 80px;
        max-width: 120px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
        padding-right: 28px;
        line-height: 1.2;
    }
    
    .yan-tools-search-header-tags-wrapper #icon-tag-filter-mobile:focus {
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
    
    .yan-tools-tags-container .yan-tools-quick-tags {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        align-content: flex-start;
        max-height: 46px;
        overflow: hidden;
        margin-top: 0;
        padding: 0;
    }
    
    .yan-tools-tags-container .yan-tools-quick-tag {
        padding: 1px 5px;
        font-size: 8px;
        flex-shrink: 0;
        line-height: 1.2;
        height: auto;
        margin: 0;
    }
    
    .yan-tools-search-wrapper-inline .yan-tools-search-filters-inline {
        display: none !important;
    }
    
    .yan-tools-search-wrapper-inline #icon-tag-filter,
    .yan-tools-search-wrapper-inline #icon-family {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    .yan-tools-btn-add-icon {
        display: none !important;
    }
    
    .yan-tools-template-item {
        width: 40px;
        height: 40px;
    }
    
    .yan-tools-btn-advanced,
    .yan-tools-btn-reset-all {
        height: 40px;
    }
    
    .yan-tools-range-item {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px;
        padding: 8px 12px;
    }
    
    .yan-tools-range-label {
        grid-column: 1 / -1;
        grid-row: 1;
        min-width: auto;
        width: 100%;
        margin-bottom: 0;
    }
    
    .yan-tools-range-item .yan-tools-range-input {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }
    
    .yan-tools-range-item .yan-tools-range-value {
        grid-column: 2;
        grid-row: 2;
        text-align: right;
        min-width: 50px;
        align-self: center;
        margin-left: 8px;
    }
    
    .yan-tools-color-input-compact {
        width: 50px;
    }
    
    .yan-tools-advanced-controls {
        margin-left: 0px;
        margin-top: 10px;
        padding: 0px;
        background: transparent;
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .yan-tools-advanced-control-row {
        gap: 0px;
    }
    
    .yan-tools-format-buttons {
        gap: 3px;
        padding: 2px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .yan-tools-format-btn {
        padding: 5px 8px;
        font-size: 10px;
        flex-shrink: 0;
    }
    
    .yan-tools-format-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .yan-tools-icon-tags {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 4px 0;
        gap: 3px;
        max-width: 100%;
    }
    
    .yan-tools-icon-tag-chip {
        padding: 2px 6px;
        font-size: 9px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .yan-tools-icon-family-name {
        max-width: calc(100% - 50px);
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .yan-tools-icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .yan-tools-icon-item {
        min-height: 120px;
        padding: 10px;
    }
    
    .yan-tools-icon-preview {
        height: 60px;
    }
    
    .yan-tools-quick-tags {
        gap: 4px;
    }
    
    .yan-tools-quick-tag {
        padding: 2px 6px;
        font-size: 9px;
    }
    
    /* Скрываем размеры на мобильной версии */
    .yan-tools-size-buttons-hover {
        display: none !important;
    }
    
    /* Убираем отступы на мобильной версии */
    .yan-tools-quick-tags-format-row {
        padding-left: 0;
        padding-right: 0;
    }
    
    .yan-tools-format-buttons {
        gap: 2px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .yan-tools-format-btn {
        padding: 4px 4px;
        font-size: 8px;
        flex-shrink: 0;
    }
    
    .yan-tools-format-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .yan-tools-icon-tags {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        gap: 2px;
        max-width: 100%;
    }
    
    .yan-tools-icon-tag-chip {
        padding: 2px 5px;
        font-size: 8px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .yan-tools-icon-family-name {
        max-width: calc(100% - 40px);
        font-size: 9px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .yan-tools-search-header {
        gap: 6px;
        padding-bottom: 6px;
        margin-bottom: 6px;
    }
}

/* Прелоадер при скроллинге */
.yan-tools-scroll-loader {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.yan-tools-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: yan-tools-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes yan-tools-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Пустое состояние */
.yan-tools-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    width: 100%;
    grid-column: 1 / -1;
}

.yan-tools-empty-state-icon {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    opacity: 0.5;
}

.yan-tools-empty-state-icon svg {
    width: 100%;
    height: 100%;
}

.yan-tools-empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #495057;
}

.yan-tools-empty-state p {
    font-size: 1em;
    margin: 0;
}

/* Уведомления */
.yan-tools-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

.yan-tools-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Автоподсказки для поиска */
.yan-tools-search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -1px;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:active {
    background: #e9ecef;
}

/* Выбранные теги (чипсы) */
.yan-tools-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    min-height: 36px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #009A8C;
    color: white;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: default;
}

.tag-chip-remove {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 0 2px;
}

.tag-chip-remove:hover {
    opacity: 1;
}

/* Теги на иконках */
.yan-tools-icon-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px 1px;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    width: calc(100% + 24px);
    margin-left: -12px;
    margin-right: -12px;
    box-sizing: border-box;
}

.yan-tools-icon-tag-chip {
    display: inline-block;
    padding: 3px 8px;
    background: #ffffff;
    color: #495057;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    border: 1px solid #009A8C;
    cursor: pointer;
    transition: all 0.2s ease;
}

.yan-tools-icon-tag-chip:hover {
    background: #f8f9fa;
    border-color: #5568d3;
    color: #495057;
}

.yan-tools-icon-tag-chip.active {
    background: #e9ecef;
    color: #495057;
    border: none !important;
    cursor: default;
    pointer-events: none;
    font-weight: 500;
}

.yan-tools-icon-tag-chip.active-secondary {
    background: #e0e7ff;
    color: #4c1d95;
    border: none !important;
    cursor: pointer;
    font-weight: 500;
}

/* Затемненный фон для иконок, показанных по тегу */
.yan-tools-icon-item.yan-tools-icon-tag-related {
    background: #f6f8ff;
    border-color: #c7d2fe;
}

/* Кнопка переключения режима просмотра */
.yan-tools-btn-view-mode {

    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yan-tools-btn-view-mode:hover {
    background: #141414;
}

.yan-tools-btn-view-mode.active {
    background: #009A8C;
}

/* Компактный режим */
.yan-tools-icon-grid.yan-tools-compact-mode {
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
    padding: 10px 0;
}

.yan-tools-icon-item-compact {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: transparent;
}

.yan-tools-icon-item-compact:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.2);
    z-index: 5;
}

.yan-tools-icon-preview-compact {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yan-tools-icon-preview-compact svg {
    width: 100%;
    height: 100%;
    max-width: 32px;
    max-height: 32px;
}

/* В компактном режиме скрываем элементы, которые не нужны */
.yan-tools-compact-mode .yan-tools-icon-item {
    display: none;
}

/* В обычном режиме скрываем компактные иконки */
.yan-tools-icon-grid:not(.yan-tools-compact-mode) .yan-tools-icon-item-compact {
    display: none !important;
}

/* Скрываем теги и другие элементы в компактном режиме */
.yan-tools-compact-mode ~ .yan-tools-icon-settings .yan-tools-icon-tags,
.yan-tools-compact-mode .yan-tools-icon-tags {
    display: none;
}

/* Скрываем шаблоны, настройки и сброс в компактном режиме */
.compact-mode .yan-tools-templates-group,
.compact-mode #icon-advanced-toggle,
.compact-mode #icon-reset-all,
.compact-mode #icon-advanced-settings {
    display: none !important;
}

/* Ползунок размера для компактного режима */
.yan-tools-compact-size-control {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.yan-tools-compact-size-control label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    color: #495057;
    width: 100%;
}

.yan-tools-compact-size-control input[type="range"] {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

.yan-tools-compact-size-control input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
}

.yan-tools-compact-size-control input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
}

.yan-tools-compact-size-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #009A8C;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: -6px;
}

.yan-tools-compact-size-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #007a6f;
    transform: scale(1.1);
}

.yan-tools-compact-size-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #009A8C;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.yan-tools-compact-size-control input[type="range"]::-moz-range-thumb:hover {
    background: #007a6f;
    transform: scale(1.1);
}

.yan-tools-compact-size-control #icon-compact-size-value {
    font-size: 14px;
    color: #009A8C;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

/* Drag & Drop подсказка */
.yan-tools-drag-tooltip {
    display: none;
    position: fixed;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    pointer-events: none;
    z-index: 10000;
    white-space: nowrap;
    animation: yan-tools-drag-tooltip-pulse 1.5s ease-in-out infinite;
}

@keyframes yan-tools-drag-tooltip-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Эффект при перетаскивании */
.yan-tools-icon-item.yan-tools-icon-dragging,
.yan-tools-icon-item-compact.yan-tools-icon-dragging {
    opacity: 0.6;
    transform: scale(0.95);
    cursor: grabbing !important;
}

.yan-tools-icon-item[draggable="true"],
.yan-tools-icon-item-compact[draggable="true"] {
    cursor: grab;
}

.yan-tools-icon-item[draggable="true"]:active,
.yan-tools-icon-item-compact[draggable="true"]:active {
    cursor: grabbing;
}

