/* Map Container Fix */
.map-active #app-main {
    position: fixed;
    top: 56px; /* Header */
    left: 0;
    right: 0;
    bottom: 64px; /* Navigation */
    padding: 0;
}

.map-active #map {
    width: 100%;
    height: 100%;
}

/* Z-Index Hierarchie */
#app-header {
    z-index: 1000;
}

#app-nav {
    z-index: 1000;
}

/* Toasts über allem */
.fixed.top-20 {
    z-index: 10000 !important;
}

/* Leaflet Controls */
.leaflet-control-container {
    z-index: 500;
}

/* User Location Marker CSS statt Tailwind */
.user-location-marker {
    width: 32px;
    height: 32px;
}

.user-location-marker .absolute {
    position: absolute;
    width: 32px;
    height: 32px;
    background-color: #60a5fa;
    border-radius: 50%;
    opacity: 0.75;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.user-location-marker .relative {
    position: relative;
    width: 32px;
    height: 32px;
    background-color: #3b82f6;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-location-marker .w-3 {
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Map Control Buttons */
.map-control-btn {
    z-index: 2000;
    position: relative;
}

/* Stelle sicher, dass sie auch auf Mobile sichtbar sind */
@media (max-width: 768px) {
    .map-control-btn {
        z-index: 2000;
    }
}

/* Minimale Version - Alle Links schwarz/dunkelgrau */
a {
    color: #1f2937 !important; /* Dunkelgrau */
    text-decoration: none;
}

a:hover {
    color: #000000 !important; /* Schwarz */
    text-decoration: underline;
}

/* Buttons sollen ihre Farben behalten */
.btn a,
.button a,
[class*="btn-"] a,
a.btn,
a.button,
a[class*="btn-"] {
    color: inherit !important;
    text-decoration: none !important;
}

/* Footer Styles */
#app-footer {
    /* Stelle sicher, dass Footer über Map aber unter Navigation ist */
    z-index: 900;
}

/* Anpassung für Main Content mit Footer */
#app-main {
    padding-bottom: 6rem; /* Platz für Navigation (4rem) + Footer (2rem) */
}

/* Footer Links */
#app-footer a {
    text-decoration: none;
    transition: color 0.2s;
}

#app-footer a:hover {
    text-decoration: underline;
}

/* Responsive Footer */
@media (max-width: 640px) {
    #app-footer {
        font-size: 0.625rem; /* Noch kleiner auf Mobile */
    }
}
/* custom.css - Füge Animation hinzu */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse 1s ease-in-out;
}

/* Badge Styling für bessere Sichtbarkeit */
#notification-badge {
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}
/* FAB Button Z-Index Fix */
.fixed.bottom-20.right-4 {
    z-index: 2000 !important; /* Über allem außer Modals */
}

/* Alternativ spezifischer für den FAB Button */
#fab-button,
.fab-button,
button[onclick*="showCreatePost"] {
    z-index: 4000 !important;
}

/* Stelle sicher dass der FAB über dem Footer ist */
#app-footer {
    z-index: 900;
}

/* Navigation */
#app-nav {
    z-index: 1000;
}

/* Modals sollten noch höher sein */
.modal-backdrop {
    z-index: 9999;
}
/* custom.css - Notification Modal Animationen */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.2s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out;
}

/* Notification Modal Responsive */
@media (max-width: 640px) {
    #notificationModal .bg-white {
        margin: 0;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}
/* custom.css - Mobile Notification Modal Fix */

/* Mobile Notification Modal */
@media (max-width: 640px) {
    #notificationModal .bg-white {
        margin: 0;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    /* Header bleibt fix */
    #notificationModal .bg-white > div:first-child {
        flex-shrink: 0;
    }
    
    /* Notification List mit Scrollbar */
    #notificationList {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 200px); /* Header + Footer Platz */
    }
    
    /* Footer bleibt fix */
    #notificationModal .bg-white > div:last-child {
        flex-shrink: 0;
    }
}

/* Desktop Modal mit Scrollbar */
@media (min-width: 641px) {
    #notificationList {
        max-height: 400px;
        overflow-y: auto;
    }
}

/* Scrollbar Styling */
#notificationList::-webkit-scrollbar {
    width: 6px;
}

#notificationList::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#notificationList::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#notificationList::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Smooth scrolling */
#notificationList {
    scroll-behavior: smooth;
}

/* Leaflet Custom Controls */
.leaflet-control-container .custom-controls-container {
    z-index: 1000 !important;
}

.leaflet-bottom.leaflet-left {
    z-index: 1000 !important;
}

/* Mobile specific adjustments */
@media (max-width: 640px) {
    .leaflet-control-container .custom-controls-container {
        margin-left: 10px;
        margin-bottom: 70px !important; /* Platz für Navigation */
    }
    
    .leaflet-control-container .custom-controls-container button {
        padding: 10px 12px !important;
        font-size: 14px;
    }
}

/* Ensure buttons are clickable */
.leaflet-control-container button {
    pointer-events: auto !important;
    touch-action: manipulation;
}
/* Modal Layout Fix für Bild-Preview */
.modal-backdrop > div {
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Modal Content - KEIN overflow-y: auto hier! */
.modal-backdrop > div > div:nth-child(2) {
    flex: 1 !important;
    min-height: 0 !important; /* Wichtig für Firefox */
    display: flex !important;
    flex-direction: column !important;
}

/* Form Container sollte scrollbar sein */
#create-post-form {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding: 1rem !important;
}

/* Textarea Container */
#post-content {
    min-height: 120px !important;
    max-height: 200px !important;
    resize: vertical !important;
}

/* Image Preview Container */
#image-preview {
    flex-shrink: 0 !important;
    margin: 1rem 0 !important;
}

#image-preview .max-h-64 {
    max-height: 200px !important;
}

/* Buttons Container */
#create-post-form > div:last-child {
    flex-shrink: 0 !important;
    margin-top: auto !important; /* Pusht die Buttons nach unten */
}

/* Modal Actions immer unten */
.modal-backdrop > div > div:last-child {
    flex-shrink: 0 !important;
    background: white !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1rem !important;
}
/* Einfache Lösung mit festen Höhen */
#create-post-form {
    max-height: calc(90vh - 140px) !important;
    overflow-y: auto !important;
}

#post-content {
    min-height: 100px !important;
    max-height: 150px !important;
}

#image-preview img {
    max-height: 200px !important;
    width: auto !important;
}