/* Floating Action Button Styles */

.fab-container {
    position: fixed;
    bottom: 20px;
    right: 15px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #000;
    border: none;
    cursor: pointer;
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    padding: 0;
    margin: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    pointer-events: auto;
}

.fab-main:hover {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    -webkit-box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.fab-main svg {
    width: 31px;
    height: 31px;
    fill: white;
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    pointer-events: none;
}

.fab-main svg * {
    pointer-events: none;
}

.fab-icon-plane {
    opacity: 1;
    -webkit-transform: translate(-50%, -50%) scale(1);
    -ms-transform: translate(-50%, -50%) scale(1);
    transform: translate(-50%, -50%) scale(1);
}

.fab-icon-close {
    opacity: 0;
    -webkit-transform: translate(-50%, -50%) scale(0);
    -ms-transform: translate(-50%, -50%) scale(0);
    transform: translate(-50%, -50%) scale(0);
}

.fab-main.active .fab-icon-plane {
    opacity: 0;
    -webkit-transform: translate(-50%, -50%) scale(0);
    -ms-transform: translate(-50%, -50%) scale(0);
    transform: translate(-50%, -50%) scale(0);
}

.fab-main.active .fab-icon-close {
    opacity: 1;
    -webkit-transform: translate(-50%, -50%) scale(1);
    -ms-transform: translate(-50%, -50%) scale(1);
    transform: translate(-50%, -50%) scale(1);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 4px;
    opacity: 0;
    -webkit-transform: translateY(20px);
    -ms-transform: translateY(20px);
    transform: translateY(20px);
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    visibility: hidden;
    z-index: 10001;
    pointer-events: none;
}

.fab-menu.active {
    opacity: 1;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.fab-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    margin-bottom: 12px;
    cursor: pointer;
    text-decoration: none;
    -webkit-animation: fadeInUp 0.3s ease forwards;
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
    -webkit-transform: translateY(10px);
    -ms-transform: translateY(10px);
    transform: translateY(10px);
    pointer-events: auto !important;
    position: relative;
    z-index: 10002;
}

.fab-menu.active .fab-item {
    opacity: 1;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    pointer-events: auto !important;
}

.fab-item:last-child {
    margin-bottom: 0;
}

.fab-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-decoration: none;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    -ms-flex-negative: 0;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    pointer-events: none;
}

.fab-button:hover,
.fab-button.hover-effect {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.fab-whatsapp {
    background: #25D366;
}

.fab-email {
    background: #EA4335;
}

.fab-phone {
    background: #007BFF;
}

.fab-button svg {
    width: 20px;
    height: 20px;
    fill: white;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    pointer-events: none;
}

.fab-button svg * {
    pointer-events: none;
}

.fab-label {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 12px;
    white-space: nowrap;
    opacity: 0;
    -webkit-transform: translateX(10px);
    -ms-transform: translateX(10px);
    transform: translateX(10px);
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    pointer-events: none;
}

.fab-item:hover .fab-label {
    opacity: 1;
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
}

/* Single button mode - no menu needed */
.fab-container.single-mode .fab-main {
    background: var(--e-global-color-accent, #4CAF50);
}

.fab-container.single-mode .fab-main.whatsapp-single {
    background: #25D366;
}

.fab-container.single-mode .fab-main.phone-single {
    background: #1976D2;
}

.fab-container.single-mode .fab-main.email-single {
    background: #EA4335;
}

/* Animation keyframes */
@-webkit-keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(10px);
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(10px);
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .fab-main {
        width: 56px;
        height: 56px;
    }
    
    .fab-button {
        width: 44px;
        height: 44px;
    }
}

/* Close overlay */
.fab-close {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9998;
    display: none;
    pointer-events: auto;
}

.fab-close.active {
    display: block;
}

/* Focus states for accessibility */
.fab-main:focus,
.fab-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* RTL support */
[dir="rtl"] .fab-container {
    right: auto;
    left: 20px;
}

[dir="rtl"] .fab-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .fab-label {
    margin-right: 0;
    margin-left: 12px;
}

/* Phone Modal Styles */
.fab-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.fab-modal.active {
    display: flex;
}

.fab-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.fab-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fab-modal-close {
    position: absolute;
    top: 0px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: 0.2s;
}

.fab-modal-close:hover {
    color: #000;
}

.fab-modal h3 {
    margin: 0 0 20px;
    font-size: 19px;
    color: #333;
    font-weight: 600;
}

.fab-phone-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 12px;
    text-decoration: none;
    color: #333;
    transition: 0.2s;
}

.fab-phone-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.fab-flag {
    font-size: 36px;
    line-height: 1;
    pointer-events: none;
}

.fab-phone-label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 2px;
    pointer-events: none;
}

.fab-phone-number {
    font-size: 14px;
    color: #666;
    font-family: 'Courier New', monospace;
    pointer-events: none;
    line-height: 1.2em;
}

/* Mobile Modal */
@media (max-width: 768px) {
    .fab-modal-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .fab-phone-item {
        padding: 12px;
    }
    
    .fab-flag {
        font-size: 28px;
    }
}

.fab-flag {
    width: 42px;  /* etwas breiter für rechteckige Flaggen */
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-flag svg {
    width: 40px;
    height: 26px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    display: block;
}

@media (max-width: 768px) {
    .fab-flag {
        width: 36px;
        height: 24px;
    }
    
    .fab-flag svg {
        width: 34px;
        height: 22px;
    }
}