/* Ask CTA Plugin Styles - Optimized */

/* CSS Variables for consistent theming */
:root {
    --ask-cta-z-index: 9999;
    --ask-cta-bg: #f7f2ee;
    --ask-cta-bg-collapsed: #e6dace;
    --ask-cta-text: #2b2b2b;
    --ask-cta-border: rgba(0, 0, 0, 0.08);
    --ask-cta-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --ask-cta-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --ask-cta-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset and base styles */
#ask-cta-container,
#ask-cta-container *,
.ask-cta-badge,
.ask-cta-badge * {
    box-sizing: border-box !important;
}

/* Skip link for accessibility */
.ask-cta-skip-link {
    position: absolute !important;
    top: -40px !important;
    left: 6px !important;
    background: #000000 !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    z-index: calc(var(--ask-cta-z-index) + 1) !important;
    transition: top 0.3s ease !important;
    outline: none !important;
}

.ask-cta-skip-link:focus {
    top: 6px !important;
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
}

/* Skip target */
#ask-cta-skip-target {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

/* Container */
#ask-cta-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: var(--ask-cta-z-index) !important;
}

/* Badge base styles */
.ask-cta-badge {
    position: fixed !important;
    max-width: 380px !important;
    width: 90vw !important;
    background: var(--ask-cta-bg) !important;
    border-radius: 16px !important;
    box-shadow: var(--ask-cta-shadow) !important;
    border: 1px solid var(--ask-cta-border) !important;
    pointer-events: auto !important;
    transition: var(--ask-cta-transition) !important;
    overflow: hidden !important;
    z-index: var(--ask-cta-z-index) !important;
    right: 30px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-family: var(--ask-cta-font) !important;
}

/* Dynamic device-based flash prevention */
.ask-cta-badge:not(.ask-cta-initialized) {
    /* Default expanded state for uninitialized badges on desktop */
    max-width: 380px !important;
    width: 90vw !important;
    height: auto !important;
    border-radius: 16px !important;
    background: var(--ask-cta-bg) !important;
}

