/* ==========================================================================
   Inevia Floating Form Sidebar - Frontend Styles
   ========================================================================== */

:root {
    --inevia-ffs-primary: #005092;
    --inevia-ffs-header-bg: #1b263b;
    --inevia-ffs-header-text: #ffffff;
    --inevia-ffs-body-bg: #ffffff;
    --inevia-ffs-body-text: #152033;
    --inevia-ffs-trigger-bg: #005092;
    --inevia-ffs-trigger-text: #ffffff;
    --inevia-ffs-width: 330px;
    --inevia-ffs-max-height: 480px;
    --inevia-ffs-radius: 12px;
    --inevia-ffs-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.1);
}

.inevia-ffs-widget-wrap {
    position: fixed;
    z-index: 999990;
    pointer-events: none;
    font-family: inherit;
    box-sizing: border-box;
}

.inevia-ffs-widget-wrap * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Widget Positions
   -------------------------------------------------------------------------- */
.inevia-ffs-widget-wrap.inevia-pos-bottom_right {
  right: var(--inevia-ffs-offset-side, 20px);
    bottom: var(--inevia-ffs-offset-bottom, 115px); /* <-- Change 115px here */
}

.inevia-ffs-widget-wrap.inevia-pos-bottom_left {
    left: var(--inevia-ffs-offset-side, 20px);
    bottom: var(--inevia-ffs-offset-bottom, 75px);
}

.inevia-ffs-widget-wrap.inevia-pos-middle_right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.inevia-ffs-widget-wrap.inevia-pos-middle_left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   Trigger Button
   -------------------------------------------------------------------------- */
.inevia-ffs-trigger-wrap {
    pointer-events: auto;
    display: inline-block;
    position: relative;
    transition: all 0.25s ease;
}

.inevia-ffs-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    background-color: var(--inevia-ffs-trigger-bg);
    color: var(--inevia-ffs-trigger-text);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    user-select: none;
}

.inevia-ffs-trigger-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.inevia-ffs-trigger-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Icon Circle Trigger */
.inevia-trigger-icon_circle .inevia-ffs-trigger-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    padding: 0;
}

/* Pill Badge Trigger */
.inevia-trigger-pill_badge .inevia-ffs-trigger-btn {
    height: 44px;
    padding: 0 18px;
    border-radius: 9999px;
}

/* Side Edge Tab Trigger (Horizontal Docked Tab - Flush to Screen Edge) */
.inevia-ffs-widget-wrap.inevia-widget-side_tab.inevia-pos-bottom_right,
.inevia-ffs-widget-wrap.inevia-widget-side_tab.inevia-pos-middle_right {
    right: 0 !important;
}

.inevia-ffs-widget-wrap.inevia-widget-side_tab.inevia-pos-bottom_left,
.inevia-ffs-widget-wrap.inevia-widget-side_tab.inevia-pos-middle_left {
    left: 0 !important;
}

.inevia-trigger-side_tab {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.inevia-trigger-side_tab .inevia-ffs-trigger-btn {
    padding: 10px 16px 10px 14px;
    border-radius: 8px 0 0 8px;
    writing-mode: horizontal-tb;
    text-orientation: unset;
    transform: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    margin: 0 !important;
}

.inevia-pos-bottom_left .inevia-trigger-side_tab .inevia-ffs-trigger-btn,
.inevia-pos-middle_left .inevia-trigger-side_tab .inevia-ffs-trigger-btn {
    border-radius: 0 8px 8px 0;
    padding: 10px 14px 10px 16px;
    transform: none;
    margin: 0 !important;
}

.inevia-trigger-side_tab .inevia-ffs-trigger-btn:hover {
    transform: translateX(-4px);
    box-shadow: -4px 8px 25px rgba(0, 0, 0, 0.25);
}

.inevia-pos-bottom_left .inevia-trigger-side_tab .inevia-ffs-trigger-btn:hover,
.inevia-pos-middle_left .inevia-trigger-side_tab .inevia-ffs-trigger-btn:hover {
    transform: translateX(4px);
    box-shadow: 4px 8px 25px rgba(0, 0, 0, 0.25);
}

.inevia-ffs-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.inevia-ffs-icon svg {
    display: block;
    stroke: currentColor;
    width: 20px;
    height: 20px;
}

/* Badge */
.inevia-ffs-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    line-height: 1;
}

