/* Bűntérkép - Fő stílusok */

/* Alapértelmezett reset */
body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Open Sans', sans-serif;
}

/* Térkép */
#map { 
    position: absolute; 
    top: 0; 
    bottom: 0; 
    width: 100%; 
}

/* Menü (réteg váltó) - Bootstrap stílus */
#menu {
    background: rgba(248, 249, 250, 0.85);
    position: absolute;
    z-index: 1000;
    top: 10px;
    right: 10px;
    border-radius: 0.375rem;
    width: 250px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-family: 'Open Sans', sans-serif;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    display: none;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-height: 400px;
    overflow-y: auto;
}

#menu a {
    font-size: 14px;
    color: #212529;
    display: block;
    margin: 0;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: all 0.15s ease-in-out;
    background: transparent;
}

#menu a:last-child {
    border-bottom: none;
}

#menu a:hover {
    background-color: rgba(255, 255, 255, 0.7);
    color: #495057;
}

#menu a.active {
    background-color: rgba(108, 117, 125, 0.9);
    color: #fff;
    font-weight: 500;
}

#menu a.active:hover {
    background-color: rgba(73, 80, 87, 0.9);
    color: #fff;
}

/* Menü ikonok */
#menu a i {
    width: 16px;
    text-align: center;
}

#menu a .me-2 {
    margin-right: 0.5rem !important;
}

/* Admin belépés gomb - Bootstrap stílus */
#admin-link {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #212529;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.15s ease-in-out;
    font-weight: 500;
}

#admin-link:hover {
    background: #f8f9fa;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Marker osztályok */
.nyomortelep {
    background-image: url('../icons/marker_nyomortelep.png');
    background-size: cover;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}

.terulet {
    background-image: url('../icons/marker_terulet.png');
    background-size: cover;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}

/* Mapbox popup testreszabás */
.mapboxgl-popup {
    max-width: 320px !important;
}

.mapboxgl-popup-close-button {
    background-color: lightgray !important;
}

.mapboxgl-popup-content {
    text-align: center;
    font-family: 'Open Sans', sans-serif;
}

/* Popup tartalom elemek */
.forras {
    background-color: lightgray;
    margin-top: 20px;
    padding: 5px;
    border-radius: 3px;
    font-size: 12px;
    overflow: hidden;
}

.kep {
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    border-radius: 5px;
    margin: 10px 0;
}

/* Welcome Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    font-family: 'Open Sans', sans-serif;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 16px 0;
    line-height: 1.6;
    color: #495057;
    font-size: 16px;
}

.modal-body ul {
    margin: 16px 0;
    padding-left: 24px;
}

.modal-body li {
    margin: 8px 0;
    line-height: 1.5;
    color: #495057;
}

.modal-body strong {
    color: #212529;
    font-weight: 600;
}

.modal-footer {
    padding: 16px 24px 24px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.btn-start {
    background: linear-gradient(135deg, #74b9ff 0%, #6c5ce7 100%);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(116, 185, 255, 0.3);
    font-family: 'Open Sans', sans-serif;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(116, 185, 255, 0.4);
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.btn-start:active {
    transform: translateY(0);
}

/* POI képek stílusai */
.poi-images {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.poi-image {
    max-width: 90%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.poi-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.poi-image-container.expanded {
    position: fixed !important;
    top: 20%;
    left: 20%;
    padding: 20px !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10000 !important;
    max-width: 90vw;
    width: 50vw;
    max-height: 90vh;
    margin: 50px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    gap: 10px;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 15px;
        width: calc(100% - 30px);
        max-height: 85vh;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body p, .modal-body li {
        font-size: 14px;
    }
}

/* GPS koordináta kijelző */
#coordinates {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(248, 249, 250, 0.95);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #212529;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease-in-out;
    pointer-events: auto;
    user-select: none;
    cursor: pointer;
    opacity: 0.7;
}

#coordinates:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    opacity: 1;
}

#coordinates.hidden {
    opacity: 0;
    pointer-events: none;
}

#coordinates .coord-label {
    font-weight: 600;
    color: #495057;
}

#coordinates .coord-value {
    color: #007bff;
    margin-left: 0.25rem;
}

.poi-image-container {
    margin-bottom: 15px;
    text-align: center;
}

.poi-image-container:last-child {
    margin-bottom: 0;
}

.poi-image-caption {
    font-size: 12px;
    color: #1da1f2;
    font-style: italic;
    margin-top: 5px;
    padding: 0 5px;
    line-height: 1.3;
}

/* Kinagyított kép esetén nagyobb aláírás */
.poi-image.expanded + .poi-image-caption {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-top: 10px;
}

/* Koordináta kijelző mobil optimalizálás */
@media (max-width: 768px) {
    #coordinates {
        font-size: 10px;
        padding: 0.25rem 0.5rem;
        bottom: 5px;
        left: 5px;
    }
}

/* Kalibráció panel */
#calibration-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1001;
    min-width: 300px;
    max-width: 400px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    font-family: 'Open Sans', sans-serif;
}

.calibration-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calibration-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.btn-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.calibration-body {
    padding: 1rem;
}

.calibration-instructions {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.calibration-instructions ol {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.calibration-instructions li {
    margin-bottom: 0.25rem;
}

#calibration-points {
    margin-bottom: 1rem;
}

.coord-point {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.coord-point.selected {
    background: #e3f2fd;
    border-color: #2196f3;
    box-shadow: 0 0 0 0.125rem rgba(33, 150, 243, 0.25);
}

.coord-point label {
    font-weight: 600;
    color: #495057;
    margin: 0;
    min-width: 80px;
}

.coord-display {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.1875rem;
    border: 1px solid #ced4da;
    min-width: 120px;
    text-align: center;
}

.coord-display.filled {
    color: #28a745;
    border-color: #28a745;
    background: #f8fff9;
}

.calibration-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-reset, .btn-save, .btn-test {
    padding: 0.375rem 0.75rem;
    border: 1px solid;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-reset {
    color: #6c757d;
    background: white;
    border-color: #6c757d;
}

.btn-reset:hover {
    color: white;
    background: #6c757d;
}

.btn-save {
    color: #28a745;
    background: white;
    border-color: #28a745;
}

.btn-save:hover {
    color: white;
    background: #28a745;
}

.btn-test {
    color: #17a2b8;
    background: white;
    border-color: #17a2b8;
}

.btn-test:hover {
    color: white;
    background: #17a2b8;
}

.calibration-marker {
    width: 20px;
    height: 20px;
    background: #ff4444;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calibration-marker:hover {
    transform: scale(1.2);
    background: #ff6666;
}

.calibration-marker.selected {
    background: #00ff00;
    border-color: #fff;
    transform: scale(1.3);
}

/* Mobil nézet kalibráció */
@media (max-width: 768px) {
    #calibration-panel {
        left: 5px;
        right: 5px;
        top: 5px;
        min-width: auto;
        max-width: none;
    }
    
    .calibration-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-reset, .btn-save, .btn-test {
        width: 100%;
        justify-content: center;
    }
    
    .coord-point {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .coord-display {
        align-self: stretch;
        text-align: center;
    }
}
