img {
    max-width: 100%;
    max-height: 100%;
}

.lightzoom {
    cursor: pointer;
}


.copyable {
    color: #3673f4;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    padding-right: 24px;
}

.copyable::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('/img/copy.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
}

.copyable:hover::after {
    opacity: 1;
}

.copyable.copied::after {
    /* Можно заменить на галочку или оставить ту же иконку */
    background-image: url('/img/check.svg'); /* если есть */
    /* или просто подсветить */
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg);
}

.inline-icon {
    display: inline-block;
    vertical-align: middle;
    width: 1.1em;
    height: 1.1em;
    margin: 0 0.15em;
    position: relative;
    top: -0.15em; /* компенсация для выравнивания с текстом */
}

.attachment-notice {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 16px 0;
    max-width: 640px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.attachment-notice .icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.attachment-notice .icon-wrapper svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.attachment-notice .content {
    flex: 1;
    padding-top: 2px;
}

.attachment-notice .title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 8px;
}

.attachment-notice .message {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
}

.attachment-notice .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.attachment-notice .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.attachment-notice .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.attachment-notice .btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    transform: translateY(-2px);
}

.attachment-notice .btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.attachment-notice .btn-secondary:hover {
    background: #e2e8f0;
}

.attachment-notice .btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Каталог: поиск + список разделов (data/landing.php, page_landing.twig) */
.catalog-search {
    display: flex;
    gap: 10px;
    margin: 20px 0 30px;
    max-width: 600px;
}

.catalog-search-header {
    margin-top: 18px;
    margin-bottom: 0;
}

.catalog-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
}

.catalog-search-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

.catalog-search-btn:hover {
    background: #3b82f6;
}

.catalog-results-title {
    margin-bottom: 10px;
}

.catalog-results-table {
    margin-bottom: 40px;
}

.search-result-row {
    cursor: pointer;
}

.search-result-row:hover {
    background: #eff6ff;
}

.catalog-section-count {
    color: #94a3b8;
    font-size: 12px;
}

.catalog-intro {
    color: #64748b;
    max-width: 560px;
}

.catalog-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.catalog-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.catalog-tile:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .12);
}

.catalog-tile img {
    width: 100%;
    aspect-ratio: 992 / 1403;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

.catalog-tile-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 992 / 1403;
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
    background: #f8fafc;
    border-radius: 4px;
}

.catalog-tile-label {
    font-weight: 600;
    text-align: center;
}

/* Страница иллюстрации (data/i.php, page_illustration.twig) */
.illus-breadcrumb {
    color: #64748b;
    margin: -35px 0 10px;
}

.illus-breadcrumb a {
    color: #2563eb;
}

.illus-layout {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
}

.illus-layout > [class*="col-"] {
    float: none;
}

.illus-wrap {
    position: relative;
    position: sticky;
    top: 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
}

.illus-wrap img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
    pointer-events: none;
}

.illus-wrap .overlay {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    height: calc(100% - 20px);
    width: auto;
    pointer-events: none;
}

.hotspot .leader {
    stroke: #2563eb;
    stroke-width: 1;
    stroke-dasharray: 3 2;
    opacity: .7;
}

.hotspot.skip .leader {
    stroke: #94a3b8;
}

.hotspot circle {
    fill: rgba(37, 99, 235, .16);
    stroke: #2563eb;
    stroke-width: 2;
    cursor: pointer;
    pointer-events: all;
    transition: fill .15s;
}

.hotspot text {
    font-size: 15px;
    fill: #2563eb;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    font-weight: 700;
}

.hotspot:hover circle,
.hotspot.active circle {
    fill: rgba(37, 99, 235, .5);
}

.hotspot.skip circle {
    stroke: #94a3b8;
}

.hotspot.skip text {
    fill: #94a3b8;
}

.illus-table-wrap {
    overflow-x: auto;
}

.illus-table {
    font-size: 13px;
}

.illus-table .col-pos {
    width: 40px;
    font-weight: 700;
}

.illus-table .col-num {
    width: 150px;
    font-family: ui-monospace, Consolas, monospace;
}

.illus-table .col-qty {
    width: 40px;
}

.illus-table .col-share {
    width: 30px;
    text-align: center;
}

.share-btn {
    border: none;
    background: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    color: #94a3b8;
    line-height: 0;
}

.share-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.share-btn:hover {
    background: #eff6ff;
    color: #2563eb;
}

.share-btn.copied {
    color: #22c55e;
}

.illus-table tr.part-row {
    border-left: 3px solid transparent;
}

.illus-table tr.part-row.primary {
    border-left-color: #22c55e;
    font-weight: 600;
}

.illus-table tr.part-row.variant {
    color: #94a3b8;
    font-weight: 400;
}

.illus-table tr.part-row:hover,
.illus-table tr.part-row.active {
    background: #eff6ff;
}

.illus-table tr.part-row.row-skip {
    color: #cbd5e1;
}

.illus-table tr.part-row.row-skip .col-num {
    text-decoration: line-through;
}

.part-validity {
    font-weight: 400;
    color: #94a3b8;
    font-size: 11px;
}

.tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 400;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    white-space: nowrap;
}

.tag-skip {
    background: #fbeceb;
    color: #c0392b;
}

.tag-alt {
    background: #eef1f6;
    color: #46587a;
}

.tag-info {
    background: #f1eee7;
    color: #94a3b8;
}

@media (max-width: 900px) {
    .illus-wrap {
        position: static;
    }
}