/* =========================================================
   ASK SAI SG — FINAL COMPOSER
   ONE AUTHORITY ONLY
   ========================================================= */

#ASKSAI_STABLE_RAIL_V1{
    display:block !important;

    position:relative !important;

    top:auto !important;
    bottom:auto !important;
    left:auto !important;
    right:auto !important;

    width:100% !important;

    height:auto !important;
    min-height:44px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    overflow:visible !important;

    transform:none !important;
    translate:none !important;

    background:#030812 !important;
}


#ASKSAI_COMPOSER_FINAL_ROW{
    display:flex !important;
    flex-direction:row !important;

    align-items:flex-start !important;

    width:100% !important;

    box-sizing:border-box !important;

    gap:10px !important;

    padding:8px 10px 8px 8px !important;

    margin:0 !important;

    overflow:visible !important;

    background:#030812 !important;
}


#ASKSAI_COMPOSER_FINAL_LEFT{
    display:flex !important;
    flex:0 0 auto !important;

    flex-direction:row !important;
    align-items:center !important;

    gap:10px !important;

    white-space:nowrap !important;

    min-height:28px !important;
}


#ASKSAI_COMPOSER_FINAL_INPUT{
    display:block !important;

    flex:1 1 auto !important;

    min-width:0 !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    overflow:visible !important;
}


#ASKSAI_COMPOSER_FINAL_INPUT textarea{
    display:block !important;

    position:relative !important;

    width:100% !important;
    min-width:0 !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    border:0 !important;
    outline:0 !important;
    box-shadow:none !important;

    background:transparent !important;

    color:#f3f6fa !important;

    font-size:16px !important;
    line-height:1.45 !important;

    caret-color:#19d4e9 !important;

    white-space:pre-wrap !important;

    overflow-wrap:anywhere !important;
    word-break:normal !important;

    overflow:hidden !important;
    overflow-x:hidden !important;
    overflow-y:hidden !important;

    resize:none !important;

    transform:none !important;
    translate:none !important;
}


#ASKSAI_COMPOSER_FINAL_INPUT textarea::placeholder{
    color:transparent !important;
    opacity:0 !important;
}


#ASKSAI_COMPOSER_FINAL_SEND{
    display:flex !important;

    flex:0 0 auto !important;

    align-items:flex-start !important;
    justify-content:center !important;

    min-width:42px !important;

    margin-left:auto !important;
}


#ASKSAI_COMPOSER_FINAL_SEND > *{
    position:relative !important;

    top:auto !important;
    bottom:auto !important;
    left:auto !important;
    right:auto !important;

    margin:0 !important;

    transform:none !important;
    translate:none !important;
}


/* Remove old generated prompt objects if any survive */

#ASKSAI_RAIL_DOLLAR_V2,
#ASKSAI_FRESH_DOLLAR_V1{
    display:none !important;
}


/* No old 3-line limits */

#ASKSAI_COMPOSER_FINAL_ROW,
#ASKSAI_COMPOSER_FINAL_INPUT,
#ASKSAI_COMPOSER_FINAL_INPUT textarea{
    max-height:none !important;
}


/* Main Boardroom owns overflow only after available height is used */

#ASKSAI_FRESH_SCREEN_V1{
    overflow-x:hidden !important;
    overflow-y:auto !important;
}

/* =========================================================
   ASK SAI — FINAL FULL-WIDTH COMPOSER
   ========================================================= */

/* Three zones:
   LEFT controls | FULL WIDTH INPUT | SEND
*/

#ASKSAI_COMPOSER_FINAL_ROW{
    display:grid !important;

    grid-template-columns:
        max-content
        minmax(0,1fr)
        max-content
        !important;

    align-items:start !important;

    column-gap:12px !important;

    width:100% !important;
    max-width:none !important;

    height:auto !important;
    min-height:44px !important;
    max-height:none !important;

    margin:0 !important;
    padding:8px 10px 8px 8px !important;

    box-sizing:border-box !important;

    overflow:visible !important;
}


/* + MEDIA GALLERY */

