/* styles-stats.css */
body { 
    font-family: Arial, sans-serif; 
    background-color: #f5f5f5; 
}

@supports (padding: env(safe-area-inset-top)) {
    :root {
        --safe-area-inset-top: env(safe-area-inset-top);
        --safe-area-inset-bottom: env(safe-area-inset-bottom);
        --safe-area-inset-left: env(safe-area-inset-left);
        --safe-area-inset-right: env(safe-area-inset-right);
    }
}

.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
/*    gap: 3px; */
/*    margin-bottom: 3px; */
}

.trees-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); 
    gap: 2px; 
}

.width-multiplier-1 { grid-column: span 1; }
.width-multiplier-2 { grid-column: span 2; }
.width-multiplier-3 { grid-column: span 3; }
.width-multiplier-4 { grid-column: span 4; }

.stat-card {
    display: flex;
    flex-direction: column; /* Меняем с row на column */
    align-items: center;
    justify-content: center; /* Выравнивание по центру по вертикали */
    gap: 3px;
    border: 1px solid #ccc;
    background-color: #fff;
    text-align: center;
    padding: 2px;
}

.stat-number { 
    font-size: 14px;
    font-weight: bold; 
    color: #007cba; 
    width: 100%; /* Занимает всю ширину */
    order: 1; /* Явно указываем порядок */
}

.stat-label { 
    font-size: 12px; 
    color: #666; 
    width: 100%; /* Занимает всю ширину */
    order: 2; /* Явно указываем порядок */
}

.stat-card.range-card {
    flex-direction: column;
}

.stat-card.range-card .stat-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.stat-card.range-card .range-filters {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    font-size: 12px;
}

.stat-card.range-card .range-filters select {
    flex: 1;
    font-size: 12px;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    min-width: 0;
    max-width: 48%;
}

.expand-btn, .more-btn {
    display: none; 
    background: #f0f0f0; 
    border: 1px solid #ddd; 
    padding: 8px; 
    text-align: center; 
    cursor: pointer; 
    margin-top: 10px; 
    border-radius: 4px; 
    font-size: 12px; 
    color: #666; 
}

.expand-btn:hover, .more-btn:hover {
    background: #e0e0e0;
}

.loading { 
    display: none; 
    color: #007cba; 
    text-align: center; 
    padding: 20px; 
    font-size: 16px; 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background: rgba(255, 255, 255, 0.9); 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    z-index: 9999; 
    width: 200px;
}