/* Pulse Animation */
.inevia-ffs-trigger-wrap.has-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    border: 2px solid var(--inevia-ffs-trigger-bg);
    opacity: 0.7;
    animation: ineviaPulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
}

.inevia-trigger-icon_circle.has-pulse::after {
    border-radius: 50%;
}

.inevia-trigger-pill_badge.has-pulse::after {
    border-radius: 9999px;
}

@keyframes ineviaPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   Floating Panel / Compact Card
   -------------------------------------------------------------------------- */
.inevia-ffs-panel {
    position: absolute;
    width: var(--inevia-ffs-width, 330px);
    max-width: calc(100vw - 32px);
    max-height: var(--inevia-ffs-max-height, 480px);
    height: auto;
    background: var(--inevia-ffs-body-bg);
    color: var(--inevia-ffs-body-text);
    border-radius: var(--inevia-ffs-radius, 12px);
    box-shadow: var(--inevia-ffs-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.97);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.25s ease;
}

/* Active Open State */
.inevia-ffs-widget-wrap.is-open .inevia-ffs-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
	margin-bottom: 30px;
}

/* Hide trigger button when open in bottom corner mode */
.inevia-ffs-widget-wrap.is-open.inevia-pos-bottom_right .inevia-ffs-trigger-wrap,
.inevia-ffs-widget-wrap.is-open.inevia-pos-bottom_left .inevia-ffs-trigger-wrap {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* Panel positioning per corner */
.inevia-pos-bottom_right .inevia-ffs-panel {
    right: 0;
    bottom: 0;
    transform-origin: bottom right;
}

.inevia-pos-bottom_left .inevia-ffs-panel {
    left: 0;
    bottom: 0;
    transform-origin: bottom left;
}

.inevia-pos-middle_right .inevia-ffs-panel {
    right: 50px;
    top: 50%;
    transform: translateY(-50%) translateX(16px) scale(0.96);
    transform-origin: center right;
}

.inevia-ffs-widget-wrap.is-open.inevia-pos-middle_right .inevia-ffs-panel {
    transform: translateY(-50%) translateX(0) scale(1);
}

.inevia-pos-middle_left .inevia-ffs-panel {
    left: 50px;
    top: 50%;
    transform: translateY(-50%) translateX(-16px) scale(0.96);
    transform-origin: center left;
}

.inevia-ffs-widget-wrap.is-open.inevia-pos-middle_left .inevia-ffs-panel {
    transform: translateY(-50%) translateX(0) scale(1);
}

/* --------------------------------------------------------------------------
   Header Bar (Compact & Sleek)
   -------------------------------------------------------------------------- */
.inevia-ffs-header {
    background: var(--inevia-ffs-header-bg);
    color: var(--inevia-ffs-header-text);
    padding: 12px 18px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inevia-ffs-header-text h3 {
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: var(--inevia-ffs-header-text) !important;
}

.inevia-ffs-subtitle {
    margin: 3px 0 0 !important;
    font-size: 13px !important;
    opacity: 0.88;
    line-height: 1.3 !important;
    color: var(--inevia-ffs-header-text) !important;
}

.inevia-ffs-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--inevia-ffs-header-text);
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 6px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    padding: 0 !important;
}

.inevia-ffs-close-btn svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block !important;
    pointer-events: none;
}

.inevia-ffs-icon svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: block !important;
    pointer-events: none;
}

.inevia-ffs-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   Body & Content Area (Compact Floating Card)
   -------------------------------------------------------------------------- */
.inevia-ffs-body {
    padding: 14px 18px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

/* Sleek Modern Thin Scrollbar */
.inevia-ffs-body::-webkit-scrollbar {
    width: 5px;
}

.inevia-ffs-body::-webkit-scrollbar-track {
    background: transparent;
}

.inevia-ffs-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.inevia-ffs-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.inevia-ffs-custom-content {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--inevia-ffs-body-text);
    margin-bottom: 12px;
}

.inevia-ffs-custom-content p:last-child {
    margin-bottom: 0;
}

