/* Info Button Styles */
.info-button-container {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 9998; /* Unter dem Chatbot */
    animation: fadeIn 0.3s ease-in;
    transition: all 0.3s ease; /* Für sanfte Positionänderungen */
}

/* Info-Button verstecken wenn Mobile-Menü geöffnet ist */
body.menu-open .info-button-container {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    visibility: hidden !important;
}

/* Info-Modal auch verstecken wenn Mobile-Menü geöffnet ist */
body.menu-open .info-modal {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    visibility: hidden !important;
}

/* Info-Button behält IMMER seine ursprüngliche Position */
/* Keine automatischen Verschiebungen mehr */

/* Näher am Rand für cleanen Look */
.info-button-container.edge-close {
    bottom: 10px;
    right: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.info-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #EB5E28;
    border: 4px solid #ffffff;
    box-shadow: 0 5px 20px rgba(235, 94, 40, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.info-button:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 30px rgba(235, 94, 40, 0.5);
    filter: brightness(1.2);
}

/* Farbvarianten */
.info-button.color-brown {
    background: #6b5b4b;
}

/* Homepage Farbpalette */
.info-button.color-flame {
    background: #EB5E28;
    box-shadow: 0 5px 20px rgba(235, 94, 40, 0.3);
}

.info-button.color-khaki {
    background: #A99985;
    box-shadow: 0 5px 20px rgba(169, 153, 133, 0.3);
}

.info-button.color-reseda {
    background: #6B705C;
    box-shadow: 0 5px 20px rgba(107, 112, 92, 0.3);
}

.info-button.color-eerie {
    background: #252422;
    box-shadow: 0 5px 20px rgba(37, 36, 34, 0.3);
}

.info-button.color-cosmic {
    background: #F9F4E3;
    color: #252422 !important;
    box-shadow: 0 5px 20px rgba(249, 244, 227, 0.5);
    border: 4px solid #A99985;
}

/* Hover-Effekte für Homepage-Farben */
.info-button.color-flame:hover {
    box-shadow: 0 10px 30px rgba(235, 94, 40, 0.5);
}

.info-button.color-khaki:hover {
    box-shadow: 0 10px 30px rgba(169, 153, 133, 0.5);
}

.info-button.color-reseda:hover {
    box-shadow: 0 10px 30px rgba(107, 112, 92, 0.5);
}

.info-button.color-eerie:hover {
    box-shadow: 0 10px 30px rgba(37, 36, 34, 0.5);
}

.info-button.color-cosmic:hover {
    box-shadow: 0 10px 30px rgba(249, 244, 227, 0.7);
    background: #F5F0E3;
}

.info-button.color-cosmic i {
    color: #252422 !important;
}

/* Standard Farben */
.info-button.color-blue {
    background: #2196F3;
}

.info-button.color-green {
    background: #4CAF50;
}

.info-button.color-red {
    background: #dc3545;
}

.info-button.color-orange {
    background: #ff9800;
}

.info-button.color-purple {
    background: #9c27b0;
}

.info-button.color-teal {
    background: #009688;
}

.info-button.color-gold {
    background: #D4A574;
}

.info-button.color-gray {
    background: #757575;
}

.info-button.color-black {
    background: #1a1a1a;
}

.info-button i {
    font-size: 38px;
    color: white;
    font-weight: 900;
    font-style: italic;
    font-family: Georgia, serif;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    line-height: 1;
}

/* Info Modal */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997; /* Unter dem Chatbot */
    animation: fadeIn 0.3s ease-in;
}

.info-modal.active {
    display: block;
}

/* Modal Content - Standard (mittig) */
.info-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

/* Modal seitlich positioniert */
.info-modal.side-modal .info-modal-content {
    top: auto;
    left: auto;
    right: 80px;
    bottom: 100px; /* Höher positioniert um Überlappungen zu vermeiden */
    transform: none;
    max-width: 400px;
    max-height: 50vh; /* Etwas kleiner für bessere Platzierung */
}

/* Wenn Chatbot aktiv ist, Modal höher positionieren */
.info-modal.side-modal.chatbot-active .info-modal-content {
    bottom: 180px;
}

.info-modal.side-modal.position-left .info-modal-content {
    left: 80px;
    right: auto;
}

.info-modal.side-modal.position-top .info-modal-content {
    top: 80px;
    bottom: auto;
}

.info-modal.side-modal.position-middle .info-modal-content {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -45%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.info-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.info-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6b5b4b;
    margin: 0;
}

