.top-bar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    width: 100%;
    margin-bottom: 15px;
} 

#title {
    font-size: 2rem;
    font-weight: 600;
    color: #2b2b2b;
    height: 100%;
    background-color: rgb(255, 255, 255);
    display: flex;
    align-items: center;
    padding: 0px 20px;
    border-radius: 0px 0px 15px 15px;
    user-select: text;
}

#template-info-container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 165px);
    gap: 20px;
}

.left-section {
    max-width: 97.7%;
    width: 100%;
    margin-bottom: 20px;
    margin-left: 20px;
    display: flex;
    justify-content: center;
}  

#image-wrapper {
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
}

#dots-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2;
}

#image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default !important;
}

#image:hover {
    cursor: default !important;
}

.right-section {
    background-color: rgb(255, 255, 255);
    margin-bottom: 20px;
    margin-right: 20px;
    padding: 15px;
    padding-left: 22px;
    border-radius: 15px;
    min-width: 300px;
    max-width: 30%;
    width: 100%;
    overflow-y: auto;
    user-select: text;
}
#posts-bar {
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

#filter-button {
    font-size: 1.2rem;
    font-weight: 400;
    color: #646464;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

.map-dot {
    position: absolute;
    width: 15px; 
    height: 15px;
    background: #a33f3f;
    border-radius: 50%;
    border: 3px solid #292929;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 2;
    transition: transform 0.2s, background 0.2s, border 0.2s;
    cursor: pointer;
}

.map-dot.custom-blue-dot {
    background: #4683c4;
    border: 3px solid #292929;
    animation: dotAppear 0.5s ease-out;
}

.map-dot.custom-blue-dot.removing {
    animation: dotDisappear 0.5s ease-in forwards;
}

@keyframes dotAppear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes dotDisappear {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

.map-dot.active {
    transform: translate(-50%, -50%) scale(1.7);
    background: #3fa362;
    border: 2px solid #292929;
    z-index: 10;
}

#mouse-coords-tooltip {
    position: fixed;
    z-index: 1000;
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: inherit;
    pointer-events: none;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.18);
    transition: opacity 0.1s;
    opacity: 0.95;
    user-select: none;
}

.read-more, .hide-desc {
    color: #4683c4;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 500;
}

.read-more:hover, .hide-desc:hover {
    text-decoration: underline;
}

.desc-full, .desc-full.expanded {
    display: inline;
    vertical-align: middle;
    transition: opacity 0.25s;
    opacity: 0;
    max-width: 0;
    max-height: 0;
    overflow: hidden;
}

.desc-full.expanded {
    opacity: 1;
    max-width: 1000px;
    max-height: 600px;
}

.dot-tooltip {
    position: fixed;
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1000;
    width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    display: flex;
    flex-direction: column;
    transform-origin: center bottom;
    will-change: opacity, visibility;
}

.dot-tooltip:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(30, 30, 30, 0.95);
}

/* Стилі для стрілки, коли підказка відображається знизу точки */
.dot-tooltip.tooltip-bottom:after {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom: 8px solid rgba(30, 30, 30, 0.95);
}

.dot-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.tooltip-content {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 50px;
}

.tooltip-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 8px 8px;
    pointer-events: auto;
    flex-shrink: 0;
}

.tooltip-nav-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
    transition: opacity 0.2s;
    pointer-events: auto;
}

.dot-tooltip:not(.visible) .tooltip-nav-btn {
    cursor: default;
    pointer-events: none;
}

.tooltip-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tooltip-nav-btn:not(:disabled):hover {
    opacity: 0.8;
}

.tooltip-counter {
    color: #fff;
    font-size: 0.9rem;
    pointer-events: none;
}

.dot-tooltip-title {
    font-weight: 600;
    margin-bottom: 0px;
    color: #fff;
    pointer-events: none;
}

.dot-tooltip-coordinates {
    font-size: 0.90rem;
    color: #aaa;
    margin-bottom: 8px;
    pointer-events: none;
    font-family: monospace;
}

.dot-tooltip-description {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 5px;
    pointer-events: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
}

.dot-tooltip-link {
    font-size: 0.9rem;
    color: #4683c4;
    text-decoration: none;
    display: block;
    margin-top: 5px;
    cursor: pointer;
    pointer-events: auto;
}

.dot-tooltip-link:hover {
    text-decoration: none;
}

.tooltip-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}