:root {
    --primary-color: #1565c0;
    --primary-hover: #0d47a1;
    --text-color: #333;
    --text-muted: #666;
    --border-color: #e0e0e0;
    --bg-color: #f5f7fa;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --risk-high: #f44336;
    --risk-medium: #ff9800;
    --risk-low: #4caf50;
    --gray-500: #6B7280; /* Tailwind text-gray-500 */
    --gray-900: #111827; /* Tailwind text-gray-900 */
    --header-height: 60px; /* Approximate header height, adjust as needed */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden; /* Предотвращаем глобальный горизонтальный скроллинг */
}

.container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-mobile {
    display: flex;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
}

.logo {
    height: 24px;
    margin-right: 10px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.header-search {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 20px;
    display: flex;
    position: relative;
}

.search-input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-button {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background-color: var(--primary-hover);
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(21, 101, 192, 0.1);
}

/* Main layout */
.main-container {
    display: flex;
    margin-top: 20px;
    margin-bottom: 40px;
    gap: 20px;
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.sidebar-nav {
    max-height: calc(100vh - var(--header-height) - 40px); /* Limit height for scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    background-color: #FFFFFF; /* White background */
}

.sidebar-nav ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav a.current {
    background-color: #1565C0;
    color: #FFFFFF;
    font-weight: bold;
}

.sidebar-nav a.current i {
    color: #FFFFFF;
}

.sidebar-nav a.active:not(.current) {
    color: #2563EB;
    background-color: #FFFFFF;
}

.sidebar-nav a.active:not(.current) i {
    color: #2563EB;
}

.sidebar-nav a.inactive {
    color: #4B5563;
    background-color: #FFFFFF;
}

.sidebar-nav a.inactive i {
    color: #4B5563;
}

.sidebar-nav a:not(.current):hover,
.sidebar-nav a:not(.current):focus {
    background-color: #EFF6FF;
    outline: none;
}

.sidebar-nav i {
    width: 16px;
    text-align: center;
}

.content {
    flex-grow: 1;
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: hidden; /* Предотвращаем скроллинг на уровне контента */
}

/* Breadcrumbs */
.breadcrumbs {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 13px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Company header */
.company-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.company-header h1 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #222;
    font-weight: 600;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.company-status {
    display: inline-block;
    padding: 3px 8px;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.company-inn, .company-ogrn, .company-update {
    color: var(--text-muted);
}

/* Company actions */
.company-actions {
    margin: 8px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Info blocks */
.info-block, .section-card {
    margin-bottom: 8px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.info-block h2, .section-card h2.section-title {
    font-size: 18px;
    margin-bottom: 12px;
    color: #222;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.info-grid, .requisites-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-group {
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.contact-group h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.5;
}

.info-row, .requisites-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 6px 0;
    min-height: 30px;
}

.info-row.no-data, .requisites-row.no-data {
    padding-left: 100px;
}

.info-block .info-row:nth-child(odd), .section-card .requisites-row:nth-child(odd) {
    background-color: var(--bg-color);
}

.info-label, .requisites-row p.text-sm.text-gray-500 {
    color: var(--gray-500);
    width: 250px;
    flex-shrink: 0;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.info-value, .requisites-row p.text-base.text-gray-900 {
    color: var(--gray-900);
    font-weight: 500;
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    word-break: break-word;
    line-height: 1.5;
    min-height: 24px;
    text-align: left;
}

.info-value.has-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.status-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.main-text, .address-text {
    display: inline;
}

.info-value .social-icon {
    vertical-align: middle;
    margin-right: 4px;
    font-size: 16px;
    line-height: 1;
}

.info-value.no-data {
    font-weight: 400;
    color: var(--text-muted);
}

.info-value a, .requisites-row a {
    color: var(--primary-color);
    text-decoration: none;
    line-height: 1.5;
}

.info-value a:hover, .requisites-row a:hover {
    text-decoration: underline;
}

.text-muted {
    color: var(--text-muted);
    font-size: 12px;
    display: block;
    margin-top: 3px;
    line-height: 1.5;
}

.status-badge {
    display: inline-block;
    padding: 2px 6px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.same-address-count a {
    color: var(--gray-500);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.same-address-count a:hover,
.same-address-count a:focus {
    color: var(--primary-color);
}

/* Sanction group */
.sanction-group {
    margin-bottom: 12px;
}

/* Similar contragents table */
.similar-contragents-table {
    width: 100%;
    border-collapse: collapse;
}

.similar-contragents-table th,
.similar-contragents-table td {
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
    word-break: break-word;
    line-height: 1.5;
    border-bottom: 1px solid var(--border-color);
}

.similar-contragents-table th {
    font-weight: 600;
    color: var(--gray-500);
    font-size: 13px;
}

.similar-contragents-table td {
    font-size: 14px;
    color: var(--gray-900);
}

.similar-contragents-table tbody tr:nth-child(odd) {
    background-color: #f9fafb;
}

.similar-contragents-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.similar-contragents-table a {
    color: var(--primary-color);
    text-decoration: none;
}

.similar-contragents-table a:hover {
    text-decoration: underline;
}

/* Tabs */
.tabs {
    margin: 8px 0;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.tabs-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 5px;
    line-height: 1.5;
}

.tabs-btn:hover {
    color: var(--primary-color);
}

.tabs-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Risks */
.company-risks {
    margin: 8px 0;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid var(--border-color);
}

.company-risks h2 {
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.risks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.risk-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.risk-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.risk-icon.high-risk {
    background-color: var(--risk-high);
}

.risk-icon.medium-risk {
    background-color: var(--risk-medium);
}

.risk-icon.low-risk {
    background-color: var(--risk-low);
}

.risk-info {
    flex-grow: 1;
}

.risk-title {
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.5;
}

.risk-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Toggle link */
.toggle-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
    line-height: 1.5;
}

.toggle-link:hover {
    text-decoration: underline;
}

/* Hidden elements */
.hidden {
    display: none;
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    font-size: 13px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.5;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-copyright {
    color: var(--text-muted);
    line-height: 1.5;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    margin-right: 15px;
    cursor: pointer;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Company Info Block */
.company-info-block {
    margin-bottom: 8px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.company-info-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.company-info-image {
    flex-shrink: 0;
}

.company-info-image img {
    width: 200px;
    height: 100px;
    object-fit: contain;
}

.company-info-text {
    flex-grow: 1;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
}

.company-info-text p {
    margin-bottom: 10px;
}

.company-info-text ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 10px;
}

.company-info-text li {
    margin-bottom: 5px;
}

.company-info-text strong {
    font-weight: 600;
}

.company-info-text u {
    text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 992px) {
    .header .container {
        gap: 10px;
    }
    
    .header-search {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
        max-width: 100%;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        top: var(--header-height); /* Start below header */
        left: -220px;
        height: calc(100vh - var(--header-height)); /* Full height minus header */
        width: 220px;
        z-index: 1001; /* Above header */
        background: #fff;
        transition: left 0.3s;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto; /* Ensure sidebar itself can scroll if needed */
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .sidebar-close {
        display: block;
        color: var(--text-color); /* Match sidebar text for visibility */
        top: 15px; /* Adjust position for better tap target */
        right: 15px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .content {
        margin-left: 0;
    }
    
    .info-grid.contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-group {
        margin-bottom: 8px;
    }
    
    .info-row.no-data, .requisites-row.no-data {
        padding-left: 0;
    }
    
    .info-row, .requisites-row {
        flex-direction: column;
        gap: 4px;
        padding: 6px 0;
    }
    
    .info-label, .requisites-row p.text-sm.text-gray-500 {
        width: 100%;
        margin-bottom: 0;
        text-align: left;
    }
    
    .info-value, .requisites-row p.text-base.text-gray-900 {
        width: 100%;
        text-align: left;
    }
    
    .risks-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .company-header h1 {
        font-size: 18px;
    }
    
    .company-meta {
        gap: 8px;
        row-gap: 5px;
    }
    
    .company-actions {
        flex-direction: column;
    }
    
    .company-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-label, .requisites-row p.text-sm.text-gray-500 {
        width: 200px;
    }
    
    .footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Company Info Block - Mobile */
    .company-info-container {
        flex-direction: column;
        align-items: center;
    }
    
    .company-info-image {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 8px 0;
    }
    
    .search-button {
        padding: 8px 12px;
    }
    
    .info-value.has-badges {
        gap: 4px;
    }
    
    .company-header h1 {
        font-size: 16px;
    }
    
    .company-status, .company-inn, .company-ogrn, .company-update {
        display: block;
        width: 100%;
        margin: 2px 0;
    }
    
    .tabs-nav {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .tabs-btn {
        font-size: 13px;
        padding: 6px 12px;
        white-space: nowrap;
    }
}

@media (max-width: 400px) {
    .search-input {
        padding: 6px 8px;
    }
    
    .btn {
        padding: 6px 12px;
    }
    
    .content {
        padding: 15px;
    }
    
    .risk-card {
        flex-direction: column;
        text-align: center;
    }
}

.info-value {
    flex-direction: column !important;
    align-items: flex-start !important;
    line-height: 1.5 !important;
}

.linked-predecessor {
    margin-left: 24px;
    margin-top: 6px;
    display: block;
    width: 100%;
}

.predecessor-arrow {
    vertical-align: middle;
    margin-right: 8px;
}

/* Медиа-запросы для разделения версий */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 641px) {
    .mobile-only {
        display: none;
    }
    .desktop-only {
        display: block;
    }
}

/* Стили для мобильной версии */
.mobile-contragent-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-contragent-block:last-child {
    border-bottom: none;
}

.mobile-label {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.5;
}

.mobile-value {
    font-size: 14px;
    color: #111827;
    word-break: break-word;
    line-height: 1.5;
}

.mobile-value a {
    color: #1565c0;
    text-decoration: none;
}

.mobile-value a:hover {
    text-decoration: underline;
}

.copy-icon {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
    margin-right: 4px;
    display: inline-block;
}

.copy-icon:hover {
    color: var(--primary-color);
}

.copy-icon.fa-check {
    color: #4caf50;
}

.requisites-row {
    position: relative;
}

.label-cell {
    position: relative;
}

.risk-icon {
    position: relative;
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    line-height: 16px;
    outline: none;
}

.risk-icon svg {
    width: 100%;
    height: 100%;
}

.risk-icon-red {
    color: #DC3545;
}

.risk-icon-gray {
    color: #6B7280;
}

.risk-icon:focus {
    outline: 2px solid #1565C0;
    outline-offset: 2px;
}

.risk-popover {
    display: none;
    position: fixed;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: normal;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    width: 100%;
}

.risk-icon.active .risk-popover {
    display: block;
}

.star-full, .star-half, .star-empty {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
}

.star-full { color: #32CD32; }
.star-half { color: #32CD32; opacity: 0.5; }
.star-empty { color: #D3D3D3; }

/* Стили для социальных иконок */
.social-item {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* Новые стили для контактов */
.contact-toggle {
    margin-top: 8px;
}

.contact-toggle-phones,
.contact-toggle-emails,
.contact-toggle-websites,
.contact-toggle-socials {
    margin-left: 266px;
}

.show-more, .hide-more {
    font-size: 13px;
    margin-left: 8px;
    line-height: 1.5;
}

/* Стили для слайдера */
.slider-container {
    position: relative;
    width: 100%; /* Адаптивная ширина, синхронизированная с родителем */
    max-width: 100%; /* Ограничиваем ширину */
    margin: 0 auto;
    overflow-x: hidden; /* Предотвращаем горизонтальный скроллинг на уровне контейнера */
    padding: 0;
    box-sizing: border-box;
}

.slider-wrapper {
    display: flex;
    overflow-x: auto; /* Прокрутка только внутри wrapper */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    width: 100%; /* Устанавливаем 100% ширины контейнера */
    max-width: 100%; /* Ограничиваем максимальную ширину */
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-item {
    min-width: 0;
    width: 200px; /* Фиксированная ширина вместо fit-content */
    max-width: 200px; /* Ограничиваем максимальную ширину */
    height: 65px;
    background-color: #f5f5f5;
    margin-right: 8px;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5px 1rem;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    flex-shrink: 0;
    user-select: none;
    transition: transform 0.2s;
    white-space: nowrap; /* Предотвращаем перенос строк */
    overflow: hidden; /* Обрезаем переполняющий текст */
    text-overflow: ellipsis; /* Добавляем многоточие */
}

/* Убедимся, что текст внутри .indicator и .value обрезается */
.slider-item .indicator,
.slider-item .value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Последний элемент не должен иметь margin-right */
.slider-item:last-child {
    margin-right: 0;
}

.slider-item.html-content {
    display: block;
}

.slider-item:hover {
    transform: translateY(-2px);
}

.slider-item .indicator {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--gray-500);
}

.slider-item .value {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, opacity 0.3s;
    opacity: 1;
}

.slider-button.hidden {
    opacity: 0;
    pointer-events: none;
}

.slider-button:hover {
    background-color: rgba(255, 255, 255, 1);
}

.slider-button.prev {
    left: 0;
}

.slider-button.next {
    right: 0;
}

@media (max-width: 992px) {
    .slider-container {
        width: 100%; /* Убедимся, что ширина адаптивна */
        max-width: 100%;
    }

    .slider-item {
        width: 180px; /* Уменьшаем ширину для средних экранов */
        max-width: 180px;
    }
}

@media (max-width: 640px) {
    .slider-item {
        width: 150px; /* Еще меньше для мобильных */
        max-width: 150px;
        height: 55px;
        padding: 0.25rem 0.75rem;
    }

    .slider-item .indicator {
        font-size: 13px;
    }

    .slider-item .value {
        font-size: 16px;
    }

    .slider-button {
        width: 30px;
        height: 30px;
        padding: 6px;
    }
}

/* Стили для окна подсказок */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 4px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Скрытие при классе hidden */
.search-suggestions.hidden {
    display: none;
}

/* Стили для элементов подсказок */
.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
}

.suggestion-item:hover {
    background: #f9fafb;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Стили для названия */
.suggestion-name {
    font-weight: 600;
}

.suggestion-name.active {
    color: var(--primary-color);
}

.suggestion-name strike {
    text-decoration: line-through;
}

/* Стили для деталей */
.suggestion-details {
    font-size: 12px;
    color: #6b7280;
}

/* Стили для иконок */
.suggestion-details .fas {
    font-size: 12px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Стили для футера подсказок */
.suggestion-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 12px;
}

/* Стили для плашки "Все результаты" и счетчиков */
.suggestion-total {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
}

.suggestion-total-counter,
.suggestion-count-ul,
.suggestion-count-ip {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    margin-left: 4px;
}

.suggestion-total-counter:hover,
.suggestion-count-ul:hover,
.suggestion-count-ip:hover {
    background: var(--primary-hover);
}

/* Стили для toggle-переключателя */
.suggestion-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.suggestion-toggle input[type="checkbox"] {
    display: none;
}

.suggestion-toggle .toggle-slider {
    width: 34px;
    height: 20px;
    background: #d1d5db;
    border-radius: 9999px;
    position: relative;
    transition: background 0.2s;
}

.suggestion-toggle .toggle-slider::before {
    content: '';
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.suggestion-toggle input:checked + .toggle-slider {
    background: var(--primary-color);
}

.suggestion-toggle input:checked + .toggle-slider::before {
    transform: translateX(14px);
}

.suggestion-toggle .toggle-label {
    font-size: 12px;
    color: #1f2937;
}

/* Стили для копирования */
.copy-icon {
    cursor: pointer;
    color: var(--text-muted, #666);
    font-size: 12px;
    vertical-align: middle;
    margin-left: 4px;
    display: inline;
}
.copy-icon:hover {
    color: var(--primary-color, #2563eb);
}
.copy-icon.fa-check {
    color: #4caf50;
}
.copy-feedback {
    position: absolute;
    background: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
}