/* ===================================
   Floating Contact Buttons Styles
   =================================== */

/* Reset & Base Styles */
.fcb-desktop-container,
.fcb-mobile-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ===================================
   DESKTOP STYLES (Floating Buttons)
   =================================== */

.fcb-desktop-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.fcb-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.fcb-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.fcb-button:active {
    transform: scale(0.95);
}

.fcb-phone-button {
    background: linear-gradient(135deg, #ff3838 0%, #e61e1e 100%);
}

.fcb-phone-button:hover {
    background: linear-gradient(135deg, #ff4848 0%, #f02e2e 100%);
}

.fcb-whatsapp-button {
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
}

.fcb-whatsapp-button:hover {
    background: linear-gradient(135deg, #2FE074 0%, #25D366 100%);
}

.fcb-button svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.fcb-label {
    background: white;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    margin-top: 8px;
    animation: fadeInLabel 0.3s ease;
}

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

/* ===================================
   MOBILE STYLES (Bottom Bar)
   =================================== */

.fcb-mobile-container {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.fcb-mobile-button {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fcb-mobile-button:active {
    transform: scale(0.97);
}

/* Full width button untuk single button */
.fcb-mobile-full {
    flex: 1;
    width: 100%;
}

.fcb-mobile-phone {
    background: linear-gradient(135deg, #ff3838 0%, #e61e1e 100%);
}

.fcb-mobile-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
}

.fcb-mobile-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.fcb-mobile-button span {
    font-size: 15px;
    font-weight: 600;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Tablet and below */
@media screen and (max-width: 768px) {
    .fcb-desktop-container {
        display: none !important;
    }
    
    .fcb-mobile-container {
        display: block;
    }
}

/* Very small mobile devices */
@media screen and (max-width: 360px) {
    .fcb-mobile-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .fcb-mobile-button span {
        font-size: 14px;
    }
}

/* Desktop only */
@media screen and (min-width: 769px) {
    .fcb-mobile-container {
        display: none !important;
    }
}

/* ===================================
   ACCESSIBILITY & INTERACTIONS
   =================================== */

/* Focus styles for accessibility */
.fcb-button:focus,
.fcb-mobile-button:focus {
    outline: 3px solid rgba(66, 153, 225, 0.5);
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .fcb-button,
    .fcb-mobile-button,
    .fcb-label {
        animation: none;
        transition: none;
    }
}

/* ===================================
   COMPATIBILITY FIXES
   =================================== */

/* Ensure buttons appear above common elements */
.fcb-desktop-container,
.fcb-mobile-container {
    pointer-events: auto;
}

.fcb-button,
.fcb-mobile-button {
    pointer-events: auto;
}

/* Elementor compatibility */
.elementor-widget-container .fcb-desktop-container,
.elementor-widget-container .fcb-mobile-container {
    position: fixed;
}

/* Fix for some themes that might affect button positioning */
body.admin-bar .fcb-desktop-container {
    bottom: calc(30px + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .fcb-desktop-container {
        bottom: calc(30px + 46px);
    }
}

/* ===================================
   LOADING ANIMATION (Optional)
   =================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fcb-button.loading,
.fcb-mobile-button.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .fcb-desktop-container,
    .fcb-mobile-container {
        display: none !important;
    }
}
