/**
 * ============================================================================
 * PREMIUM MOBILE CTA - FLOATING CONTACT WIDGET
 * Elegant multi-action contact button with smooth animations
 * ============================================================================
 */

/* =================================================================
   FLOATING CONTACT WIDGET CONTAINER
   ================================================================= */
.floating-contact-widget {
    position: fixed;
    right: var(--spacing-lg);
    bottom: var(--spacing-lg);
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: var(--spacing-md);
}

/* Adjust position on mobile when bottom CTA bar is visible */
@media (max-width: 768px) {
    .floating-contact-widget {
        right: var(--spacing-md);
        bottom: calc(var(--mobile-cta-height) + var(--spacing-lg));
    }
}

/* =================================================================
   CONTACT OPTIONS MENU
   ================================================================= */
.contact-options-menu {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--spacing-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.contact-options-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* =================================================================
   CONTACT OPTION BUTTONS
   ================================================================= */
.contact-option-btn {
    position: relative;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-base);
    overflow: hidden;
    cursor: pointer;
}

@media (max-width: 640px) {
    .contact-option-btn {
        width: 50px;
        height: 50px;
    }
}

/* Button Icon */
.btn-icon {
    position: relative;
    z-index: 2;
    font-size: 1.25rem;
    transition: transform var(--transition-fast);
}

@media (max-width: 640px) {
    .btn-icon {
        font-size: 1.125rem;
    }
}

/* Ripple Effect */
.btn-ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    opacity: 0;
    transition: all 0.6s ease-out;
}

.contact-option-btn:active .btn-ripple {
    transform: scale(2);
    opacity: 1;
    transition: none;
}

/* Hover Effect */
.contact-option-btn:hover {
    transform: translateY(-4px) scale(1.08);
}

.contact-option-btn:active {
    transform: translateY(-2px) scale(1.05);
}

.contact-option-btn:hover .btn-icon {
    transform: scale(1.15);
}

/* Tooltip on Hover (Desktop only) */
.contact-option-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + var(--spacing-md));
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    padding: 0.5rem 0.875rem;
    background: var(--color-neutral-900);
    color: white;
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    border-radius: var(--radius-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
    z-index: 10;
}

.contact-option-btn::after {
    content: '';
    position: absolute;
    right: calc(100% + 0.375rem);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid var(--color-neutral-900);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
}

@media (min-width: 769px) {
    .contact-option-btn:hover::before,
    .contact-option-btn:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0);
    }
}

@media (max-width: 768px) {
    .contact-option-btn::before,
    .contact-option-btn::after {
        display: none;
    }
}

/* =================================================================
   CALL BUTTON - ROSE GOLD
   ================================================================= */
.contact-call {
    background: var(--gradient-rose-gold);
}

.contact-call:hover {
    box-shadow: var(--shadow-rose-lg);
}

.contact-call:hover .btn-icon {
    animation: ringPhone 0.8s ease-in-out;
}

@keyframes ringPhone {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-25deg) scale(1.2); }
    20%, 40%, 60%, 80% { transform: rotate(25deg) scale(1.2); }
}

/* =================================================================
   EMAIL BUTTON - BLUE
   ================================================================= */
.contact-email {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.contact-email:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

.contact-email:hover .btn-icon {
    animation: bounceEmail 0.8s ease-in-out;
}

@keyframes bounceEmail {
    0%, 100% { transform: translateY(0) scale(1); }
    15% { transform: translateY(-8px) scale(1.15); }
    30% { transform: translateY(0) scale(1.1); }
    45% { transform: translateY(-6px) scale(1.12); }
    60% { transform: translateY(0) scale(1.05); }
    75% { transform: translateY(-4px) scale(1.08); }
}

/* =================================================================
   WHATSAPP BUTTON - GREEN
   ================================================================= */
.contact-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.contact-whatsapp:hover {
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

.contact-whatsapp:hover .btn-icon {
    animation: wobbleWhatsApp 0.8s ease-in-out;
}

@keyframes wobbleWhatsApp {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    15% { transform: translateX(-8px) rotate(-10deg); }
    30% { transform: translateX(8px) rotate(10deg); }
    45% { transform: translateX(-6px) rotate(-8deg); }
    60% { transform: translateX(6px) rotate(8deg); }
    75% { transform: translateX(-3px) rotate(-4deg); }
}

/* =================================================================
   STAGGERED ENTRANCE ANIMATION
   ================================================================= */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-options-menu.active .contact-option-btn {
    animation: slideUpFade 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.contact-options-menu.active .contact-option-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.contact-options-menu.active .contact-option-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-options-menu.active .contact-option-btn:nth-child(3) {
    animation-delay: 0.3s;
}

/* =================================================================
   MAIN TOGGLE BUTTON
   ================================================================= */
.contact-main-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-rose-gold);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-rose);
    transition: all var(--transition-base);
    overflow: visible;
}

@media (max-width: 640px) {
    .contact-main-toggle {
        width: 56px;
        height: 56px;
    }
}

/* Toggle Icons */
.toggle-icon {
    position: absolute;
    font-size: 1.5rem;
    transition: all var(--transition-base);
}

@media (max-width: 640px) {
    .toggle-icon {
        font-size: 1.375rem;
    }
}

.toggle-icon-open {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.toggle-icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

/* Active State */
.contact-main-toggle.active .toggle-icon-open {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

.contact-main-toggle.active .toggle-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Pulse Effect */
.toggle-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--color-primary-500);
    opacity: 0;
    animation: pulsate 2.5s ease-out infinite;
}