#ASKSAI_COMPOSER_FINAL_LEFT{
    grid-column:1 !important;

    width:auto !important;
    max-width:none !important;

    display:flex !important;
    flex-direction:row !important;

    align-items:center !important;

    gap:10px !important;

    white-space:nowrap !important;
}


/* FULL REMAINING BOARDROOM WIDTH */

#ASKSAI_COMPOSER_FINAL_INPUT{
    grid-column:2 !important;

    position:relative !important;

    display:block !important;

    width:100% !important;
    min-width:0 !important;
    max-width:none !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    overflow:visible !important;
}


/* Actual typing field */

#ASKSAI_COMPOSER_FINAL_INPUT textarea{
    display:block !important;

    width:100% !important;
    min-width:100% !important;
    max-width:none !important;

    box-sizing:border-box !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    border:0 !important;
    outline:0 !important;

    background:transparent !important;

    color:#f4f7fb !important;

    font-size:16px !important;
    line-height:1.42 !important;

    white-space:pre-wrap !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;

    overflow:hidden !important;
    overflow-x:hidden !important;
    overflow-y:hidden !important;

    resize:none !important;

    /* real editing caret */
    caret-color:#19d4e9 !important;
}


/* SEND remains hard-right */

#ASKSAI_COMPOSER_FINAL_SEND{
    grid-column:3 !important;

    display:flex !important;

    align-items:flex-start !important;
    justify-content:flex-end !important;

    width:auto !important;
    min-width:42px !important;

    margin:0 !important;
    padding:0 !important;
}


/* =========================================================
   RESTING BLINKING CURSOR
   Visible the instant Boardroom lands.
   ========================================================= */

#ASKSAI_COMPOSER_FINAL_INPUT::before{
    content:"";

    position:absolute !important;

    left:0 !important;
    top:3px !important;

    width:2px !important;
    height:20px !important;

    background:#19d4e9 !important;

    box-shadow:
        0 0 5px rgba(25,212,233,.9)
        !important;

    animation:
        ASKSAI_READY_CARET_V1
        .9s
        steps(2,end)
        infinite;

    pointer-events:none !important;

    z-index:5 !important;
}


/* Once text exists, use the real textarea caret instead */

#ASKSAI_COMPOSER_FINAL_INPUT.ASKSAI_HAS_TEXT_V1::before{
    display:none !important;
}


@keyframes ASKSAI_READY_CARET_V1{
    0%,46%{opacity:1}
    47%,100%{opacity:0}
}


/* No old prompt artifacts */

#ASKSAI_RAIL_DOLLAR_V2,
#ASKSAI_FRESH_DOLLAR_V1{
    display:none !important;
}


/* Whole fresh Boardroom handles overflow */

#ASKSAI_FRESH_SCREEN_V1{
    overflow-x:hidden !important;
    overflow-y:auto !important;
}

/* =========================================================
   ASK SAI — FINAL FULL-WIDTH COMPOSER
   ========================================================= */

/* Three zones:
   LEFT controls | FULL WIDTH INPUT | SEND
*/

#ASKSAI_COMPOSER_FINAL_ROW{
    display:grid !important;

    grid-template-columns:
        max-content
        minmax(0,1fr)
        max-content
        !important;

    align-items:start !important;

    column-gap:12px !important;

    width:100% !important;
    max-width:none !important;

    height:auto !important;
    min-height:44px !important;
    max-height:none !important;

    margin:0 !important;
    padding:8px 10px 8px 8px !important;

    box-sizing:border-box !important;

    overflow:visible !important;
}


/* + MEDIA GALLERY */

#ASKSAI_COMPOSER_FINAL_LEFT{
    grid-column:1 !important;

    width:auto !important;
    max-width:none !important;

    display:flex !important;
    flex-direction:row !important;

    align-items:center !important;

    gap:10px !important;

    white-space:nowrap !important;
}


/* FULL REMAINING BOARDROOM WIDTH */

#ASKSAI_COMPOSER_FINAL_INPUT{
    grid-column:2 !important;

    position:relative !important;

    display:block !important;

    width:100% !important;
    min-width:0 !important;
    max-width:none !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    overflow:visible !important;
}


/* Actual typing field */

