/* ===== Működési terület – csatornázás térkép ===== */
.mtcs-map-wrap { position: relative; }

.mtcs-map {
    width: 100%;
    height: 620px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
}

.mtcs-map-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mtcs-map-control-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: #fff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .15s;
}

.mtcs-map-control-btn:hover { background: #f1f5f9; transform: translateY(-1px); }

.mtcs-legend {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 10;
    background: rgba(255, 255, 255, .96);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
    max-width: 320px;
    max-height: 70%;
    overflow-y: auto;
    font-size: 12.5px;
    line-height: 1.35;
}

.mtcs-legend-title { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; text-decoration: underline; }
.mtcs-legend-section { font-weight: 700; margin: 8px 0 4px; }
.mtcs-legend-list { list-style: none; margin: 0 0 4px; padding: 0; }
.mtcs-legend-list li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }

.mtcs-legend-area { cursor: pointer; border-radius: 5px; padding: 2px 4px !important; }
.mtcs-legend-area:hover { background: #eef2f7; }

.mtcs-legend-swatch {
    flex: 0 0 auto;
    width: 18px;
    height: 14px;
    border: 1px solid #888;
    border-radius: 2px;
}

/* Marker formák */
.mtcs-legend-marker,
.mtcs-marker {
    --mtcs-c: #e54c00;
    flex: 0 0 auto;
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--mtcs-c);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}

.mtcs-shape-circle { border-radius: 50%; }
.mtcs-shape-square { border-radius: 2px; }
.mtcs-shape-octagon {
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    border-radius: 0;
}
.mtcs-shape-triangle {
    background: transparent;
    border: none;
    box-shadow: none;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 16px solid var(--mtcs-c);
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, .6));
}

.mtcs-marker-wrap { background: none; border: none; }
.mtcs-marker { width: 20px; height: 20px; }

/* --- Modal --- */
.mtcs-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mtcs-modal.is-open { display: flex; }

.mtcs-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}

.mtcs-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 86vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    animation: mtcs-modal-in .18s ease-out;
}

@keyframes mtcs-modal-in {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mtcs-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.mtcs-modal-header { padding: 20px 22px 12px; border-bottom: 1px solid #eef2f7; }
.mtcs-modal-swatch {
    display: inline-block;
    width: 26px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid #888;
    vertical-align: middle;
    margin-right: 8px;
}
.mtcs-modal-title { display: inline; font-size: 19px; font-weight: 700; }
.mtcs-modal-uzem { margin-top: 6px; color: #64748b; font-size: 13px; }
.mtcs-modal-body { padding: 16px 22px 22px; }
.mtcs-modal-section { margin-bottom: 16px; }
.mtcs-modal-section h4 { font-size: 14px; font-weight: 700; margin: 0 0 8px; color: #0f172a; }

.mtcs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mtcs-chip { background: #eef2f7; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: #334155; }

.mtcs-list { list-style: none; margin: 0; padding: 0; }
.mtcs-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; }

.mtcs-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    border: 1px solid rgba(0, 0, 0, .25);
}

.mtcs-popup .mtcs-popup-row { font-size: 12.5px; color: #475569; margin-top: 3px; }

@media (max-width: 575px) {
    .mtcs-map { height: 460px; }
    .mtcs-legend { max-width: 220px; font-size: 11.5px; }
}

/* ===== Teljes képernyő ===== */
.mtcs-terulet-app:fullscreen,
.mtcs-terulet-app:-webkit-full-screen,
.mtcs-terulet-app:-moz-full-screen,
.mtcs-terulet-app.mtcs-pseudo-fullscreen {
    background: #fff;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mtcs-terulet-app.mtcs-pseudo-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 99990;
    overflow: hidden;
}

.mtcs-terulet-app:fullscreen .mtcs-map-wrap,
.mtcs-terulet-app:-webkit-full-screen .mtcs-map-wrap,
.mtcs-terulet-app:-moz-full-screen .mtcs-map-wrap,
.mtcs-terulet-app.mtcs-pseudo-fullscreen .mtcs-map-wrap {
    flex: 1 1 auto;
    margin: 0;
    height: 100%;
}

.mtcs-terulet-app:fullscreen .mtcs-map,
.mtcs-terulet-app:-webkit-full-screen .mtcs-map,
.mtcs-terulet-app:-moz-full-screen .mtcs-map,
.mtcs-terulet-app.mtcs-pseudo-fullscreen .mtcs-map {
    height: 100% !important;
    border-radius: 0;
}