@keyframes pulsate {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.contact-main-toggle.active .toggle-pulse {
    animation: none;
}

/* Hover State */
.contact-main-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-rose-lg);
}

.contact-main-toggle:active {
    transform: translateY(-1px) scale(1.02);
}

/* =================================================================
   MOBILE BOTTOM CTA BAR
   ================================================================= */
/* =================================================================
   MOBILE BOTTOM CTA BAR
   ================================================================= */
.mobile-bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-cta-height);
    background: white;
    border-top: 1px solid rgba(245, 66, 117, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: var(--z-sticky);
    transform: translateY(0);
    transition: transform var(--transition-base);
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-bottom-cta {
        display: none;
    }
}

/* Hide when scrolling down (optional feature) */
.mobile-bottom-cta.hidden {
    transform: translateY(100%);
}

/* Bottom CTA Container */
.bottom-cta-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    gap: 1px;
    background: rgba(245, 66, 117, 0.1);
}

/* Bottom CTA Buttons */
.bottom-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    background: white;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.bottom-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.bottom-cta-btn:active {
    transform: scale(0.98);
}

/* Button Icon - FIXED */
.bottom-cta-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.125rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Ensure icons are visible */
.bottom-cta-btn .btn-icon i {
    display: block;
    line-height: 1;
    color: inherit;
}

/* Button Content */
.btn-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.btn-label {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1;
}

.btn-sublabel {
    font-size: 0.6875rem;
    font-weight: var(--font-weight-regular);
    opacity: 0.8;
    line-height: 1;
}

/* Appointment Button - FIXED HOVER */
.btn-appointment::before {
    background: linear-gradient(135deg, 
                rgba(245, 66, 117, 0.08), 
                rgba(224, 36, 94, 0.08));
}

.btn-appointment .btn-icon {
    background: var(--color-primary-50);
    color: var(--color-primary-600);
}

.btn-appointment .btn-label {
    color: var(--color-primary-600);
}

.btn-appointment .btn-sublabel {
    color: var(--color-neutral-600);
}

/* Hover state - Keep text visible */
.btn-appointment:hover {
    background: rgba(245, 66, 117, 0.02);
}

.btn-appointment:hover .btn-icon {
    background: var(--color-primary-100);
    transform: scale(1.05);
}

.btn-appointment:hover .btn-label {
    color: var(--color-primary-700);
}

.btn-appointment:hover .btn-sublabel {
    color: var(--color-neutral-700);
}

/* Active state */
.btn-appointment:active .btn-icon {
    background: var(--gradient-rose-gold);
    color: white;
    transform: scale(0.95);
}

.btn-appointment:active .btn-label {
    color: var(--color-primary-800);
}

/* WhatsApp Button - FIXED HOVER */
.btn-whatsapp::before {
    background: linear-gradient(135deg, 
                rgba(37, 211, 102, 0.08), 
                rgba(18, 140, 126, 0.08));
}

.btn-whatsapp .btn-icon {
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
}

.btn-whatsapp .btn-label {
    color: #25d366;
}

.btn-whatsapp .btn-sublabel {
    color: var(--color-neutral-600);
}

/* Hover state - Keep text visible */
.btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.02);
}

.btn-whatsapp:hover .btn-icon {
    background: rgba(37, 211, 102, 0.15);
    transform: scale(1.05);
}

.btn-whatsapp:hover .btn-label {
    color: #1ea352;
}

.btn-whatsapp:hover .btn-sublabel {
    color: var(--color-neutral-700);
}

/* Active state */
.btn-whatsapp:active .btn-icon {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    transform: scale(0.95);
}

.btn-whatsapp:active .btn-label {
    color: #128c7e;
}

/* =================================================================
   TOAST NOTIFICATION
   ================================================================= */
.contact-toast {
    position: fixed;
    bottom: calc(var(--mobile-cta-height) + var(--spacing-xl));
    left: var(--spacing-md);
    right: var(--spacing-md);
    max-width: 360px;
    margin: 0 auto;
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-base);
    z-index: calc(var(--z-fixed) + 10);
}

@media (min-width: 769px) {
    .contact-toast {
        bottom: var(--spacing-xl);
        left: var(--spacing-xl);
        right: auto;
    }
}

.contact-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Toast variants */
.contact-toast.email {
    border-left: 4px solid #3b82f6;
}

.contact-toast.whatsapp {
    border-left: 4px solid #25d366;
}

/* Toast Icon */
.toast-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-toast.email .toast-icon-wrapper {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.contact-toast.whatsapp .toast-icon-wrapper {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.toast-icon {
    font-size: 1.125rem;
    color: white;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-neutral-900);
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    line-height: 1.4;
}

/* Toast Close Button */
.toast-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-neutral-100);
    border: none;
    border-radius: 50%;
    color: var(--color-neutral-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toast-close-btn:hover {
    background: var(--color-neutral-200);
    color: var(--color-neutral-800);
}

.toast-close-btn i {
    font-size: 0.875rem;
}

/* =================================================================
   ACCESSIBILITY
   ================================================================= */
.contact-option-btn:focus-visible,
.contact-main-toggle:focus-visible,
.bottom-cta-btn:focus-visible,
.toast-close-btn:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 3px;
}

/* =================================================================
   REDUCED MOTION
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
    .contact-option-btn,
    .contact-main-toggle,
    .toggle-pulse,
    .bottom-cta-btn,
    .contact-toast {
        animation: none;
        transition: none;
    }
}