/* Immediate mobile flash prevention - hide content on mobile before JS loads */
@media (max-width: 768px) {
    .ask-cta-badge:not(.ask-cta-initialized) {
        max-width: 50px !important;
        width: 50px !important;
        height: 140px !important;
        right: 20px !important;
        left: auto !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        border-radius: 10px !important;
        background: #e6dace !important;
    }
    
    .ask-cta-badge:not(.ask-cta-initialized) .ask-cta-badge-content {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
    
    .ask-cta-badge:not(.ask-cta-initialized) .collapsed-text {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 14px !important;
        padding: 8px !important;
        letter-spacing: 0.8px !important;
    }
}

.ask-cta-badge:not(.ask-cta-initialized) .ask-cta-badge-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

.ask-cta-badge:not(.ask-cta-initialized) .collapsed-text {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Device-specific positioning for uninitialized badges */
.ask-cta-badge.ask-cta-mobile:not(.ask-cta-initialized) {
    max-width: 50px !important;
    width: 50px !important;
    height: 140px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    bottom: 20px !important;
    transform: none !important;
    border-radius: 10px !important;
    background: #e6dace !important;
}

.ask-cta-badge.ask-cta-mobile:not(.ask-cta-initialized) .ask-cta-badge-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.ask-cta-badge.ask-cta-mobile:not(.ask-cta-initialized) .collapsed-text {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    padding: 8px !important;
    letter-spacing: 0.8px !important;
}

.ask-cta-badge.ask-cta-tablet:not(.ask-cta-initialized) {
    max-width: 55px !important;
    width: 55px !important;
    height: 150px !important;
    right: 25px !important;
    border-radius: 11px !important;
    background: #e6dace !important;
}

.ask-cta-badge.ask-cta-tablet:not(.ask-cta-initialized) .ask-cta-badge-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.ask-cta-badge.ask-cta-tablet:not(.ask-cta-initialized) .collapsed-text {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.ask-cta-badge.ask-cta-desktop:not(.ask-cta-initialized) {
    /* Desktop starts expanded - keep default expanded styles */
    max-width: 380px !important;
    width: 90vw !important;
    height: auto !important;
    border-radius: 16px !important;
    background: var(--ask-cta-bg) !important;
}

/* Badge content */
.ask-cta-badge-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

/* Badge header */
.ask-cta-badge-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 24px 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: #f7f2ee !important;
    color: #1f2937 !important;
    min-height: 50px !important;
}

.ask-cta-badge-header h4 {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    color: #1f2937 !important;
    line-height: 1.3 !important;
    text-shadow: none !important;
    font-family: constantia, sans-serif !important;
}

/* Close button */
.ask-cta-close {
    background: transparent !important;
    border: none !important;
    font-size: 24px !important;
    color: #2d3748 !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    text-shadow: none !important;
    font-weight: 300 !important;
    outline: none !important;
    position: relative !important;
}

.ask-cta-close:hover {
    background: rgba(43, 43, 43, 0.1) !important;
    border: none !important;
    transform: scale(1.1) !important;
    color: #1a202c !important;
}

/* Enhanced focus styles for accessibility */
.ask-cta-close:focus {
    background: rgba(43, 43, 43, 0.15) !important;
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
    color: #1a202c !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

.ask-cta-close:focus-visible {
    background: rgba(43, 43, 43, 0.15) !important;
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
    color: #1a202c !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

/* Badge body and footer */
.ask-cta-badge-body {
    padding: 20px 24px !important;
    color: #1f2937 !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
    background: #f7f2ee !important;
    font-weight: 500 !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
}

.ask-cta-badge-body p {
    font-family: helvetica-neue-lt-pro, sans-serif !important;
    font-weight: 300 !important;
}

/* Custom scrollbar for badge body */
.ask-cta-badge-body::-webkit-scrollbar {
    width: 4px !important;
}

.ask-cta-badge-body::-webkit-scrollbar-track {
    background: transparent !important;
}

.ask-cta-badge-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 2px !important;
}

.ask-cta-badge-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3) !important;
}

.ask-cta-badge-footer {
    padding: 0 24px 24px !important;
    background: #f7f2ee !important;
}

/* Button styles */
.ask-cta-button {
    display: inline-block !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    text-decoration: none !important;
    padding: 14px 28px !important;
    border-radius: 12px !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

.ask-cta-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
    color: white !important;
}

.ask-cta-button:focus {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.3) !important;
}

.ask-cta-button:focus-visible {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.3) !important;
}

