/**
 * Scroll Contact Modal - Fox Romeo Style
 * Erscheint beim Scrollen unten rechts als Kontakt-Widget
 */

/* Trigger Button (Bild unten rechts) */
.scroll-contact-trigger {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #2C963D;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 999998;
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.scroll-contact-trigger.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Trigger Button bleibt sichtbar auch wenn Modal offen ist */
.scroll-modal-open .scroll-contact-trigger {
    opacity: 1;
    pointer-events: auto;
}

.scroll-contact-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

.scroll-contact-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pulsierender Effekt */
.scroll-contact-trigger::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 14px;
    background: #2C963D;
    z-index: -1;
    animation: pulse 2s infinite;
}

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

/* Modal (kompakt) */
.scroll-contact-modal {
    position: fixed;
    bottom: 195px;
    right: 24px;
    transform: translateY(20px) scale(0.9);
    width: 360px;
    max-width: calc(100vw - 48px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.scroll-contact-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Header */
.scroll-contact-modal-header {
    padding: 24px 24px 16px 24px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
}

.scroll-contact-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.scroll-contact-modal-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Modal Body */
.scroll-contact-modal-body {
    padding: 20px 24px 24px 24px;
}

/* Contact Button */
.scroll-contact-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #2C963D;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 14px;
    line-height: 1.2;
}

.scroll-contact-button:hover {
    background: #248a34;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 150, 61, 0.3);
    color: #ffffff;
}

/* Links Container */
.scroll-contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Einzelner Link */
.scroll-contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    background: #ffffff;
    transition: all 0.2s ease;
}

.scroll-contact-link:hover {
    border-color: #2C963D;
    background: #f0f9f2;
    color: #1a1a1a;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.scroll-contact-link-icon {
    width: 18px;
    height: 18px;
    color: #666;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.scroll-contact-link:hover .scroll-contact-link-icon {
    color: #2C963D;
}

/* Close Button */
.scroll-contact-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.scroll-contact-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.scroll-contact-modal-close::before,
.scroll-contact-modal-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: #666;
    transition: background 0.3s ease;
}

.scroll-contact-modal-close::before {
    transform: rotate(45deg);
}

.scroll-contact-modal-close::after {
    transform: rotate(-45deg);
}

.scroll-contact-modal-close:hover::before,
.scroll-contact-modal-close:hover::after {
    background: #1a1a1a;
}



/* Responsive Design */
@media (max-width: 768px) {
    .scroll-contact-trigger {
        bottom: 85px;
        right: 20px;
        width: 70px;
        height: 70px;
        border-radius: 10px;
    }
    
    .scroll-contact-trigger::before {
        border-radius: 12px;
    }
    
    .scroll-contact-modal {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 170px;
    }
    
    .scroll-contact-modal-header {
        padding: 20px 20px 14px 20px;
    }
    
    .scroll-contact-modal-title {
        font-size: 16px;
    }
    
    .scroll-contact-modal-subtitle {
        font-size: 12px;
    }
    
    .scroll-contact-modal-body {
        padding: 16px 20px 20px 20px;
    }
    
    .scroll-contact-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .scroll-contact-trigger {
        bottom: 75px;
        right: 16px;
        width: 64px;
        height: 64px;
        border-radius: 10px;
    }
    
    .scroll-contact-trigger::before {
        border-radius: 12px;
    }
    
    .scroll-contact-modal {
        width: calc(100% - 32px);
        right: 16px;
        bottom: 150px;
        border-radius: 12px;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .scroll-contact-modal-header {
        padding: 18px 18px 12px 18px;
    }
    
    .scroll-contact-modal-title {
        font-size: 15px;
    }
    
    .scroll-contact-modal-body {
        padding: 14px 18px 18px 18px;
    }
}

/* Animation Variants */
.scroll-contact-modal.slide-up {
    transform: translateY(100%);
}

.scroll-contact-modal.slide-up.active {
    transform: translateY(0);
}

.scroll-contact-modal.fade-in {
    transform: translateY(0);
}

/* No Scroll when Modal is Open */
body.scroll-modal-open {
    overflow: hidden;
}

/* Accessibility */
.scroll-contact-modal:focus {
    outline: 3px solid #f7d800;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .scroll-contact-modal,
    .scroll-contact-modal-overlay {
        display: none !important;
    }
}