.active-filters {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(200, 200, 200, 0.5);
    border: 1px solid rgba(221, 221, 221, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
}

.active-filters:not(.has-filters) {
    display: none;
}

.filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.filter-tag {
    display: flex;
    align-items: center;
    background: rgba(248, 249, 250, 0.95);
    border: 1px solid rgba(233, 236, 239, 0.9);
    border-radius: 4px;
    padding: 4px 7px;
    font-size: 10.5px;
    max-width: 200px;
}

.filter-info { 
    flex: 1; 
    min-width: 0; 
}

.filter-type { 
    color: #495057; 
    font-size: 9px; 
    line-height: 1; 
}

.filter-value {
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
    font-size: 10.5px;
    margin-top: 1px;
}

.remove-filter {
    background: #e74c3c;
    color: white;
    border: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 9px;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-all-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0;
}

.clear-all-btn:hover {
    background: #c82333;
}

.filter-container { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.filter-checkbox { 
    margin-right: 6px; 
    cursor: pointer; 
}

.filter-label { 
    font-size: 12px; 
    color: #666; 
    cursor: pointer; 
    user-select: none; 
}

.filter-checkbox:checked + .filter-label { 
    color: #007cba; 
    font-weight: bold; 
}

.tree-container {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    position: relative;
}

.tree-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.tree-title span {
    flex: 1 1 auto;
/*    min-width: 100px;*/
}

:root {
  --tree-max-height: 428px;
}

.tree-content {
    max-height: var(--tree-max-height);
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.tree-content.expanded {
    max-height: none !important;
}

.tree-item {
    margin: -1px 0;
    user-select: none;
}

.tree-node {
    margin: 2px 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.tree-node:hover {
    background: rgba(0,124,186,0.05);
}

.tree-toggle, .tree-toggle-spacer {
    width: 17px;
    height: 18px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tree-toggle {
    background: #d6d6d6;
    border-radius: 3px;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}

.tree-children {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
}

.tree-node.expanded + .tree-children {
    max-height: fit-content;
}

.tree-children .tree-node {
    padding-left: 20px;
}

.tree-children .tree-children .tree-node {
    padding-left: 40px;
}

.tree-bar {
    height: 20px;
    background: #F4F4F4;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.tree-fill {
    height: 100%;
    background: #42A5F5;
    transition: width 0.3s ease;
}

.tree-label-text {
    position: absolute;
    top: 0;
    left: 8px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    color: #000;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    right: 50px; /* Будет переопределено динамически */
}

.tree-count {
    position: absolute;
    top: 0;
    right: 8px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    color: #333;
    z-index: 2;
    text-align: right;
    justify-content: flex-end;
}

.tree-container.filter-active .tree-node:not(.filter-match):not(.filter-ancestor) {
    opacity: 0.5;
}

.tree-container.filter-active .tree-node.filter-match,
.tree-container.filter-active .tree-node.filter-ancestor {
    opacity: 1 !important;
}

.tree-node.filter-match .tree-fill {
    filter: brightness(0.9) contrast(1.2);
}

.tree-node.filter-match .tree-label-text,
.tree-node.filter-match .tree-count {
    color: #000 !important;
    font-weight: bold !important;
}

.tree-node.detailed-location .tree-fill {
    background: #42A5F5;
}

.tree-node.period .tree-fill {
    background: #42A5F5; 
}

.tree-node.stage .tree-fill {
    background: #64B5F6; 
}

.tree-node.substage .tree-fill {
    background: #90CAF9; 
}

.tree-children .tree-children .tree-children .tree-node {
    padding-left: 60px;
}

.tree-node.zone .tree-fill {
    background: #BBE6FF;
}

.tree-children .tree-children .tree-children .tree-children .tree-node {
    padding-left: 80px;
}

.tree-node.horizon .tree-fill {
    background: #E3F2FD;
}

.preservation-card,
.size-card {
    position: relative;
}

.preservation-filters,
.size-filters,
.range-filter-controls {
    margin-top: 2px;
    display: flex;
    justify-content: center;
}

.preservation-filters select,
.size-filters select,
.range-filter-controls select {
    margin: 0 1px;
    font-size: 12px;
    padding: 1px 2px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    width: 45%;
}

.preservation-filters select:hover,
.size-filters select:hover,
.range-filter-controls select:hover {
    border-color: #007cba;
}

.preservation-filters select:first-child,
.size-filters select:first-child,
.range-filter-controls select:first-child {
    margin-right: 3%;
}

.preservation-filters select:last-child,
.size-filters select:last-child,
.range-filter-controls select:last-child {
    margin-left: 0;
    width: 49%;
}

.preservation-card .range-filter-controls {
    font-size: 8px;
}

.size-card .range-filter-controls {
    font-size: 8px;
}

.toggle-all-btn, .export-btn {
    border: 1px solid #939393;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-left: 2px;
    height: 20px;
    width: 28px;
}

.toggle-all-btn:hover {
    background: #e0e0e0;
}

.thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    font-size: 12px;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 106px);
    justify-content: start;
    gap: 1px;
}

.thumbnail-container {
    position: relative;
    width: 106px;
    height: 106px;
    background-color: #333;
    overflow: hidden;
    cursor: pointer;
}

.thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-name-overlay, .thumbnail-name-overlay2 {
    position: absolute;
    color: gray;
    font-size: 8pt;
    padding: 2px;
    pointer-events: none;
    text-shadow: 
      0 0 5px black,
      0 0 5px black,
      0 0 5px black,
      0 0 5px black;
    color: white;
    font-weight: bold;
}

.thumbnail-name-overlay2 {
    bottom: -2px;
    left: 3%;
}

.thumbnail-name-overlay {
    top: -2px;
    right: 0;
    text-align: right;
    font-weight: bold;
}

.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

/* Общие стили для кнопок просмотрщика */
.viewer-close, 
.viewer-toggle-info, 
.viewer-prev, 
.viewer-next,
.toggleCommentsButton,
.viewer-share {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #ededed;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10004;
    transition: background 0.2s ease;
}

.viewer-close:hover, 
.viewer-toggle-info:hover, 
.viewer-prev:hover, 
.viewer-next:hover,
.toggleCommentsButton:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Индивидуальные размеры и позиционирование */
.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 5px;
}

.viewer-toggle-info {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    z-index: 10002;
}

.viewer-prev,
.viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 3;
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.toggleCommentsButton {
    position: fixed;
    bottom: 110px;
    right: 20px;
    padding: 10px 20px;
    font-size: 24px;
    border-radius: 5px;
    z-index: 1001;
    height: 40px;
    width: 40px;
}

.toggleCommentsButton[data-has-comments="true"] {
    width: auto;
}

.viewer-image-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: visible;
}

.viewer-image {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: none;
    transform-origin: 0 0;
    transition: transform 0.2s ease-out, opacity 0.1s ease-out;
    user-select: none; 
    display: block;
}

.error-message {
    color: white;
    font-size: 20px;
    text-align: center;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.viewer-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10001;
    pointer-events: none;
}

.viewer-title h3 {
    margin: 0;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: inline-block;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    max-width: 90%;
    word-break: break-word;
    pointer-events: auto;
    user-select: text; 
}

.viewer-info-panel {
    position: absolute;
    bottom: 0;
    width: fit-content;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 1000;
    display: none;
    max-height: 50vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.viewer-info-panel.visible {
    display: block;
}

.viewer-info-panel h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    text-align: center;
    color: #fff;
}

.viewer-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #666;
}