/* Collapsed text styles */
.collapsed-text {
    cursor: pointer !important;
    outline: none !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.collapsed-text:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
    background: rgba(102, 126, 234, 0.1) !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

.collapsed-text:focus-visible {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
    background: rgba(102, 126, 234, 0.1) !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

/* Hide collapsed text when badge is expanded */
.ask-cta-badge:not(.scrolled) .collapsed-text {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Collapsed state */
.ask-cta-badge.scrolled {
    max-width: 60px !important;
    width: 60px !important;
    height: 160px !important;
    border-radius: 12px !important;
    right: 30px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    overflow: hidden !important;
    background: #e6dace !important;
    box-shadow: 0 15px 40px rgba(230, 218, 206, 0.3) !important;
}

.ask-cta-badge.scrolled .ask-cta-badge-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.ask-cta-badge.scrolled .collapsed-text {
    display: flex !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    color: #2d3748 !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    letter-spacing: 1px !important;
    line-height: 1 !important;
    width: 100% !important;
    height: 100% !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

/* Animation states */
.ask-cta-badge.collapsing,
.ask-cta-badge.expanding {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover effects - removed for cleaner experience */
/* .ask-cta-badge:hover:not(.scrolled) {
    transform: translateY(-50%) scale(1.02) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2) !important;
} */

/* Responsive Design */
/* Tablet - Medium screens */
@media (max-width: 1024px) {
    .ask-cta-badge {
        max-width: 320px !important;
        width: 320px !important;
        right: 20px !important;
    }
    
    .ask-cta-badge.scrolled {
        max-width: 60px !important;
        width: 60px !important;
        height: 160px !important;
        right: 20px !important;
    }
}

/* Mobile - Small screens */
@media (max-width: 768px) {
    .ask-cta-badge {
        max-width: calc(100vw - 40px) !important;
        width: calc(100vw - 40px) !important;
        right: 20px !important;
        left: 20px !important;
        top: auto !important;
        bottom: 20px !important;
        transform: none !important;
        border-radius: 12px !important;
    }
    
    /* Make expanded content narrower while keeping collapsed button same size */
    .ask-cta-badge:not(.scrolled) {
        max-width: calc(100vw - 80px) !important;
        width: calc(100vw - 80px) !important;
        right: 40px !important;
        left: 40px !important;
    }
    
    .ask-cta-badge.scrolled {
        max-width: 50px !important;
        width: 50px !important;
        height: 140px !important;
        right: 20px !important;
        left: auto !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        border-radius: 10px !important;
    }
    
    .ask-cta-badge.scrolled .collapsed-text {
        font-size: 14px !important;
        padding: 8px !important;
        letter-spacing: 0.8px !important;
    }
    
    .ask-cta-badge-header {
        padding: 14px 20px 10px !important;
        min-height: 45px !important;
    }
    
    .ask-cta-badge-header h3 {
        font-size: 16px !important;
    }
    
    .ask-cta-badge-body {
        padding: 16px 20px !important;
        font-size: 14px !important;
        max-height: 66vh !important;
    }
    
    .ask-cta-badge-footer {
        padding: 0 20px 20px !important;
    }
    
    .ask-cta-button {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* Small Mobile - Extra small screens */
@media (max-width: 480px) {
    .ask-cta-badge {
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        right: 10px !important;
        left: 10px !important;
        bottom: 15px !important;
        border-radius: 10px !important;
    }
    
    .ask-cta-badge.scrolled {
        max-width: 45px !important;
        width: 45px !important;
        height: 120px !important;
        right: 10px !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        border-radius: 8px !important;
    }
    
    .ask-cta-badge.scrolled .collapsed-text {
        font-size: 12px !important;
        padding: 6px !important;
        letter-spacing: 0.6px !important;
    }
    
    .ask-cta-badge-header {
        padding: 12px 16px 8px !important;
        min-height: 40px !important;
    }
    
    .ask-cta-badge-header h3 {
        font-size: 15px !important;
    }
    
    .ask-cta-badge-body {
        padding: 14px 16px !important;
        font-size: 13px !important;
        max-height: 66vh !important;
    }
    
    .ask-cta-badge-footer {
        padding: 0 16px 16px !important;
    }
    
    .ask-cta-button {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    .ask-cta-close {
        width: auto !important;
        height: auto !important;
        font-size: 20px !important;
        background: transparent !important;
        border: none !important;
        padding: 6px !important;
        border-radius: 0 !important;
    }
}

/* Landscape Mobile - Handle orientation changes */
@media (max-width: 768px) and (orientation: landscape) {
    .ask-cta-badge {
        top: 20px !important;
        bottom: auto !important;
        max-height: calc(66vh - 40px) !important;
        height: auto !important;
    }
    
    .ask-cta-badge.scrolled {
        top: 50% !important;
        bottom: auto !important;
        height: 80px !important;
        transform: translateY(-50%) !important;
    }
}

.fluentform_wrapper_66 {
    padding: 0 !important;
    background-color: transparent !important;
}

.ff-default .ff-el-form-control:focus {
    border: none !important;
  }