/* ==========================================================================
   DIRECTLY IMPORTED REAL EXTENSION STYLES (1:1 FROM src/styles/)
   ========================================================================== */
/* ==========================================================================
   AESTHETIC BUTTONS - Premium Retro-Industrial UI
   Only active when body has class 'ui-style-aesthetic'
   ========================================================================== */

/* NOTE: Cannot use @import in content scripts due to CSP restrictions */

/* ===== Global Colors & Variables ===== */
:root {
    --phosphor-green: #39FF14;
    --active-orange: #FF5A00;
}

.ui-style-aesthetic {
    --ceramic-pure: #FDFDFD;
    --ceramic-gradient: linear-gradient(135deg, #FFFFFF 0%, #F5F5F7 100%);
    --titanium: #D4D4D8;
    --danger-red: #FF3B30;
    --panel-bg: #E8E8EB;
}

/* ===== Hide simple buttons when aesthetic mode is active ===== */
.ui-style-aesthetic .ai-voice-btn {
    display: none !important;
}

/* ===== Show aesthetic modules ===== */
.ui-style-aesthetic .aesthetic-module {
    display: flex !important;
}

/* ===== Hide aesthetic modules in simple mode ===== */
.ui-style-simple .aesthetic-module {
    display: none !important;
}

/* ===== Module Wrapper ===== */
.aesthetic-module {
    display: none;
    align-items: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 0 4px;
}


/* ===== AUDIO MODULE - DJI Mic Style Design ===== */
.audio-module {
    height: 36px;
    overflow: visible;
    align-self: center;
}

.audio-module .audio-main {
    width: 34px;
    height: 36px;
    position: relative;
    z-index: 20;
    cursor: pointer;
}

/* DJI Mic Chassis - Main body (LIGHT MODE) */
.reel-chassis {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(165deg, #FFFFFF 0%, #F5F5F7 50%, #E8E8EB 100%);
    box-shadow:
        0 4px 12px -2px rgba(0, 0, 0, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(200, 200, 205, 0.8);
    overflow: hidden;
}

/* Metal mesh grille texture overlay (light) */
.reel-chassis::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    height: 16px;
    background:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.06) 1px,
            rgba(0, 0, 0, 0.06) 2px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.06) 1px,
            rgba(0, 0, 0, 0.06) 2px);
    background-size: 3px 3px;
    background-color: rgba(180, 180, 185, 0.3);
    border-radius: 4px;
    opacity: 1;
}

