/**
 * Aerokompozit Translator Switcher Styles
 */

/* ==========================================================================
   Google Translate Headless Cleanup (CRITICAL)
   ========================================================================== */

/* Hide the default Google Translate top banner bar */
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
.goog-te-banner {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
}

/* Force body to stay at the very top (Google pushes it down by 40px) */
body {
    top: 0px !important;
    position: static !important;
}

/* Hide Google's original popup tooltips on text hover */
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Remove hover highlight boxes and cursor styling on translated elements */
font.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
    box-shadow: 0 0 0 transparent !important;
    border: none !important;
    box-sizing: border-box !important;
}

/* Hide other translation layout leftovers */
.skiptranslate,
iframe.goog-te-menu-frame {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ==========================================================================
   Premium Sliding Pill Switcher Style (Optimized for Dark Teal Headers)
   ========================================================================== */

.ak-lang-switcher-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12); /* Glassmorphic semi-transparent white */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 3px;
    width: 90px;
    height: 32px;
    box-sizing: border-box;
    overflow: hidden;
    vertical-align: middle;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ak-lang-switcher-pill:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.16);
}

/* The sliding indicator background (White pill) */
.ak-lang-switcher-pill .ak-lang-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 41px;
    height: 26px;
    background: #ffffff; /* Solid White Slider */
    border-radius: 20px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    z-index: 1;
}

/* Sliding active states */
.ak-lang-switcher-pill .ak-lang-slider.tr {
    transform: translateX(0);
}

.ak-lang-switcher-pill .ak-lang-slider.en {
    transform: translateX(43px);
}

/* Interactive options */
.ak-lang-switcher-pill .ak-lang-option {
    position: relative;
    flex: 1;
    background: none !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    width: 50% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    color: rgba(255, 255, 255, 0.75) !important; /* Standout soft white for inactive */
    cursor: pointer !important;
    z-index: 2 !important;
    text-align: center !important;
    transition: color 0.2s ease !important;
    user-select: none !important;
    line-height: 26px !important;
    box-shadow: none !important;
}

/* Active option becomes dark teal over the solid white sliding pill */
.ak-lang-switcher-pill .ak-lang-option.active {
    color: rgb(7, 64, 70) !important; /* Contrasting brand dark teal */
}

.ak-lang-switcher-pill .ak-lang-option:not(.active):hover {
    color: #ffffff !important;
}

/* ==========================================================================
   Minimalist Text Separated Switcher Style (Optimized for Dark Headers)
   ========================================================================== */

.ak-lang-switcher-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.ak-lang-switcher-text .ak-lang-link {
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent !important;
    padding-bottom: 2px !important;
}

.ak-lang-switcher-text .ak-lang-link.active {
    color: #ffffff !important;
    border-bottom-color: #ffffff !important;
}

.ak-lang-switcher-text .ak-lang-link:not(.active):hover {
    color: #ffffff !important;
}

.ak-lang-switcher-text .ak-lang-divider {
    color: rgba(255, 255, 255, 0.2) !important;
    user-select: none !important;
}

/* ==========================================================================
   Floating Switcher Widget Option (Bottom-Right, White Card Context)
   ========================================================================== */

.ak-floating-lang-switcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background: #ffffff;
    border-radius: 40px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ak-floating-lang-switcher:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16), 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Override the floating pill switch to use dark teal styling for light backgrounds */