.viewer-info-table td {
    padding: 4px;
    vertical-align: top;
    width: fit-content;
    max-width: 400px;
    word-break: break-word;
    user-select: text; 
}

.viewer-info-empty {
    text-align: center;
    font-style: italic;
    color: #aaa;
    padding: 10px;
}

.more-btn {
    display: block;
    height: 100%;
    margin-top: 0;
    border-radius: 0;
}

.sort-select, .tree-search  {
    margin-left: 2px;
    width: 50px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-container {
    position: relative;
    flex-shrink: 0;
    margin-left: 2px;
}

.tree-search {
    width: 100px;
    padding-right: 25px;
}

.clear-search-btn {
    display: none;
    position: absolute;
    right: -2px;
    top: 43%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 26px;
}

.clickable-place {
    cursor: pointer;
    color: #0066cc;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: all 0.2s ease;
}

.clickable-place:hover {
    color: #ff5500;
    text-decoration: underline;
    background-color: rgba(255, 85, 0, 0.1);
    border-radius: 3px;
    padding: 0 2px;
}

.viewer-info-table .clickable-place {
    display: inline-block;
    margin: 0 2px;
}

.comment-header {
    font-size: 14px;
}

.comment-text {
    margin: 5px 0;
    font-size: 14px;
}

.remark42__counter {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.remark42window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; 
    height: 80%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 1002;
    overflow-y: auto;
    padding: 20px;
}

.viewer-share {
    position: absolute;
    bottom: 60px;
    right: 20px;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 5px;
/*    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #ededed;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 5px;
    z-index: 10004;
    transition: background 0.2s ease;*/
}

.viewer-share:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .active-filters {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: none;
        background: rgba(255, 255, 255, 0.98);
        justify-content: space-between;
    }
    
    body { 
/*        margin: -12px; */
    }
    
    .container { 
        margin: 0px;
/*        padding: 5px; */
    }

	.trees-grid { 
	    display: grid; 
	    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); 
	    gap: 2px; 
	}

    .stat-card {
	border-radius: 0px;
    }
	.stat-number { 
	    font-size: 13px;
	}

    .preservation-filters select,
    .size-filters select,
    .range-filter-controls select {
        font-size: 6px;
        height: 16px;
        padding: 1px;
    }
   .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, 95px);
   }
	.thumbnail-container {
	    width: 95px;
	    height: 95px;
	}

    .toggleCommentsButton {
        position: fixed;
	top: 84px;
/*        top: 25px;
        left: 10px;*/
        transform: none;
        padding: 8px 12px;
        font-size: 24px;
        max-width: calc(100vw - 20px);
        white-space: normal;
        text-align: center;
        box-sizing: border-box;
        bottom: auto;
        background: none;
    }

    .viewer-share {
        top: 23px;
        right: 87px;
        font-size: 24px;
        padding: 6px 10px;
        background: none;
    }

	.viewer-close {
	    position: absolute;
	    top: 20px;
	    right: 20px;
	    font-size: 52px;
            background: none;
	}

	.image-viewer .viewer-prev, 
    .image-viewer .viewer-next {
		position: absolute;
		top: 25px;
		font-size: 13px;
		padding: 0;
		width: 22px;
		height: 22px;
		transform: none;
		line-height: 1;
		text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
        background: none;
	}

	.image-viewer .viewer-prev {
		left: 50%;
		margin-left: -22px;
	}

	.image-viewer .viewer-next {
		left: 50%;
	}
        .viewer-image-container {
		flex: 1;
		width: 100%;
		height: 100%;
		padding-top: env(safe-area-inset-top, 44px);
		padding-bottom: env(safe-area-inset-bottom, 34px);
		box-sizing: border-box;
	  }
    
    .viewer-toggle-info {
        position: absolute;
        top: max(54px, calc(env(safe-area-inset-top, 44px) + 10px)) !important;
        right: max(10px, env(safe-area-inset-right, 10px)) !important;
        width: 44px;
        height: 44px;
/*        font-size: 24px;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 22px;
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.3);*/
        z-index: 10005 !important;
/*        display: flex;
        align-items: center;
        justify-content: center;*/
    }
    
    .viewer-info-panel {
        position: absolute !important;
        bottom: max(44px, calc(env(safe-area-inset-bottom, 34px) + 10px)) !important;
        left: max(10px, env(safe-area-inset-left, 10px)) !important;
        right: max(10px, env(safe-area-inset-right, 10px)) !important;
        top: auto !important;
        z-index: 10004 !important;
        overflow-y: auto;
    }
    
    .viewer-info-panel.visible {
        display: block !important;
    }
    
    .viewer-info-table {
        width: 100%;
        color: white;
    }
    
    .viewer-info-table td {
/*        padding: 6px 4px;
        font-size: 13px;*/
        max-width: calc(50vw - 40px);
        word-break: break-word;
    }
    
    .viewer-info-table strong {
/*        color: #ffaa00;*/
    }
    
    /* Скрываем старые позиционирования */
    .viewer-info-panel[style*="bottom: 0"] {
        bottom: max(44px, calc(env(safe-area-inset-bottom, 34px) + 10px)) !important;
    }
	.remark42window {
	    position: fixed;
	    width: 100%; 
	    height: 95%;
	    background-color: black;
	    display: none;
	    z-index: 10005;
	    overflow-y: auto;
	    padding: 20px;
	}

}