/* MIC indicator light at bottom (light) */
.reel-chassis::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 3px;
    background: linear-gradient(180deg, #C8C8CC 0%, #A8A8AC 100%);
    border-radius: 1.5px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Reel housing now shows MIC text */
.reel-housing {
    width: 100%;
    height: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

/* MIC text label (light) */
.reel-housing::before {
    content: 'MIC';
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
    color: rgba(80, 80, 85, 0.9);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Hidden tape mechanism - no longer needed */
.tape-mechanism {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* Status LED - positioned behind the indicator bar (light) */
.bearing-ruby {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 3px;
    border-radius: 1.5px;
    background: linear-gradient(180deg, #BEBEC2 0%, #9E9EA2 100%);
    transition: all 0.3s ease;
    z-index: 5;
}

/* ===== Audio Sidecar (Timer + Waveform) ===== */
.audio-sidecar {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: 0;
    opacity: 0;
    background: var(--panel-bg);
    border-radius: 8px 6px 6px 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-left: 22px;
    z-index: 10;
    border: 1px solid rgba(200, 200, 205, 0.6);
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

.audio-module.recording .audio-sidecar {
    width: 168px;
    opacity: 1;
    pointer-events: auto;
}

.led-timer {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    color: #222;
    background: #D1D1D4;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-right: 6px;
    flex-shrink: 0;
}

.waveform-v12 {
    flex: 1;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-right: 10px;
}

.wave-bar-v12 {
    width: 3px;
    height: 4px;
    background: #555;
    border-radius: 1.5px;
    transition: all 0.1s ease;
}

/* ===== SCREEN MODULE - Retro TV Design ===== */
.screen-module {
    height: 34px;
    overflow: visible;
    align-self: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), margin-left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Push screen module right when audio is recording */
.audio-module.recording~.screen-module {
    margin-left: 168px;
}

.screen-module .screen-main {
    width: 42px;
    height: 34px;
    position: relative;
    z-index: 20;
    cursor: pointer;
    margin-top: 0;
}

.antenna-system {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.antenna {
    width: 1.5px;
    height: 8px;
    background: #8E8E93;
    border-bottom: 1px solid #555;
    border-radius: 1px;
}

.antenna.left {
    transform: rotate(-25deg);
}

.antenna.right {
    transform: rotate(25deg);
}

.monitor-chassis {
    position: absolute;
    inset: 0;
    background: #F5F5F7;
    background-image: linear-gradient(135deg, #FFFFFF 0%, #E8E8EE 100%);
    border-radius: 5px;
    box-shadow:
        0 4px 12px -2px rgba(0, 0, 0, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #C2C2CA;
}

.crt-glass {
    width: 30px;
    height: 22px;
    background: #4A4A4A;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}

/* Green Grid Idle State */
.grid-system {
    position: absolute;
    inset: 0;
    background-color: #4A4A4A;
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.25) 1px, transparent 1px);
    background-size: 10px 10px;
    background-position: center center;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
}

.screen-module.idle .grid-system {
    opacity: 1;
    animation: grid-scroll 2s linear infinite;
}

.grid-sweep {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, transparent, rgba(0, 255, 65, 0.2), transparent);
    z-index: 2;
    pointer-events: none;
}

.screen-module.idle .grid-sweep {
    animation: grid-sweep 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.grid-markers {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 255, 65, 0.2);
    margin: 4px;
    pointer-events: none;
    z-index: 3;
}

.grid-markers::before {
    content: 'SCAN';
    position: absolute;
    top: 1px;
    left: 1px;
    font-size: 5px;
    color: var(--phosphor-green);
    opacity: 0.5;
    font-family: 'Share Tech Mono', monospace;
}

/* Recording Mode Viewfinder */
.viewfinder {
    position: absolute;
    inset: 0;
    opacity: 0;
    padding: 4px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.screen-module.recording .viewfinder {
    opacity: 1;
}

.screen-module.recording .grid-system {
    display: none;
}

.crt-scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0.1) 50%, rgba(0, 0, 0, 0.3) 50%);
    background-size: 100% 2px;
    z-index: 8;
    opacity: 0.25;
}

.crt-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0;
    z-index: 7;
    mix-blend-mode: screen;
}

.screen-module.recording .crt-noise {
    opacity: 0.15;
    animation: noise-move 0.1s steps(2) infinite;
}

/* Screen Sidecar */
.screen-sidecar {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: 0;
    opacity: 0;
    background: var(--panel-bg);
    border-radius: 15px 6px 6px 15px;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-left: 18px;
    z-index: 10;
    border: 1px solid #FFF;
    box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

.screen-module.recording .screen-sidecar {
    width: 128px;
    opacity: 1;
    pointer-events: auto;
}

/* ===== Unified Pause Overlay ===== */
.pause-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 20, 60, 0.65);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

/* Draw pause bars with pseudo-elements */
.pause-overlay::before,
.pause-overlay::after {
    content: "";
    width: 4px;
    height: 14px;
    background: #FFF;
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: scaleY(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.paused .pause-overlay {
    opacity: 1;
}

.paused .pause-overlay::before,
.paused .pause-overlay::after {
    opacity: 1;
    transform: scaleY(1);
}

/* Hide the text element, we're using pseudo-elements now */
.pause-text {
    display: none;
}

/* ===== Action Control Buttons ===== */
.action-ctrl {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 5px;
    background: #FDFDFD;
    border: 1px solid #D1D1D6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    cursor: pointer;
    transition: all 0.15s;
    color: #444;
    flex-shrink: 0;
}

.action-ctrl:active {
    transform: scale(0.9);
    background: #E6E6E6;
}

.mute-btn.active {
    color: var(--danger-red);
    border-color: var(--danger-red);
    background: rgba(255, 42, 42, 0.05);
}

/* ===== Animations ===== */
@keyframes superSlowSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes turboSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes ledBreathRed {

    0%,
    100% {
        opacity: 0.4;
        background: var(--danger-red);
        box-shadow: 0 0 4px var(--danger-red);
    }

    50% {
        opacity: 1;
        background: var(--danger-red);
        box-shadow: 0 0 10px var(--danger-red);
    }
}

@keyframes grid-scroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 10px 10px;
    }
}

@keyframes grid-sweep {
    0% {
        top: -50%;
    }

    100% {
        top: 150%;
    }
}

@keyframes noise-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 40px 40px;
    }
}

/* ===== State Classes ===== */
/* Idle state - MIC text breathes between gray and green */
.audio-module.idle .reel-housing::before {
    animation: micTextBreath 2.5s ease-in-out infinite;
}

/* Idle state - LED has breathing animation (ready state) */
.audio-module.idle .bearing-ruby {
    animation: micIdleBreath 2.5s ease-in-out infinite;
}

/* Idle state - button body has subtle glow pulse */
.audio-module.idle .reel-chassis {
    animation: micBodyPulse 2.5s ease-in-out infinite;
}

/* MIC text breathing animation */
@keyframes micTextBreath {

    0%,
    100% {
        color: rgba(80, 80, 85, 0.8);
        text-shadow: none;
    }

    50% {
        color: rgba(76, 175, 80, 0.95);
        text-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
    }
}

/* LED breathing animation - more visible green glow */
@keyframes micIdleBreath {

    0%,
    100% {
        background: linear-gradient(180deg, #9ED4A6 0%, #6DB87A 100%);
        box-shadow: 0 0 3px rgba(109, 184, 122, 0.4);
    }

    50% {
        background: linear-gradient(180deg, #66BB6A 0%, #43A047 100%);
        box-shadow:
            0 0 6px rgba(67, 160, 71, 0.7),
            0 0 10px rgba(76, 175, 80, 0.4);
    }
}

/* Button body subtle glow pulse */
@keyframes micBodyPulse {

    0%,
    100% {
        box-shadow:
            0 4px 12px -2px rgba(0, 0, 0, 0.12),
            0 2px 4px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    50% {
        box-shadow:
            0 4px 12px -2px rgba(0, 0, 0, 0.12),
            0 2px 4px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            0 0 8px rgba(76, 175, 80, 0.25);
    }
}

/* Recording state - LED bar glows red */
.audio-module.recording .bearing-ruby {
    background: linear-gradient(180deg, #FF4444 0%, #CC0000 100%);
    box-shadow:
        0 0 8px rgba(255, 68, 68, 0.8),
        0 0 16px rgba(255, 68, 68, 0.5),
        0 2px 4px rgba(255, 0, 0, 0.6);
    animation: micLedPulse 1.5s ease-in-out infinite;
}

/* Recording state - MIC text turns orange */
.audio-module.recording .reel-housing::before {
    color: var(--active-orange);
    text-shadow: 0 0 6px rgba(255, 90, 0, 0.4);
}

/* Recording state - subtle body glow (light mode) */
.audio-module.recording .reel-chassis {
    box-shadow:
        0 4px 12px -2px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 16px rgba(255, 68, 68, 0.2);
}

/* LED pulse animation for recording */
@keyframes micLedPulse {

    0%,
    100% {
        opacity: 0.7;
        box-shadow:
            0 0 6px rgba(255, 68, 68, 0.6),
            0 0 12px rgba(255, 68, 68, 0.3);
    }

    50% {
        opacity: 1;
        box-shadow:
            0 0 10px rgba(255, 68, 68, 1),
            0 0 20px rgba(255, 68, 68, 0.6),
            0 2px 6px rgba(255, 0, 0, 0.8);
    }
}

/* Paused state - LED stays on but doesn't pulse */
.audio-module.paused .bearing-ruby {
    animation: none;
    background: linear-gradient(180deg, #FF6666 0%, #AA0000 100%);
    box-shadow: 0 0 6px rgba(255, 68, 68, 0.4);
}

.disabled {
    opacity: 0.4;
    filter: contrast(0.85);
    pointer-events: none;
}

.live-dot {
    width: 5px;
    height: 5px;
    background: red;
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
    animation: ledBreathRed 1s step-end infinite;
}

/* ==========================================================================
   AI STUDIO SPECIFIC OVERRIDES
   Simple approach: Sidecar expands to the LEFT of buttons (no button movement)
   ========================================================================== */

/* Ensure proper z-index stacking */
.site-aistudio .audio-module {
    z-index: 30;
}

.site-aistudio .screen-module {
    z-index: 20;
}

/* Audio sidecar - expand to the LEFT */
.site-aistudio .audio-module .audio-sidecar {
    left: auto;
    right: 16px;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 38px;
    border-radius: 6px 8px 8px 6px;
    height: 30px;
    z-index: 15;
}

.site-aistudio .audio-module.recording .audio-sidecar {
    width: 186px;
}

/* Screen sidecar - expand to the LEFT */
.site-aistudio .screen-module .screen-sidecar {
    left: auto;
    right: 24px;
    margin-right: 0;
    padding-left: 10px;
    padding-right: 46px;
    border-radius: 6px 15px 15px 6px;
    height: 30px;
    z-index: 10;
}

.site-aistudio .screen-module.recording .screen-sidecar {
    width: 154px;
}

/* Override the default margin-left push behavior for AI Studio */
.site-aistudio .audio-module.recording~.screen-module {
    margin-left: 0;
}

/* When screen is recording, move audio module left to make room for screen sidecar */
.site-aistudio .audio-module.disabled {
    transform: translateX(-150px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   CHATGPT SPECIFIC OVERRIDES
   Same left-expanding sidecar logic as AI Studio
   ========================================================================== */

/* Ensure proper z-index stacking */
.site-chatgpt .audio-module {
    z-index: 30;
}

.site-chatgpt .screen-module {
    z-index: 20;
}

/* Audio sidecar - expand to the LEFT */
.site-chatgpt .audio-module .audio-sidecar {
    left: auto;
    right: 16px;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 38px;
    border-radius: 6px 8px 8px 6px;
    height: 30px;
    z-index: 15;
}

.site-chatgpt .audio-module.recording .audio-sidecar {
    width: 186px;
}

/* Screen sidecar - expand to the LEFT */
.site-chatgpt .screen-module .screen-sidecar {
    left: auto;
    right: 24px;
    margin-right: 0;
    padding-left: 10px;
    padding-right: 46px;
    border-radius: 6px 15px 15px 6px;
    height: 30px;
    z-index: 10;
}

.site-chatgpt .screen-module.recording .screen-sidecar {
    width: 154px;
}

/* Override the default margin-left push behavior */
.site-chatgpt .audio-module.recording~.screen-module {
    margin-left: 0;
}

/* When screen is recording, move audio module left to make room for screen sidecar */
.site-chatgpt .audio-module.disabled {
    transform: translateX(-150px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   PERPLEXITY SPECIFIC OVERRIDES
   Same left-expanding sidecar logic as ChatGPT and AI Studio
   ========================================================================== */

/* Ensure proper z-index stacking */
.site-perplexity .audio-module {
    z-index: 30;
}

.site-perplexity .screen-module {
    z-index: 20;
}

/* Audio sidecar - expand to the LEFT */
.site-perplexity .audio-module .audio-sidecar {
    left: auto;
    right: 16px;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 38px;
    border-radius: 6px 8px 8px 6px;
    height: 30px;
    z-index: 15;
}

.site-perplexity .audio-module.recording .audio-sidecar {
    width: 186px;
}

/* Screen sidecar - expand to the LEFT */
.site-perplexity .screen-module .screen-sidecar {
    left: auto;
    right: 24px;
    margin-right: 0;
    padding-left: 10px;
    padding-right: 46px;
    border-radius: 6px 15px 15px 6px;
    height: 30px;
    z-index: 10;
}

.site-perplexity .screen-module.recording .screen-sidecar {
    width: 154px;
}

/* Override the default margin-left push behavior */
.site-perplexity .audio-module.recording~.screen-module {
    margin-left: 0;
}

/* When screen is recording, move audio module left to make room for screen sidecar */
.site-perplexity .audio-module.disabled {
    transform: translateX(-150px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   GEMINI SPECIFIC OVERRIDES
   Buttons sit inside .trailing-actions-wrapper (horizontal flex row) directly
   to the LEFT of .model-picker-container.
   Sidecars expand to the LEFT (over the text-input area) so they never overlap
   the model selector or send/dictate button on the right.
   ========================================================================== */

.site-gemini .trailing-actions-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow: visible !important;
    position: relative;
    z-index: 5;
}

.site-gemini .aesthetic-module {
    flex-shrink: 0;
    margin: 0 3px;
}

.site-gemini .screen-module {
    margin-right: 6px;
    z-index: 20;
}

.site-gemini .audio-module {
    z-index: 30;
}

/* Audio sidecar - expand to the LEFT */
.site-gemini .audio-module .audio-sidecar {
    left: auto;
    right: 16px;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 38px;
    border-radius: 6px 8px 8px 6px;
    height: 30px;
    z-index: 15;
}

.site-gemini .audio-module.recording .audio-sidecar {
    width: 186px;
}

/* Screen sidecar - expand to the LEFT */
.site-gemini .screen-module .screen-sidecar {
    left: auto;
    right: 24px;
    margin-right: 0;
    padding-left: 10px;
    padding-right: 46px;
    border-radius: 6px 15px 15px 6px;
    height: 30px;
    z-index: 10;
}

.site-gemini .screen-module.recording .screen-sidecar {
    width: 154px;
}

/* Override the default margin-left push behavior */
.site-gemini .audio-module.recording~.screen-module {
    margin-left: 0;
}

/* When screen is recording, move audio module left to make room for screen sidecar */
.site-gemini .audio-module.disabled {
    transform: translateX(-150px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   POE SPECIFIC OVERRIDES
   Buttons are injected inside the existing flex row using display:contents
   to blend seamlessly with Poe's native buttons
   ========================================================================== */

/* Poe container wrapper - use display:contents to not break flex layout */
.site-poe #thoughtful-voice-poe-wrapper {
    display: contents !important;
}

/* Style the modules when inside Poe's button row */
.site-poe .aesthetic-module {
    margin: 0 2px;
    flex-shrink: 0;
}

/* Ensure proper z-index stacking */
.site-poe .audio-module {
    z-index: 30;
}

.site-poe .screen-module {
    z-index: 20;
}

/* Audio sidecar - expand to the RIGHT (default direction) */
.site-poe .audio-module .audio-sidecar {
    left: 16px;
    right: auto;
    margin-right: 0;
    padding-left: 22px;
    padding-right: 8px;
    border-radius: 8px 6px 6px 8px;
    height: 30px;
    z-index: 15;
}

.site-poe .audio-module.recording .audio-sidecar {
    width: 168px;
}

/* Screen sidecar - expand to the RIGHT (default direction) */
.site-poe .screen-module .screen-sidecar {
    left: 26px;
    right: auto;
    margin-right: 0;
    padding-left: 18px;
    padding-right: 8px;
    border-radius: 15px 6px 6px 15px;
    height: 30px;
    z-index: 10;
}

.site-poe .screen-module.recording .screen-sidecar {
    width: 128px;
}

/* Push screen module right when audio is recording */
.site-poe .audio-module.recording~.screen-module {
    margin-left: 168px;
    transition: margin-left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Disabled state for audio module when screen is recording */
.site-poe .audio-module.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Old notification styles removed - now using upload-notification.css */

/* Old notification styles removed */

/* End of aesthetic buttons styles */

/* End of aesthetic buttons styles - notification moved to upload-notification.css */
/* ==========================================================================
   Gemini Model Lock & Send Interceptor Styles - Thoughtful Voice
   Adaptive Dynamic Island & In-situ Stars (Light & Dark Theme System)
   ========================================================================== */

:root {
    --tv-star-inactive: rgba(180, 180, 180, 0.45);
    --tv-star-hover-bg: rgba(255, 184, 0, 0.12);
    --tv-star-hover-border: rgba(255, 184, 0, 0.3);
    --tv-star-hover-color: #ffb800;
    --tv-star-active-bg: rgba(255, 184, 0, 0.12);
    --tv-star-active-border: rgba(255, 184, 0, 0.25);
    --tv-star-active-color: #ffb800;
    --tv-star-active-fill: #ffb800;
    --tv-star-active-stroke: #ff9800;
    --tv-star-shadow: drop-shadow(0 0 5px rgba(255, 184, 0, 0.5));

    --tv-hud-bg: rgba(18, 18, 22, 0.82);
    --tv-hud-border: rgba(255, 255, 255, 0.12);
    --tv-hud-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    --tv-hud-text: #F3F4F6;
    --tv-hud-model: #FFFFFF;
    --tv-hud-divider: rgba(255, 255, 255, 0.35);
    --tv-hud-tag: #D1D5DB;
    --tv-hud-sparkle: #F59E0B;
    --tv-hud-ring: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, transparent 70%);
}

/* Light Theme Variables */
@media (prefers-color-scheme: light) {
    :root {
        --tv-star-inactive: rgba(107, 114, 128, 0.45);
        --tv-star-hover-bg: rgba(217, 119, 6, 0.08);
        --tv-star-hover-border: rgba(217, 119, 6, 0.25);
        --tv-star-hover-color: #D97706;
        --tv-star-active-bg: rgba(217, 119, 6, 0.1);
        --tv-star-active-border: rgba(217, 119, 6, 0.28);
        --tv-star-active-color: #D97706;
        --tv-star-active-fill: #D97706;
        --tv-star-active-stroke: #B45309;
        --tv-star-shadow: drop-shadow(0 0 3px rgba(217, 119, 6, 0.35));

        --tv-hud-bg: rgba(255, 255, 255, 0.88);
        --tv-hud-border: rgba(0, 0, 0, 0.08);
        --tv-hud-shadow: 0 10px 28px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.95);
        --tv-hud-text: #1F2937;
        --tv-hud-model: #111827;
        --tv-hud-divider: rgba(0, 0, 0, 0.2);
        --tv-hud-tag: #4B5563;
        --tv-hud-sparkle: #D97706;
        --tv-hud-ring: radial-gradient(circle, rgba(217, 119, 6, 0.25) 0%, transparent 70%);
    }
}

/* Explicit Light Theme classes on host page */
body.light-theme,
html.light-theme,
[data-theme="light"],
.tv-theme-light {
    --tv-star-inactive: rgba(107, 114, 128, 0.45);
    --tv-star-hover-bg: rgba(217, 119, 6, 0.08);
    --tv-star-hover-border: rgba(217, 119, 6, 0.25);
    --tv-star-hover-color: #D97706;
    --tv-star-active-bg: rgba(217, 119, 6, 0.1);
    --tv-star-active-border: rgba(217, 119, 6, 0.28);
    --tv-star-active-color: #D97706;
    --tv-star-active-fill: #D97706;
    --tv-star-active-stroke: #B45309;
    --tv-star-shadow: drop-shadow(0 0 3px rgba(217, 119, 6, 0.35));

    --tv-hud-bg: rgba(255, 255, 255, 0.88);
    --tv-hud-border: rgba(0, 0, 0, 0.08);
    --tv-hud-shadow: 0 10px 28px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    --tv-hud-text: #1F2937;
    --tv-hud-model: #111827;
    --tv-hud-divider: rgba(0, 0, 0, 0.2);
    --tv-hud-tag: #4B5563;
    --tv-hud-sparkle: #D97706;
    --tv-hud-ring: radial-gradient(circle, rgba(217, 119, 6, 0.25) 0%, transparent 70%);
}

/* Explicit Dark Theme classes on host page */
body.dark-theme,
html.dark-theme,
[data-theme="dark"],
.tv-theme-dark {
    --tv-star-inactive: rgba(180, 180, 180, 0.45);
    --tv-star-hover-bg: rgba(255, 184, 0, 0.12);
    --tv-star-hover-border: rgba(255, 184, 0, 0.3);
    --tv-star-hover-color: #ffb800;
    --tv-star-active-bg: rgba(255, 184, 0, 0.12);
    --tv-star-active-border: rgba(255, 184, 0, 0.25);
    --tv-star-active-color: #ffb800;
    --tv-star-active-fill: #ffb800;
    --tv-star-active-stroke: #ff9800;
    --tv-star-shadow: drop-shadow(0 0 5px rgba(255, 184, 0, 0.5));

    --tv-hud-bg: rgba(18, 18, 22, 0.82);
    --tv-hud-border: rgba(255, 255, 255, 0.12);
    --tv-hud-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    --tv-hud-text: #F3F4F6;
    --tv-hud-model: #FFFFFF;
    --tv-hud-divider: rgba(255, 255, 255, 0.35);
    --tv-hud-tag: #D1D5DB;
    --tv-hud-sparkle: #F59E0B;
    --tv-hud-ring: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, transparent 70%);
}

/* ==========================================================================
   1. Star Button Injected into Dropdown Items
   ========================================================================== */
.tv-star-host {
    position: relative !important;
}

.tv-star-host > gem-menu-item-content {
    padding-right: 46px !important;
}

.tv-star-host:not(gem-menu-item) {
    padding-right: 46px !important;
}

.tv-model-star-btn {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    z-index: 99 !important;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    color: var(--tv-star-inactive) !important;
    outline: none !important;
    user-select: none !important;
    pointer-events: auto !important;
}

.tv-model-star-btn:hover {
    background-color: var(--tv-star-hover-bg) !important;
    border-color: var(--tv-star-hover-border) !important;
    transform: translateY(-50%) scale(1.1) !important;
    color: var(--tv-star-hover-color) !important;
}

.tv-model-star-btn:active {
    transform: translateY(-50%) scale(0.92) !important;
}

/* Star SVG Icon */
.tv-model-star-btn svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    transition: all 0.25s ease !important;
    pointer-events: none !important;
}

/* Inactive Star (Outline) */
.tv-model-star-btn:not(.active) svg {
    fill: transparent !important;
    stroke: currentColor !important;
    stroke-width: 2px !important;
    opacity: 0.65 !important;
}

.tv-model-star-btn:not(.active):hover svg {
    opacity: 1 !important;
    stroke: var(--tv-star-hover-color) !important;
}

/* Active / Locked Star (Filled Gold Glow) */
.tv-model-star-btn.active {
    color: var(--tv-star-active-color) !important;
    background-color: var(--tv-star-active-bg) !important;
    border-color: var(--tv-star-active-border) !important;
}

.tv-model-star-btn.active svg {
    fill: var(--tv-star-active-fill) !important;
    stroke: var(--tv-star-active-stroke) !important;
    stroke-width: 1px !important;
    filter: var(--tv-star-shadow) !important;
    animation: tvStarPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes tvStarPop {
    0% {
        transform: scale(0.7) rotate(-15deg);
    }
    60% {
        transform: scale(1.2) rotate(8deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* ==========================================================================
   2. Dynamic Island Minimalist HUD (Interception Indicator)
   ========================================================================== */
.tv-lock-pill {
    position: absolute !important;
    top: 14px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-14px) scale(0.88) !important;
    background: var(--tv-hud-bg) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    color: var(--tv-hud-text) !important;
    padding: 5px 14px 5px 10px !important;
    border-radius: 9999px !important;
    border: 0.5px solid var(--tv-hud-border) !important;
    box-shadow: var(--tv-hud-shadow) !important;
    font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.25px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    z-index: 100000 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0.28s ease,
                background 0.2s ease,
                color 0.2s ease !important;
}

.tv-lock-pill.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
}

/* Micro-indicator / Sparkle Icon */
.tv-lock-pill .tv-island-indicator {
    position: relative !important;
    width: 14px !important;
    height: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    color: var(--tv-hud-sparkle) !important;
}

.tv-lock-pill .tv-island-sparkle {
    width: 13px !important;
    height: 13px !important;
    display: block !important;
    animation: tvIslandSparkleSpin 3.5s linear infinite !important;
}

@keyframes tvIslandSparkleSpin {
    0% {
        transform: rotate(0deg) scale(0.92);
    }
    50% {
        transform: rotate(180deg) scale(1.08);
    }
    100% {
        transform: rotate(360deg) scale(0.92);
    }
}

.tv-lock-pill .tv-island-pulse-ring {
    position: absolute !important;
    inset: -3px !important;
    border-radius: 50% !important;
    background: var(--tv-hud-ring) !important;
    animation: tvIslandBreath 1.8s ease-in-out infinite !important;
    pointer-events: none !important;
}

@keyframes tvIslandBreath {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.85);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.2);
    }
}

/* Island Content Typography */
.tv-lock-pill .tv-island-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.tv-lock-pill .tv-island-action {
    color: var(--tv-hud-tag) !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
}

.tv-lock-pill .tv-island-model {
    color: var(--tv-hud-model) !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
}

.tv-lock-pill .tv-island-divider {
    color: var(--tv-hud-divider) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
}

.tv-lock-pill .tv-island-tag {
    color: var(--tv-hud-tag) !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
}

/* ==========================================================================
   PREMIUM UPLOAD NOTIFICATION - Unified Design
   Auto-switches between dark/light modes
   ========================================================================== */

#thoughtful-upload-notification {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483647;

    min-width: 220px;

    /* Dark glassmorphism (default) */
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);

    /* Initial hidden state */
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    pointer-events: none;

    /* Smooth transitions */
    transition:
        opacity 0.25s ease-out,
        transform 0.25s ease-out,
        border-color 0.3s ease,
        box-shadow 0.3s ease;

    font-family: 'Courier New', 'Consolas', monospace;
    cursor: pointer;
    overflow: hidden;

    /* Elegant shadow */
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===== Subtle Scanline Overlay ===== */
#thoughtful-upload-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px);
    pointer-events: none;
    z-index: 10;
    border-radius: 12px;
}

/* ===== Visible State ===== */
#thoughtful-upload-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* ===== Hiding State ===== */
#thoughtful-upload-notification.hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
}

/* ===== Pulse Animation ===== */
#thoughtful-upload-notification.pulse {
    animation: crt-pulse 0.2s ease-out;
}

@keyframes crt-pulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

/* ===== Header Strip ===== */
.notif-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px 12px 0 0;
}

.notif-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3a3a3c;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.uploading .notif-led {
    background: #ff9500;
    box-shadow: 0 0 8px rgba(255, 149, 0, 0.8);
    animation: led-blink 0.8s ease-in-out infinite;
}

.complete .notif-led {
    background: #34c759;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.8);
}

@keyframes led-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.notif-label {
    font-size: 9px;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* ===== Content Area ===== */
.notif-content {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
}

/* ===== Icon Container ===== */
.notif-icon-wrap {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    position: relative;
}

/* Subtle CRT effect on icon */
.notif-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 1px,
            rgba(0, 0, 0, 0.15) 1px,
            rgba(0, 0, 0, 0.15) 2px);
    pointer-events: none;
    border-radius: 8px;
}

/* ===== Spinner (Uploading) ===== */
.notif-spinner {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.notif-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: #ff9500;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Checkmark (Complete) - iOS Green ===== */
.notif-check {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
    color: #34c759;
    filter: drop-shadow(0 0 6px rgba(52, 199, 89, 0.5));
}

.notif-check svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* ===== Text ===== */
.notif-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f5f5f7;
}

.uploading .notif-title {
    color: #ff9500;
    text-shadow: 0 0 8px rgba(255, 149, 0, 0.4);
}

.complete .notif-title {
    color: #34c759;
    text-shadow: 0 0 8px rgba(52, 199, 89, 0.4);
}

.notif-desc {
    font-size: 10px;
    color: #8e8e93;
    letter-spacing: 0.5px;
}

/* ===== Status-Specific Border Glow ===== */
#thoughtful-upload-notification.uploading {
    border-color: rgba(255, 149, 0, 0.4);
    box-shadow:
        0 4px 24px rgba(255, 149, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#thoughtful-upload-notification.complete {
    border-color: rgba(52, 199, 89, 0.4);
    box-shadow:
        0 4px 24px rgba(52, 199, 89, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===== Hover Effect ===== */
#thoughtful-upload-notification.visible:hover {
    filter: brightness(1.1);
    transform: translateX(-50%) translateY(-1px);
}

/* ==========================================================================
   LIGHT MODE - Premium Glassmorphism Design
   ========================================================================== */
@media (prefers-color-scheme: light) {
    #thoughtful-upload-notification {
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 12px;
        box-shadow:
            0 4px 24px rgba(0, 0, 0, 0.08),
            0 1px 3px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    /* Remove scanlines in light mode for cleaner look */
    #thoughtful-upload-notification::before {
        display: none;
    }

    /* Header - subtle separator */
    .notif-header {
        background: rgba(0, 0, 0, 0.02);
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        border-radius: 12px 12px 0 0;
    }

    .notif-led {
        background: #d0d0d0;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
    }

    .uploading .notif-led {
        background: #ff9500;
        box-shadow: 0 0 8px rgba(255, 149, 0, 0.5);
    }

    .complete .notif-led {
        background: #34c759;
        box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
    }

    .notif-label {
        color: #8e8e93;
        font-weight: 600;
    }

    /* Content */
    .notif-content {
        background: transparent;
    }

    .notif-icon-wrap {
        background: rgba(0, 0, 0, 0.03);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 8px;
    }

    .notif-icon-wrap::after {
        display: none;
    }

    /* Spinner */
    .notif-spinner::before {
        border-top-color: #ff9500;
    }

    /* Checkmark - iOS green */
    .notif-check {
        color: #34c759;
        filter: drop-shadow(0 0 4px rgba(52, 199, 89, 0.3));
    }

    /* Text */
    .uploading .notif-title {
        color: #1d1d1f;
        text-shadow: none;
    }

    .complete .notif-title {
        color: #1d1d1f;
        text-shadow: none;
    }

    .notif-desc {
        color: #8e8e93;
    }

    /* Status-specific glow */
    #thoughtful-upload-notification.uploading {
        border-color: rgba(255, 149, 0, 0.3);
        box-shadow:
            0 4px 24px rgba(255, 149, 0, 0.12),
            0 1px 3px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    #thoughtful-upload-notification.complete {
        border-color: rgba(52, 199, 89, 0.3);
        box-shadow:
            0 4px 24px rgba(52, 199, 89, 0.12),
            0 1px 3px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    /* Hover */
    #thoughtful-upload-notification.visible:hover {
        filter: brightness(0.98);
        transform: translateX(-50%) translateY(-1px);
    }
}

/* Stage-specific polish so real extension widgets sit seamlessly in the 1:1 Gemini window */
.gemini-window .tv-lock-pill {
  top: 66px !important;
  z-index: 40 !important;
}
.gemini-window #thoughtful-upload-notification {
  top: 66px;
  left: auto;
  right: 22px;
  min-width: 204px;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top right;
  z-index: 45;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(22, 22, 21, 0.09);
  box-shadow:
    0 12px 26px rgba(22, 22, 21, 0.08),
    0 2px 6px rgba(22, 22, 21, 0.04);
}
.gemini-window #thoughtful-upload-notification.visible {
  transform: translateY(0) scale(1);
}
.gemini-window #thoughtful-upload-notification.visible:hover {
  transform: translateY(-1px) scale(1);
}
.gemini-window #thoughtful-upload-notification.hiding {
  transform: translateY(-8px) scale(0.97);
}
.gemini-window #thoughtful-upload-notification::before,
.gemini-window #thoughtful-upload-notification .notif-icon-wrap::after {
  display: none;
}
.gemini-window #thoughtful-upload-notification .notif-header {
  background: rgba(0, 0, 0, 0.025);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.gemini-window #thoughtful-upload-notification .notif-icon-wrap {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.06);
}
.gemini-window #thoughtful-upload-notification .notif-title {
  color: #1d1d1f;
  text-shadow: none;
}
.gemini-window .audio-module,
.gemini-window .screen-module {
  display: flex !important;
}
/* Ensure audio-sidecar & screen-sidecar never clip inside Gemini prompt bar */
.gemini-window .trailing-actions-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible !important;
}
/* Stage animation smoothness: clean non-overshoot sidecar close + GPU waveform */
.gemini-window .audio-sidecar {
  overflow: hidden;
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease;
}
.gemini-window .audio-module.recording .audio-sidecar {
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.26s ease;
}
.gemini-window .screen-sidecar {
  overflow: hidden;
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease;
}
.gemini-window .screen-module.recording .screen-sidecar {
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.26s ease;
}
.gemini-window .screen-module {
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    margin-left 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.gemini-window .wave-bar-v12 {
  height: 18px;
  transform: scaleY(0.22);
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.14s ease-out;
}
.gemini-window .audio-module.recording:not(.paused) .wave-bar-v12 {
  transition: none;
}