#ASKSAI_COMPOSER_FINAL_INPUT textarea{
    display:block !important;

    width:100% !important;
    min-width:100% !important;
    max-width:none !important;

    box-sizing:border-box !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    border:0 !important;
    outline:0 !important;

    background:transparent !important;

    color:#f4f7fb !important;

    font-size:16px !important;
    line-height:1.42 !important;

    white-space:pre-wrap !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;

    overflow:hidden !important;
    overflow-x:hidden !important;
    overflow-y:hidden !important;

    resize:none !important;

    /* real editing caret */
    caret-color:#19d4e9 !important;
}


/* SEND remains hard-right */

#ASKSAI_COMPOSER_FINAL_SEND{
    grid-column:3 !important;

    display:flex !important;

    align-items:flex-start !important;
    justify-content:flex-end !important;

    width:auto !important;
    min-width:42px !important;

    margin:0 !important;
    padding:0 !important;
}


/* =========================================================
   RESTING BLINKING CURSOR
   Visible the instant Boardroom lands.
   ========================================================= */

#ASKSAI_COMPOSER_FINAL_INPUT::before{
    content:"";

    position:absolute !important;

    left:0 !important;
    top:3px !important;

    width:2px !important;
    height:20px !important;

    background:#19d4e9 !important;

    box-shadow:
        0 0 5px rgba(25,212,233,.9)
        !important;

    animation:
        ASKSAI_READY_CARET_V1
        .9s
        steps(2,end)
        infinite;

    pointer-events:none !important;

    z-index:5 !important;
}


/* Once text exists, use the real textarea caret instead */

#ASKSAI_COMPOSER_FINAL_INPUT.ASKSAI_HAS_TEXT_V1::before{
    display:none !important;
}


@keyframes ASKSAI_READY_CARET_V1{
    0%,46%{opacity:1}
    47%,100%{opacity:0}
}


/* No old prompt artifacts */

#ASKSAI_RAIL_DOLLAR_V2,
#ASKSAI_FRESH_DOLLAR_V1{
    display:none !important;
}


/* Whole fresh Boardroom handles overflow */

#ASKSAI_FRESH_SCREEN_V1{
    overflow-x:hidden !important;
    overflow-y:auto !important;
}

/* =========================================================
   ASK SAI — FINAL FULL-WIDTH COMPOSER
   ========================================================= */

/* Three zones:
   LEFT controls | FULL WIDTH INPUT | SEND
*/

#ASKSAI_COMPOSER_FINAL_ROW{
    display:grid !important;

    grid-template-columns:
        max-content
        minmax(0,1fr)
        max-content
        !important;

    align-items:start !important;

    column-gap:12px !important;

    width:100% !important;
    max-width:none !important;

    height:auto !important;
    min-height:44px !important;
    max-height:none !important;

    margin:0 !important;
    padding:8px 10px 8px 8px !important;

    box-sizing:border-box !important;

    overflow:visible !important;
}


/* + MEDIA GALLERY */

#ASKSAI_COMPOSER_FINAL_LEFT{
    grid-column:1 !important;

    width:auto !important;
    max-width:none !important;

    display:flex !important;
    flex-direction:row !important;

    align-items:center !important;

    gap:10px !important;

    white-space:nowrap !important;
}


/* FULL REMAINING BOARDROOM WIDTH */

#ASKSAI_COMPOSER_FINAL_INPUT{
    grid-column:2 !important;

    position:relative !important;

    display:block !important;

    width:100% !important;
    min-width:0 !important;
    max-width:none !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    overflow:visible !important;
}


/* Actual typing field */

#ASKSAI_COMPOSER_FINAL_INPUT textarea{
    display:block !important;

    width:100% !important;
    min-width:100% !important;
    max-width:none !important;

    box-sizing:border-box !important;

    height:auto !important;
    min-height:28px !important;
    max-height:none !important;

    margin:0 !important;
    padding:0 !important;

    border:0 !important;
    outline:0 !important;

    background:transparent !important;

    color:#f4f7fb !important;

    font-size:16px !important;
    line-height:1.42 !important;

    white-space:pre-wrap !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;

    overflow:hidden !important;
    overflow-x:hidden !important;
    overflow-y:hidden !important;

    resize:none !important;

    /* real editing caret */
    caret-color:#19d4e9 !important;
}