.info-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal-close:hover {
    color: #333;
}

.info-modal-body {
    color: #333;
    line-height: 1.8;
    font-size: 1rem;
}

.info-modal-body h3 {
    color: #6b5b4b;
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.info-modal-body h4 {
    color: #8b7355;
    margin-top: 18px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-modal-body p {
    margin-bottom: 15px;
}

.info-modal-body ul,
.info-modal-body ol {
    margin: 15px 0;
    padding-left: 25px;
}

.info-modal-body li {
    margin-bottom: 8px;
}

.info-modal-body strong {
    color: #6b5b4b;
    font-weight: 600;
}

.info-modal-body a {
    color: #D4A574;
    text-decoration: none;
    font-weight: 500;
}

.info-modal-body a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* WICHTIG: Alle Modals auf Mobile IMMER mittig - höchste Priorität */
    .info-modal .info-modal-content,
    .info-modal.side-modal .info-modal-content {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 85% !important;
        max-width: 340px !important;
        max-height: 70vh !important;
    }
    
    .info-button-container {
        bottom: 15px;
        right: 15px;
        z-index: 9998; /* Unter Chatbot aber über allem anderen */
        display: block !important; /* Sicherstellen dass es angezeigt wird */
    }
    
    /* Info-Button behält auch auf Mobile seine Position */
    
    /* Spezielle Positionierung auf Mobil */
    .info-button-container.bottom-right {
        bottom: 15px;
        right: 15px;
    }
    
    /* Verschiebe Info-Button wenn Chatbot aktiv ist */
    .info-button-container.bottom-left {
        bottom: 75px; /* Höher positioniert wegen Chatbot */
        left: 15px;
        right: auto;
    }
    
    .info-button-container.top-left,
    .info-button-container.top-right {
        top: 80px; /* Unter dem Header */
    }
    
    .info-button-container.middle-left,
    .info-button-container.middle-right {
        top: 50%;
        transform: translateY(-50%);
    }
    
    .info-button-container.middle-center {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .info-button-container.top-left,
    .info-button-container.middle-left {
        left: 15px;
        right: auto;
    }
    
    .info-button-container.top-right,
    .info-button-container.middle-right {
        right: 15px;
        left: auto;
    }
    
    /* Kleinerer Button auf Mobil */
    .info-button {
        width: 50px;
        height: 50px;
        border: 3px solid #ffffff;
    }
    
    .info-button i {
        font-size: 28px;
    }
    
    .info-button:hover {
        transform: scale(1.05); /* Weniger Zoom auf Mobil */
    }
    
    /* Padding und Overflow für Modal Content */
    .info-modal-content {
        padding: 12px 15px !important;
        overflow-y: auto !important;
    }
    
    .info-modal-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .info-modal-title {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .info-modal-close {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    
    .info-modal-body {
        font-size: 0.7rem;
        line-height: 1.5;
    }
    
    .info-modal-body h3 {
        font-size: 0.8rem;
        margin-top: 10px;
        margin-bottom: 6px;
    }
    
    .info-modal-body h4 {
        font-size: 0.75rem;
        margin-top: 8px;
        margin-bottom: 5px;
    }
    
    .info-modal-body p {
        margin-bottom: 8px;
    }
    
    .info-modal-body ul,
    .info-modal-body ol {
        margin: 8px 0;
        padding-left: 18px;
    }
    
    .info-modal-body li {
        margin-bottom: 4px;
        font-size: 0.7rem;
    }
}

/* Zusätzliche Anpassung für Scroll-Verhalten */
.info-button-container {
    will-change: transform, bottom;
}

/* Position Options */
.info-button-container.top-left {
    top: 15px;
    left: 15px;
    bottom: auto;
    right: auto;
}

.info-button-container.top-right {
    top: 15px;
    right: 15px;
    bottom: auto;
}

.info-button-container.bottom-left {
    bottom: 15px;
    left: 15px;
    right: auto;
}

/* Standard bottom-right ist bereits oben definiert */
.info-button-container.bottom-right {
    bottom: 15px;
    right: 15px;
}

/* Mittlere Positionen */
.info-button-container.middle-right {
    top: 50%;
    right: 15px;
    bottom: auto;
    transform: translateY(-50%);
}

.info-button-container.middle-left {
    top: 50%;
    left: 15px;
    right: auto;
    bottom: auto;
    transform: translateY(-50%);
}

.info-button-container.middle-center {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
}

/* Pulse Animation for Attention */
.info-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