@media (max-width: 480px) {
    .active-filters { 
        padding: 6px; 
        gap: 6px; 
    }
    
    .filter-tag { 
        max-width: 140px; 
        padding: 3px 5px; 
    }
    
    .clear-all-btn { 
        padding: 5px 8px; 
        font-size: 10.5px; 
    }
    
    .preservation-filters select,
    .size-filters select,
    .range-filter-controls select {
        font-size: 5px;
        height: 14px;
        padding: 0;
    }
   .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, 87px);
   }
	.thumbnail-container {
	    width: 87px;
	    height: 87px;
	}
}

.thumbnail-comments {
	position: absolute;
	top: 0px;
	z-index: 10;
	min-width: 18px;
}

.thumbnail-comments .remark42__counter {
	color: white !important;
	font-size: 10px !important;
	font-weight: bold !important;
	border-radius: 0px;
	top: 0px;
	right: 5px;
	background-color: rgba(14, 142, 255, 0.7);
}

.thumbnail-comments:empty {
    display: none !important;
}

.expand-width-btn {
    border: 1px solid #939393;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-left: 2px;
    height: 20px;
    width: 28px;
    background: #f0f0f0;
}

.expand-width-btn:hover {
    background: #e0e0e0;
}

.expand-width-btn[data-expanded="true"] {
    background: #d0e8ff;
    border-color: #007cba;
    color: #007cba;
}

.expand-width-btn[data-expanded="true"]:hover {
    background: #b8d8f0;
}

.export-dropdown {
    position: relative;
}

.export-dropdown-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    z-index: 1000;
    min-width: 80px;
}

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

.export-dropdown-option {
    display: block;
    width: 100%;
    padding: 6px 12px;
    border: none;
    background: none;
    cursor: pointer;
}

.export-dropdown-option:hover {
    background: #f5f5f5;
}

.stats-section {
    display: flex;
    gap: 10px;
    margin-bottom: 2px;
}

.stats-grid {
    flex: 1;
}

.controls-panel {
/*    background: #fff;*/
/*    padding: 5px;*/
/*    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #ddd;*/
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 1px;
    height: calc(2 * (19px + 5px));
/*    width: 150px;*/
}

.copy-message {
    position: fixed;
    background: #53A5E7;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 19999;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-message.visible {
    opacity: 1;
}

.viewer-map-link ,
.viewer-title-link {
    color: #7CA4F7;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.viewer-map-link:hover,
.viewer-title-link:hover {
    color: #F58650;
    text-decoration: none;
}

.viewer-title-link {
    font-weight: bold;
}

.dual-filter .filter-label {
    margin-bottom: 2px;
}

.dual-checkboxes {
    display: flex;
    gap: 0px;
    justify-content: center;
}

.filter-checkbox-yes {
    accent-color: #4CAF50;
}

.filter-checkbox-no {
    accent-color: #f44336;
}

.filter-checkbox-yes, .filter-checkbox-no {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.controls-panel {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 1px;
    height: calc(2 * (19px + 5px));
}

.percent-btn-global,
.shareFiltersBtn {
    border: 1px solid #939393;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    height: 20px;
    width: 28px;
    background: #e9e9ed;
}

.percent-btn-global:hover,
.shareFiltersBtn:hover {
    background: #e0e0e0;
}

.percent-btn-global[data-active="true"] {
    background: #d0e8ff;
    border-color: #007cba;
    color: #007cba;
}