.inevia-ffs-no-form-msg {
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 6px;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   Contact Form 7 Clean Typography & Card Styling
   -------------------------------------------------------------------------- */
.inevia-ffs-form-content form {
    margin: 0 !important;
    padding: 0 !important;
}

.inevia-ffs-form-content br {
    display: none !important;
}

.inevia-ffs-form-content p {
    margin: 0 0 9px 0 !important;
    padding: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.25 !important;
    color: var(--inevia-ffs-body-text) !important;
}

.inevia-ffs-form-content p:last-of-type {
    margin-bottom: 0 !important;
}

.inevia-ffs-form-content label {
    display: block !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    margin: 0 0 3px 0 !important;
    line-height: 1.25 !important;
    color: var(--inevia-ffs-body-text) !important;
}

.inevia-ffs-form-content .wpcf7-form-control-wrap {
    display: block !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

.inevia-ffs-form-content input[type="text"],
.inevia-ffs-form-content input[type="email"],
.inevia-ffs-form-content input[type="tel"],
.inevia-ffs-form-content input[type="url"],
.inevia-ffs-form-content input[type="number"],
.inevia-ffs-form-content select {
    width: 100% !important;
    padding: 7px 12px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border: 1.5px solid #d1d5db !important;
    background: #ffffff !important;
    color: #1e293b !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none !important;
    font-family: inherit !important;
    margin: 0 !important;
}

.inevia-ffs-form-content textarea {
    width: 100% !important;
    padding: 8px 12px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 85px !important;
    border: 1.5px solid #d1d5db !important;
    background: #ffffff !important;
    color: #1e293b !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none !important;
    font-family: inherit !important;
    resize: none !important;
    margin: 0 !important;
}

.inevia-ffs-form-content input:focus,
.inevia-ffs-form-content select:focus,
.inevia-ffs-form-content textarea:focus {
    border-color: var(--inevia-ffs-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 80, 146, 0.12) !important;
}

.inevia-ffs-form-content input[type="submit"],
.inevia-ffs-form-content button[type="submit"] {
    width: 100% !important;
    padding: 9px 16px !important;
    height: 38px !important;
    background: var(--inevia-ffs-primary) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 5px !important;
    box-shadow: 0 3px 10px rgba(0, 80, 146, 0.2) !important;
    line-height: 1 !important;
    letter-spacing: 0.2px !important;
}

.inevia-ffs-form-content input[type="submit"]:hover,
.inevia-ffs-form-content button[type="submit"]:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 80, 146, 0.28) !important;
}

/* CF7 Spinner */
.inevia-ffs-form-content .wpcf7-spinner {
    display: block !important;
    margin: 4px auto 0 !important;
}

/* CF7 Validation Notices */
.inevia-ffs-form-content .wpcf7-not-valid-tip {
    font-size: 12px !important;
    color: #dc2626 !important;
    margin-top: 2px !important;
}

.inevia-ffs-form-content .wpcf7-response-output {
    margin: 8px 0 0 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
}

/* --------------------------------------------------------------------------
   Backdrop Overlay (Modal Mode Only)
   -------------------------------------------------------------------------- */
.inevia-ffs-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: auto;
    z-index: -1;
}

.inevia-ffs-widget-wrap.has-backdrop-blur.is-open .inevia-ffs-backdrop {
    opacity: 1;
    visibility: visible;
}

/* In no-backdrop mode: ensure zero blur and landing page is 100% clear and clickable */
.inevia-ffs-widget-wrap.no-backdrop-clear .inevia-ffs-backdrop {
    display: none !important;
}

/* Ensure cookie banner close SVG is constrained */
.cmplz-cookiebanner .cmplz-close svg,
.cmplz-close svg {
    max-width: 18px !important;
    max-height: 18px !important;
}

/* --------------------------------------------------------------------------
   Mobile Viewport Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .inevia-ffs-widget-wrap.inevia-pos-bottom_right,
    .inevia-ffs-widget-wrap.inevia-pos-bottom_left {
        right: 12px;
        left: auto;
        bottom: 12px;
    }

    .inevia-ffs-panel {
        position: fixed;
        right: 10px !important;
        left: 10px !important;
        bottom: 10px !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        max-height: 80vh !important;
        transform: translateY(100%) !important;
    }

    .inevia-ffs-widget-wrap.is-open .inevia-ffs-panel {
        transform: translateY(0) !important;
    }
}
