/* Aeris Luxury Theme - Sticky Contact Buttons */

/* ========================================
   BASE BUTTON STYLES
======================================== */
.aeris-floating-btn,
.aeris-sticky-btn {
    text-decoration: none;
    transition: all var(--transition-normal, 300ms) cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    font-weight: 500;
    border: none;
    outline: none;
}

/* ========================================
   DESKTOP FLOATING BUTTONS
======================================== */
.aeris-desktop-buttons {
    position: fixed;
    top: 80%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aeris-floating-btn {
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 14px;
    min-width: 140px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateX(0);
    color: white;
}

.aeris-floating-btn:hover {
    transform: translateX(-4px) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    color: white;
}

.aeris-floating-btn i {
    font-size: 18px;
    margin-right: 8px;
    flex-shrink: 0;
}

.aeris-btn-text {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* ========================================
   BUTTON TYPE STYLES
======================================== */
.aeris-btn-call {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.aeris-btn-call:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.aeris-btn-whatsapp {
    background: linear-gradient(135deg, #10b981, #047857);
}

.aeris-btn-whatsapp:hover {
    background: linear-gradient(135deg, #059669, #065f46);
}

.aeris-btn-sms {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.aeris-btn-sms:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

/* ========================================
   MOBILE STICKY BUTTONS - OPTIMIZED
======================================== */
.aeris-mobile-sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.aeris-sticky-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    padding: 8px 12px; /* REDUCED from 12px 16px */
    gap: 6px; /* REDUCED from 8px */
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); /* LIGHTER shadow */
}

.aeris-sticky-btn {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 8px 6px; /* REDUCED from 12px 8px */
    border-radius: 12px; /* REDUCED from 16px */
    min-height: 48px; /* REDUCED from 64px */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.aeris-sticky-btn:active {
    transform: scale(0.98); /* REDUCED from 0.95 */
}

.aeris-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px; /* REDUCED from 32px */
    height: 24px; /* REDUCED from 32px */
    border-radius: 50%;
    margin-bottom: 2px; /* REDUCED from 4px */
    background: rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal, 300ms);
}

.aeris-btn-icon i {
    font-size: 14px; /* REDUCED from 16px */
}

.aeris-btn-label {
    font-size: 10px; /* REDUCED from 11px */
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    line-height: 1;
}

/* Mobile button specific styles */
.aeris-sticky-call {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(29, 78, 216, 0.9));
}

.aeris-sticky-whatsapp {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(4, 120, 87, 0.9));
}

.aeris-sticky-sms {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(124, 58, 237, 0.9));
}

/* ========================================
   TOOLTIP STYLES
======================================== */
.aeris-floating-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal, 300ms);
    margin-right: 8px;
    z-index: 1001;
}

.aeris-floating-btn:hover::before {
    opacity: 1;
}

/* Tooltip arrow */
.aeris-floating-btn::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: -4px;
    border: 4px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal, 300ms);
    z-index: 1001;
}

.aeris-floating-btn:hover::after {
    opacity: 1;
}

/* ========================================
   PULSE ANIMATION FOR CALL BUTTON - REMOVED FOR MOBILE
======================================== */
/* Desktop only - keep pulse for desktop but remove on mobile */
@media screen and (min-width: 769px) {
    .aeris-btn-call::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        border: 2px solid rgba(255, 255, 255, 0.6);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        animation: aeris-pulse-ring 2s infinite;
        pointer-events: none;
    }
}

/* REMOVED pulse ring from mobile sticky buttons to avoid confusion */

@keyframes aeris-pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ========================================
   LOADING STATES - SIMPLIFIED
======================================== */
.aeris-floating-btn.loading,
.aeris-sticky-btn.loading {
    pointer-events: none;
    opacity: 0.6; /* REDUCED from 0.7 */
}

/* SIMPLIFIED loading state - no spinning animation on mobile */
@media screen and (min-width: 769px) {
    .aeris-floating-btn.loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        border: 2px solid transparent;
        border-top: 2px solid currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE BEHAVIOR - REDUCED MOBILE PADDING
======================================== */
@media screen and (max-width: 768px) {
    .aeris-desktop-buttons {
        display: none;
    }
    
    .aeris-mobile-sticky {
        display: block;
    }
    
    body {
        padding-bottom: 64px; /* REDUCED from 88px */
    }
}

@media screen and (min-width: 769px) {
    .aeris-desktop-buttons {
        display: flex;
    }
    
    .aeris-mobile-sticky {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* ========================================
   BUTTON HOVER EFFECTS - REDUCED ON MOBILE
======================================== */
.aeris-floating-btn:hover .aeris-btn-icon,
.aeris-sticky-btn:hover .aeris-btn-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05); /* REDUCED from 1.1 on mobile */
}

@media screen and (min-width: 769px) {
    .aeris-floating-btn:hover .aeris-btn-icon {
        transform: scale(1.1); /* Keep full scale on desktop */
    }
}

/* Ripple effect on click - REDUCED SIZE */
.aeris-floating-btn,
.aeris-sticky-btn {
    position: relative;
    overflow: hidden;
}

.aeris-floating-btn::before,
.aeris-sticky-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2); /* REDUCED opacity */
    transition: width 0.4s ease, height 0.4s ease; /* FASTER animation */
    transform: translate(-50%, -50%);
    z-index: 0;
}

