/* ==================== UNIFIED FLOATING BUTTONS ==================== */
/* Smaller, non-overlapping buttons for W-Creators */

/* ==================== POSITIONING STACK (Right side, bottom to top) ==================== */
/*
   Layout (right side):
   - Accessibility button: bottom 20px
   - WhatsApp button: bottom 80px
   - Lead widget button: bottom 140px
   - Back to top: bottom 200px (only visible on scroll)

   All buttons are 44px for accessibility compliance
*/

/* ==================== BASE FLOATING BUTTON STYLES ==================== */
.floating-btn {
    position: fixed;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn svg {
    width: 22px;
    height: 22px;
}

/* ==================== WHATSAPP BUTTON ==================== */
.whatsapp-btn {
    position: fixed;
    right: 16px;
    bottom: 80px;
    width: 44px;
    height: 44px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* ==================== BACK TO TOP BUTTON ==================== */
.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 200px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    z-index: 997;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: rgba(34, 165, 89, 0.2);
    border-color: rgba(34, 165, 89, 0.5);
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2;
}

/* ==================== LEAD WIDGET ==================== */
.lead-widget {
    position: fixed;
    right: 16px;
    bottom: 140px;
    z-index: 999;
}

.lead-widget-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #22a559 0%, #06b6d4 100%);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(34, 165, 89, 0.4);
    transition: all 0.3s ease;
}

.lead-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(34, 165, 89, 0.5);
}

.lead-widget-btn svg {
    width: 22px;
    height: 22px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.lead-widget-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #22a559 0%, #06b6d4 100%);
    animation: pulse-ring 2s ease-out infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.lead-widget-popup {
    position: absolute;
    bottom: 55px;
    right: 0;
    width: 280px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lead-widget.active .lead-widget-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lead-widget-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lead-widget-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lead-widget-close svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 2;
}

.lead-widget-header {
    text-align: center;
    margin-bottom: 16px;
}

.lead-widget-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.lead-widget-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.lead-widget-field {
    margin-bottom: 12px;
}

.lead-widget-field input,
.lead-widget-field select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.lead-widget-field input:focus,
.lead-widget-field select:focus {
    outline: none;
    border-color: #22a559;
    background: rgba(255, 255, 255, 0.08);
}

.lead-widget-field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.lead-widget-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
}

.lead-widget-field select option {
    background: #1f2937;
    color: white;
}

.lead-widget-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #22a559 0%, #06b6d4 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 165, 89, 0.3);
}

.lead-widget-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 165, 89, 0.4);
}

.lead-widget-submit svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 2;
}

.lead-widget-privacy {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin-top: 12px;
}

/* ==================== ACCESSIBILITY BUTTON OVERRIDE ==================== */
/* Positioned at the very bottom */
.accessibility-widget {
    position: fixed;
    bottom: 20px !important;
    right: 16px !important;
    z-index: 99999;
}

.accessibility-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 10px !important;
    border-radius: 50% !important;
    font-size: 0 !important;
}

.accessibility-toggle svg {
    width: 22px !important;
    height: 22px !important;
}

.accessibility-toggle-text {
    display: none !important;
}

/* ==================== MOBILE ADJUSTMENTS ==================== */
@media (max-width: 768px) {
    .whatsapp-btn,
    .lead-widget,
    .back-to-top,
    .accessibility-widget {
        right: 12px !important;
    }

    .whatsapp-btn {
        bottom: 75px;
        width: 42px;
        height: 42px;
    }

    .lead-widget {
        bottom: 130px;
    }

    .lead-widget-btn {
        width: 42px;
        height: 42px;
    }

    .back-to-top {
        bottom: 185px;
        width: 42px;
        height: 42px;
    }

    .accessibility-widget {
        bottom: 16px !important;
    }

    .accessibility-toggle {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
    }

    .lead-widget-popup {
        width: 260px;
        right: -8px;
        padding: 16px;
    }

    .lead-widget-header h4 {
        font-size: 15px;
    }

    .lead-widget-field input,
    .lead-widget-field select {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* ==================== VERY SMALL SCREENS ==================== */
@media (max-width: 380px) {
    .whatsapp-btn,
    .lead-widget-btn,
    .back-to-top,
    .accessibility-toggle {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .whatsapp-btn svg,
    .lead-widget-btn svg,
    .back-to-top svg,
    .accessibility-toggle svg {
        width: 20px !important;
        height: 20px !important;
    }

    .lead-widget-popup {
        width: calc(100vw - 40px);
        max-width: 280px;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .whatsapp-btn,
    .back-to-top,
    .lead-widget,
    .accessibility-widget {
        display: none !important;
    }
}