/* SEND remains hard-right */

#ASKSAI_COMPOSER_FINAL_SEND{
    grid-column:3 !important;

    display:flex !important;

    align-items:flex-start !important;
    justify-content:flex-end !important;

    width:auto !important;
    min-width:42px !important;

    margin:0 !important;
    padding:0 !important;
}


/* =========================================================
   RESTING BLINKING CURSOR
   Visible the instant Boardroom lands.
   ========================================================= */

#ASKSAI_COMPOSER_FINAL_INPUT::before{
    content:"";

    position:absolute !important;

    left:0 !important;
    top:3px !important;

    width:2px !important;
    height:20px !important;

    background:#19d4e9 !important;

    box-shadow:
        0 0 5px rgba(25,212,233,.9)
        !important;

    animation:
        ASKSAI_READY_CARET_V1
        .9s
        steps(2,end)
        infinite;

    pointer-events:none !important;

    z-index:5 !important;
}


/* Once text exists, use the real textarea caret instead */

#ASKSAI_COMPOSER_FINAL_INPUT.ASKSAI_HAS_TEXT_V1::before{
    display:none !important;
}


@keyframes ASKSAI_READY_CARET_V1{
    0%,46%{opacity:1}
    47%,100%{opacity:0}
}


/* No old prompt artifacts */

#ASKSAI_RAIL_DOLLAR_V2,
#ASKSAI_FRESH_DOLLAR_V1{
    display:none !important;
}


/* Whole fresh Boardroom handles overflow */

#ASKSAI_FRESH_SCREEN_V1{
    overflow-x:hidden !important;
    overflow-y:auto !important;
}

/* =========================================================
   ASK SAI — FINAL COMPOSER WIDTH LOCK
   LEFT | FULL-WIDTH INPUT | SEND
   ========================================================= */

#ASKSAI_STABLE_RAIL_V1{
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}


/* One real visible row only */

#ASKSAI_COMPOSER_FINAL_ROW{
    display:grid !important;

    grid-template-columns:
        max-content
        minmax(0,1fr)
        48px
        !important;

    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;

    box-sizing:border-box !important;

    column-gap:12px !important;

    align-items:start !important;
}


/* LEFT */

#ASKSAI_COMPOSER_FINAL_LEFT{
    grid-column:1 !important;

    width:max-content !important;
    min-width:max-content !important;
    max-width:max-content !important;
}


/* CENTRE MUST CONSUME ALL REMAINING SPACE */

#ASKSAI_COMPOSER_FINAL_INPUT{
    grid-column:2 !important;

    display:block !important;

    width:auto !important;
    min-width:0 !important;
    max-width:none !important;

    justify-self:stretch !important;
    align-self:start !important;

    box-sizing:border-box !important;
}


/* THE REAL TEXTAREA MUST FILL THAT CENTRE TRACK */

#ASKSAI_COMPOSER_FINAL_INPUT > textarea{
    display:block !important;

    width:100% !important;
    min-width:100% !important;
    max-width:100% !important;

    box-sizing:border-box !important;

    margin:0 !important;
    padding:0 !important;

    float:none !important;

    position:relative !important;

    left:auto !important;
    right:auto !important;

    transform:none !important;
    translate:none !important;
}


/* SEND HARD RIGHT */

#ASKSAI_COMPOSER_FINAL_SEND{
    grid-column:3 !important;

    width:48px !important;
    min-width:48px !important;
    max-width:48px !important;

    justify-self:end !important;
}


/*
   Legacy visual children of the stable rail must not
   participate in layout and steal width.

   Hidden functional inputs remain in the DOM.
*/

#ASKSAI_STABLE_RAIL_V1 > *:not(#ASKSAI_COMPOSER_FINAL_ROW){
    position:absolute !important;

    width:1px !important;
    height:1px !important;

    min-width:0 !important;
    min-height:0 !important;
    max-width:1px !important;
    max-height:1px !important;

    overflow:hidden !important;

    opacity:0 !important;

    pointer-events:none !important;
}


/* But functional hidden file inputs remain available */

#ASKSAI_STABLE_RAIL_V1 > input[type="file"]{
    display:none !important;
}