.aeris-floating-btn:active::before {
    width: 300px;
    height: 300px;
}

.aeris-sticky-btn:active::before {
    width: 100px; /* REDUCED from 300px for mobile */
    height: 100px; /* REDUCED from 300px for mobile */
}

.aeris-btn-text,
.aeris-btn-icon,
.aeris-btn-label {
    position: relative;
    z-index: 1;
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
======================================== */
.aeris-floating-btn:focus,
.aeris-sticky-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 1px; /* REDUCED from 2px */
}

.aeris-floating-btn[aria-label],
.aeris-sticky-btn[aria-label] {
    position: relative;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .aeris-floating-btn,
    .aeris-sticky-btn {
        border-width: 2px;
        border-color: currentColor;
    }
    
    .aeris-floating-btn::before {
        background: #000;
        border: 2px solid #fff;
    }
}

/* ========================================
   SAFE AREA SUPPORT
======================================== */
@supports (padding: max(0px)) {
    .aeris-mobile-sticky {
        padding-left: max(12px, env(safe-area-inset-left)); /* REDUCED from 16px */
        padding-right: max(12px, env(safe-area-inset-right)); /* REDUCED from 16px */
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* ========================================
   DARK MODE SUPPORT
======================================== */
@media (prefers-color-scheme: dark) {
    .aeris-sticky-container {
        background: rgba(17, 24, 39, 0.95);
        border-top-color: rgba(75, 85, 99, 0.3);
    }
    
    .aeris-floating-btn,
    .aeris-sticky-btn {
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .aeris-floating-btn::before {
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(75, 85, 99, 0.3);
    }
}

/* ========================================
   REDUCED MOTION SUPPORT
======================================== */
@media (prefers-reduced-motion: reduce) {
    .aeris-floating-btn,
    .aeris-sticky-btn,
    .aeris-btn-icon,
    .aeris-floating-btn::before,
    .aeris-sticky-btn::before {
        transition: none;
    }
    
    .aeris-btn-call::after,
    .aeris-sticky-call::after {
        animation: none;
        display: none;
    }
    
    .aeris-floating-btn.loading::after,
    .aeris-sticky-btn.loading::after {
        animation: none;
    }
    
    .aeris-sticky-btn:active {
        transform: none;
    }
}

/* ========================================
   BUTTON STATE INDICATORS - SIMPLIFIED
======================================== */
.aeris-floating-btn[data-state="busy"],
.aeris-sticky-btn[data-state="busy"] {
    opacity: 0.6;
    pointer-events: none;
}

.aeris-floating-btn[data-state="success"],
.aeris-sticky-btn[data-state="success"] {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    /* REMOVED bouncing animation for mobile */
}

@media screen and (min-width: 769px) {
    .aeris-floating-btn[data-state="success"] {
        animation: successPulse 1s ease-out;
    }
}

.aeris-floating-btn[data-state="error"],
.aeris-sticky-btn[data-state="error"] {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    /* REMOVED shaking animation for mobile */
}

@media screen and (min-width: 769px) {
    .aeris-floating-btn[data-state="error"] {
        animation: errorShake 0.5s ease-out;
    }
}

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

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ========================================
   EXTRA SMALL MOBILE OPTIMIZATION
======================================== */
@media screen and (max-width: 480px) {
    .aeris-sticky-container {
        padding: 6px 10px;
        gap: 4px;
    }
    
    .aeris-sticky-btn {
        padding: 6px 4px;
        min-height: 44px;
        border-radius: 10px;
    }
    
    .aeris-btn-icon {
        width: 20px;
        height: 20px;
        margin-bottom: 1px;
    }
    
    .aeris-btn-icon i {
        font-size: 12px;
    }
    
    .aeris-btn-label {
        font-size: 9px;
    }
    
    body {
        padding-bottom: 56px; /* FURTHER REDUCED for very small screens */
    }
}

/* ========================================
   CUSTOM POSITIONING OPTIONS
======================================== */
.aeris-desktop-buttons.position-left {
    right: auto;
    left: 20px;
}

.aeris-desktop-buttons.position-left .aeris-floating-btn:hover {
    transform: translateX(4px) translateY(-2px);
}

.aeris-desktop-buttons.position-top {
    top: 20%;
}

.aeris-desktop-buttons.position-bottom {
    top: auto;
    bottom: 20px;
    transform: none;
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .aeris-desktop-buttons,
    .aeris-mobile-sticky {
        display: none !important;
    }
}

/* ========================================
   VENDOR SPECIFIC STYLES
======================================== */
/* WhatsApp specific styling */
.aeris-btn-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
}

/* SMS specific styling */
.aeris-btn-sms:hover {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
}

/* Call specific styling */
.aeris-btn-call:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

/* ========================================
   ANIMATION TIMING ADJUSTMENTS
======================================== */
.aeris-floating-btn {
    transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aeris-sticky-btn:active {
    transition-duration: 100ms;
    transition-timing-function: ease-out;
}

.aeris-btn-icon {
    transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}