/* ============================================
   PHOTO/VIDEO MARKER & MODAL STYLES
   ============================================ */

.photo-marker {
    background: transparent;
    border: none;
}

.photo-marker-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.8));
    animation: pulsePhoto 2s ease-in-out infinite;
    cursor: pointer;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 50%;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.video-marker-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(255, 100, 100, 0.8));
    animation: pulseVideo 2s ease-in-out infinite;
    cursor: pointer;
    background: rgba(255, 100, 100, 0.1);
    border-radius: 50%;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

@keyframes pulsePhoto {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.8));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(0, 212, 170, 1));
    }
}

@keyframes pulseVideo {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(255, 100, 100, 0.8));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(255, 100, 100, 1));
    }
}

/* Photo Modal */
#photo-modal,
#camera-modal {
    max-width: 100vw;
    max-height: 90vh; /* Desktop: angemessene Höhe */
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

/* iOS Safari spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    #photo-modal,
    #camera-modal {
        max-height: 100dvh; /* iOS: volle Höhe */
    }
    
    @supports (height: -webkit-fill-available) {
        #photo-modal,
        #camera-modal {
            max-height: -webkit-fill-available;
        }
    }
}

#photo-modal .modal-content,
#camera-modal .modal-content {
    background: var(--bg-panel, rgba(10, 14, 20, 0.95));
    border: 1px solid var(--border-primary, #1a3a4a);
    border-left: 3px solid var(--accent-cyan, #00d4aa);
    color: var(--text-primary, #e0f0e8);
    max-height: calc(90vh - 100px); /* Desktop: angemessene Höhe */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* iOS Safari spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    #photo-modal .modal-content,
    #camera-modal .modal-content {
        max-height: calc(100dvh - 100px); /* iOS: volle Höhe */
    }
    
    @supports (height: -webkit-fill-available) {
        #photo-modal .modal-content,
        #camera-modal .modal-content {
            max-height: calc(-webkit-fill-available - 100px);
        }
    }
}
    position: relative;
}

