/* =========================================================
   Modais reutilizáveis (imagem / pannellum / login)
   Usado por: mapa.blade.php e demais views via modal.blade.php
   ========================================================= */

/* --- Imagem / Pannellum (fullscreen) transparente --- */
#picture .modal-body {
    background: transparent !important;
    padding: 0;
}

#picture .modal-content {
    background: transparent !important;
    box-shadow: none;
}

/* --- Modal de login: fundo branco com imagem de padrão repetida --- */
#loginModal {
    --login-pattern: none;
    --login-pattern-opacity: 0;
}

#loginModal .modal-content {
    background-color: #ffffff;
    background-image: var(--login-pattern);
    background-repeat: repeat;
    background-size: auto;
    background-position: center;
    background-blend-mode: overlay;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Camada semitransparente para legibilidade dos campos sobre o padrão */
#loginModal .modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
    opacity: var(--login-pattern-opacity);
    border-radius: 0.5rem;
    pointer-events: none;
}

#loginModal .modal-header,
#loginModal .modal-body {
    position: relative;
    z-index: 1;
}

#loginModal .modal-body {
    background: transparent !important;
    padding: 1.25rem;
}

#loginModal .modal-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* --- Conteúdo do modal de imagem --- */
#modalPicture img {
    position: fixed;   /* <- chave para ignorar interferência do Leaflet */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-primary {
    opacity: 0.8;
}

.btn-primary:hover {
    opacity: 1;
}

/* Control Image */
#viewer {
    position: relative;
    overflow: hidden;
    touch-action: none; /* essencial para mobile */
}

#viewer img {
    max-width: none; /* importante para zoom funcionar */
    user-select: none;
    cursor: grab;
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.25s ease;
}

.custom-marker {
    border-radius: 8px;
    border: 2px solid white;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

/* --- Modal EXIF (admin): altura total com abas --- */
#exifModal .modal-body {
    background: #ffffff;
    padding: 0;
}

#exifModal .exif-content {
    height: calc(100vh - 118px);
    overflow: auto;
}

#exifModal pre.exif-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.78rem;
}

.exif-struct {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.exif-struct ul {
    list-style: none;
    padding-left: 1.25rem;
    margin: 0;
}

.exif-struct li {
    padding: 2px 0;
    font-size: 0.82rem;
    line-height: 1.45;
}

.exif-struct .key {
    font-weight: 600;
    color: #0d6efd;
}

.exif-struct .value {
    color: #212529;
}

.exif-struct .value.muted {
    color: #adb5bd;
}