.ak-floating-lang-switcher .ak-lang-switcher-pill {
    background: rgba(7, 64, 70, 0.08) !important;
    border: 1px solid rgba(7, 64, 70, 0.15) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.ak-floating-lang-switcher .ak-lang-switcher-pill:hover {
    background: rgba(7, 64, 70, 0.12) !important;
    border-color: rgba(7, 64, 70, 0.25) !important;
}

.ak-floating-lang-switcher .ak-lang-switcher-pill .ak-lang-slider {
    background: rgb(7, 64, 70) !important; /* Dark teal background slider */
    box-shadow: 0 2px 5px rgba(7, 64, 70, 0.3) !important;
}

.ak-floating-lang-switcher .ak-lang-switcher-pill .ak-lang-option {
    color: rgb(7, 64, 70) !important; /* Soft dark teal text for inactive */
}

.ak-floating-lang-switcher .ak-lang-switcher-pill .ak-lang-option.active {
    color: #ffffff !important; /* White text for active inside dark teal slider */
}

.ak-floating-lang-switcher .ak-lang-switcher-pill .ak-lang-option:not(.active):hover {
    color: rgba(7, 64, 70, 0.7) !important;
}

/* Header style support inside Elementor layouts (ensures no theme interference) */
.elementor-widget-shortcode .ak-lang-switcher-pill,
.elementor-widget-text-editor .ak-lang-switcher-pill {
    vertical-align: middle;
}

/* ==========================================================================
   Slider Revolution Translation Clipping & Overlapping Fix (CRITICAL)
   ========================================================================== */

/* 
   When Google Translate is active, the HTML tag receives the '.translated-ltr' class.
   We target text/headline layers and wrappers in Slider Revolution to prevent clipping
   WITHOUT overriding container heights to prevent layout collapsing.
*/

/* 1. Target all text/headline/caption tags and classes directly to prevent clipping and force text wrapping */
html.translated-ltr sr7-txt,
html.translated-ltr rs-layer[data-type="text"],
html.translated-ltr rs-layer[data-type="headline"],
html.translated-ltr .tp-caption {
    overflow: visible !important;
    white-space: normal !important;
}

/* Ensure font elements injected by Google Translate behave correctly inside these layers */
html.translated-ltr sr7-txt font,
html.translated-ltr rs-layer font,
html.translated-ltr .tp-caption font {
    display: inline !important;
    white-space: normal !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 2. Target ALL Slider Revolution wrappers and mask elements to allow them to display overflow text */
html.translated-ltr sr7-layer-wrap,
html.translated-ltr sr7-loop-wrap,
html.translated-ltr sr7-mask-wrap,
html.translated-ltr rs-layer-wrap,
html.translated-ltr rs-loop-wrap,
html.translated-ltr rs-mask-wrap,
html.translated-ltr sr7-mask,
html.translated-ltr rs-mask,
html.translated-ltr .sr7-layer-wrap,
html.translated-ltr .sr7-loop-wrap,
html.translated-ltr .sr7-mask-wrap,
html.translated-ltr .tp-parallax-wrap,
html.translated-ltr .tp-loop-wrap,
html.translated-ltr .tp-mask-wrap {
    overflow: visible !important;
}

/* Ensure nested children inside wrappers do not have overflow constraints */
html.translated-ltr sr7-layer-wrap *,
html.translated-ltr sr7-loop-wrap *,
html.translated-ltr sr7-mask-wrap *,
html.translated-ltr rs-layer-wrap *,
html.translated-ltr rs-loop-wrap *,
html.translated-ltr rs-mask-wrap *,
html.translated-ltr .tp-parallax-wrap *,
html.translated-ltr .tp-loop-wrap *,
html.translated-ltr .tp-mask-wrap * {
    overflow: visible !important;
}

/* Custom typography overrides for long translated titles to prevent overlapping */
.ak-title-fit-slide2 {
    display: inline-block !important;
    white-space: normal !important;
    text-align: left !important;
    line-height: 1.15 !important;
}

.ak-title-fit-tech {
    display: inline-block !important;
    white-space: normal !important;
    text-align: left !important;
    line-height: 1.15 !important;
}

@media (min-width: 1024px) {
    .ak-title-fit-slide2 {
        margin-left: 120px !important; /* Push Slide 2 text block right to clear absolute side label */
    }
    .ak-title-fit-tech {
        margin-left: 140px !important; /* Push Tech page title block right to clear the vertical "TECHNOLOGY" label */
    }
}