#photo-modal h4,
#camera-modal h4 {
    font-family: 'Orbitron', 'Share Tech Mono', monospace;
    color: var(--text-accent, #00ffcc);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Auto-GPS-Upload Checkbox */
.autogps-upload-container {
    margin: 15px 0;
    padding: 12px;
    background: rgba(0, 40, 35, 0.3);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-left: 3px solid var(--accent-cyan, #00d4aa);
    border-radius: 4px;
}

.autogps-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    color: var(--text-primary, #e0f0e8);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
}

.autogps-upload-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-cyan, #00d4aa);
    flex-shrink: 0;
}

.autogps-upload-label span {
    color: var(--text-primary, #e0f0e8);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.autogps-upload-label:hover {
    color: var(--text-accent, #00ffcc);
}

.autogps-upload-label:hover span {
    color: var(--text-accent, #00ffcc);
}

#photo-image,
#preview-image {
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.3);
}

.camera-container {
    text-align: center;
    margin: 20px 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-video {
    max-width: 100%;
    max-height: 50vh;
    border: 1px solid var(--border-primary, #1a3a4a);
    border-radius: 4px;
    background: #000;
    display: none;
}

.camera-placeholder {
    padding: 40px;
    color: var(--text-secondary, #8ba89e);
    border: 1px dashed var(--border-primary, #1a3a4a);
    border-radius: 4px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.placeholder-icon {
    font-size: 48px;
    opacity: 0.6;
    filter: drop-shadow(0 0 10px rgba(0, 212, 170, 0.3));
}

.placeholder-text {
    font-family: 'Share Tech Mono', monospace;
    text-align: center;
    line-height: 1.6;
}

.placeholder-text small {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary, #8ba89e);
    opacity: 0.8;
    font-size: 0.85em;
}

.camera-buttons {
    text-align: center;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.camera-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
}

.camera-btn {
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(20, 35, 45, 0.9) 0%, rgba(10, 20, 30, 0.95) 100%);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-left: 3px solid var(--accent-cyan, #00d4aa);
    color: var(--text-primary, #e0f0e8);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    border-radius: 0;
    line-height: 1;
    height: auto;
    vertical-align: middle;
}

.camera-btn:hover {
    background: linear-gradient(180deg, rgba(0, 50, 60, 0.9) 0%, rgba(0, 30, 40, 0.95) 100%);
    border-color: var(--accent-cyan, #00d4aa);
    color: var(--text-accent, #00ffcc);
    box-shadow: 0 0 12px rgba(0, 212, 170, 0.4);
    transform: translateY(-1px);
}

.camera-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

.camera-btn .btn-icon {
    font-size: 1.4rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 0 4px rgba(0, 212, 170, 0.5));
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
}

.camera-btn:hover .btn-icon {
    filter: drop-shadow(0 0 6px rgba(0, 212, 170, 0.8));
}

.camera-btn .btn-text {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.upload-status {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 60, 50, 0.3);
    border: 2px solid var(--accent-cyan, #00d4aa);
    border-radius: 4px;
}

.upload-status-title {
    color: var(--accent-cyan, #00ffcc);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    margin-bottom: 10px;
}

.upload-progress {
    color: var(--text-secondary, #8ba89e);
    font-size: 0.85rem;
    font-family: 'Share Tech Mono', monospace;
}

.media-preview {
    text-align: center;
    margin: 20px 0;
}

.preview-image,
.preview-video {
    max-width: 100%;
    max-height: 50vh;
    border: 1px solid var(--border-primary, #1a3a4a);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.2);
}

.preview-video {
    width: 100%;
    max-width: 100%;
}

.preview-hint {
    color: var(--text-secondary, #8ba89e);
    font-size: 0.8rem;
    margin-top: 10px;
    font-family: 'Share Tech Mono', monospace;
}

.preview-file-info {
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-radius: 4px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary, #8a9ba8);
}

.preview-file-type {
    font-weight: 600;
    color: var(--accent-cyan, #00d4aa);
    margin-bottom: 4px;
    font-family: 'Share Tech Mono', monospace;
}

.preview-file-size {
    color: var(--text-secondary, #8a9ba8);
    font-size: 0.7rem;
    font-family: 'Share Tech Mono', monospace;
}

#photo-modal .modal-footer,
#camera-modal .modal-footer {
    background: transparent;
    border-top: 1px solid var(--border-primary, #1a3a4a);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
}

#photo-modal .btn,
#camera-modal .btn {
    background: linear-gradient(180deg, rgba(0, 60, 50, 0.9) 0%, rgba(0, 40, 35, 0.95) 100%);
    border: 1px solid var(--accent-cyan, #00d4aa);
    color: var(--text-accent, #00ffcc);
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    min-width: 140px;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
    border-radius: 0;
    vertical-align: middle;
    height: auto;
}

#photo-modal .btn:hover,
#camera-modal .btn:hover {
    background: linear-gradient(180deg, rgba(0, 80, 70, 0.9) 0%, rgba(0, 60, 50, 0.95) 100%);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.5);
    transform: translateY(-1px);
}

#photo-modal .btn:active,
#camera-modal .btn:active {
    transform: translateY(0);
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

/* Zentriere Icon und Text im Button */
#photo-modal .btn,
#camera-modal .btn {
    font-size: 0.85rem;
}

#photo-modal .btn::before,
#camera-modal .btn::before {
    content: '';
    display: none;
}

/* Stelle sicher, dass Emoji-Icons und Text vertikal zentriert sind */
#photo-modal .btn,
#camera-modal .btn {
    text-align: center;
}

#capture-photo,
#retake-photo,
#save-photo,
#upload-photo,
#upload-video {
    font-size: 0.85rem;
    padding: 14px 24px;
    margin: 0 4px;
    min-width: 140px;
    background: linear-gradient(180deg, rgba(20, 35, 45, 0.9) 0%, rgba(10, 20, 30, 0.95) 100%);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-left: 3px solid var(--accent-cyan, #00d4aa);
    color: var(--text-primary, #e0f0e8);
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    border-radius: 0;
}

#capture-photo:hover,
#retake-photo:hover,
#save-photo:hover,
#upload-photo:hover,
#upload-video:hover {
    background: linear-gradient(180deg, rgba(0, 50, 60, 0.9) 0%, rgba(0, 30, 40, 0.95) 100%);
    border-color: var(--accent-cyan, #00d4aa);
    color: var(--text-accent, #00ffcc);
    box-shadow: 0 0 12px rgba(0, 212, 170, 0.4);
    transform: translateY(-1px);
}

#capture-photo:active,
#retake-photo:active,
#save-photo:active,
#upload-photo:active,
#upload-video:active {
    transform: translateY(0);
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.3);
}

#camera-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#camera-buttons > div {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

#photo-file-input {
    display: none;
}

#photo-upload-status {
    text-align: center;
    padding: 15px;
    background: rgba(0, 60, 50, 0.3);
    border: 1px solid var(--accent-cyan, #00d4aa);
    border-radius: 4px;
    margin: 20px 0;
}

#upload-progress {
    margin-top: 10px;
    color: var(--text-secondary, #8ba89e);
    font-size: 0.8rem;
    font-family: 'Share Tech Mono', monospace;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #photo-modal,
    #camera-modal {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        position: fixed !important;
        overflow: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
    
    #photo-modal .modal-content,
    #camera-modal .modal-content {
        padding: 12px;
        max-width: 100vw;
        width: 100%;
        margin: 0;
        max-height: 100dvh;
        height: 100dvh;
        overflow-y: scroll !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 0;
        position: relative;
        overscroll-behavior: contain;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: scroll-position;
        box-sizing: border-box;
    }
    
    /* iOS Safari spezifische Fixes */
    @supports (-webkit-touch-callout: none) {
        #photo-modal,
        #camera-modal {
            height: -webkit-fill-available !important;
            max-height: -webkit-fill-available !important;
        }
        
        #photo-modal .modal-content,
        #camera-modal .modal-content {
            height: -webkit-fill-available !important;
            max-height: -webkit-fill-available !important;
        }
    }
    
    #photo-modal h4,
    #camera-modal h4 {
        font-size: 0.9rem;
        padding: 12px;
    }
    
    .camera-container {
        min-height: 150px;
        max-height: 40vh;
        margin: 10px 0;
        overflow: hidden;
    }
    
    .camera-video {
        max-height: 40vh;
        max-width: 100%;
        width: auto;
        height: auto;
    }
    
    .camera-placeholder {
        padding: 30px 20px;
    }
    
    .placeholder-icon {
        font-size: 36px;
    }
    
    .camera-buttons-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .camera-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 16px;
        font-size: 0.8rem;
    }
    
    #capture-photo,
    #retake-photo,
    #save-photo,
    #upload-photo,
    #upload-video {
        width: 100%;
        min-width: auto;
        margin: 4px 0;
        padding: 14px 16px;
        font-size: 0.8rem;
    }
    
    .preview-image,
    .preview-video {
        max-height: 40vh;
    }
    
    #photo-modal .modal-footer,
    #camera-modal .modal-footer {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-panel, rgba(10, 14, 20, 0.98));
        border-top: 1px solid var(--border-primary, #1a3a4a);
        z-index: 10;
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Padding am Content-Bottom für Footer */
    #photo-modal .modal-content,
    #camera-modal .modal-content {
        padding-bottom: 100px !important;
    }
    
    #photo-modal .btn,
    #camera-modal .btn {
        width: 100%;
        min-width: auto;
        padding: 12px 16px;
    }
    
    /* Verhindere Body-Scroll wenn Modal offen */
    body.modal-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        touch-action: none;
        -webkit-overflow-scrolling: none;
    }
    
    /* iOS spezifische Fixes */
    @supports (-webkit-touch-callout: none) {
        #photo-modal,
        #camera-modal {
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
        
        #photo-modal .modal-content,
        #camera-modal .modal-content {
            -webkit-overflow-scrolling: touch !important;
            overflow-y: scroll !important;
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
            height: 100vh !important;
            max-height: 100vh !important;
        }
    }
}

/* Photo Metadaten Styles */
#photo-metadata {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-primary, #1a3a4a);
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.6;
}

#photo-metadata h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--accent-cyan, #00d4aa);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-primary, #1a3a4a);
    padding-bottom: 8px;
}

#photo-metadata-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 15px;
    text-align: left;
}

#photo-metadata-content > div:nth-child(odd) {
    color: var(--text-secondary, #8a9ba8);
    font-weight: 500;
}

#photo-metadata-content > div:nth-child(even) {
    color: var(--text-primary, #e0f0e8);
}

/* Responsive für Mobile */
@media (max-width: 600px) {
    #photo-metadata {
        padding: 10px;
        font-size: 0.7rem;
    }
    
    #photo-metadata-content {
        gap: 6px 10px;
    }
        
        body.modal-open {
            position: fixed !important;
            overflow: hidden !important;
            width: 100% !important;
            height: 100% !important;
            -webkit-overflow-scrolling: none !important;
        }
    }
    
    .upload-status {
        padding: 15px;
        margin: 15px 0;
    }
    
    .upload-status-title {
        font-size: 0.9rem;
    }
    
    .upload-progress {
        font-size: 0.75rem;
    }
    
    .media-preview {
        margin: 15px 0;
    }
    
    .preview-hint {
        font-size: 0.75rem;
        padding: 0 10px;
    }
}

