



/* ==========================================================

   HORSE PAGE — FORCE SAME SITE GRID AS OTHER PAGES

   ========================================================== */



body.horse-search-page-view #horseSearchPage {

    width: 100%;

    padding:

        38px

        0

        80px

        0 !important;

    box-sizing: border-box;

}





body.horse-search-page-view

#horseSearchPage

.horse-search-layout-shell {



    /*

       Do not rely on the older .shell rules here.

       Explicitly use the same centred content width as the

       research/stats pages.

    */



    width: min(

        1216px,

        calc(100% - 48px)

    );



    max-width: 1216px;



    margin:

        0

        auto !important;



    padding:

        0 !important;



    box-sizing:

        border-box;

}





/*

   If an older patch failed to create the wrapper, apply the

   alignment directly to the existing Horse page children.

*/



body.horse-search-page-view

#horseSearchPage:not(:has(.horse-search-layout-shell)) {



    padding-left:

        max(

            24px,

            calc((100% - 1216px) / 2)

        ) !important;



    padding-right:

        max(

            24px,

            calc((100% - 1216px) / 2)

        ) !important;

}





.horse-search-head {

    margin-bottom: 26px;

}





.horse-search-box {

    width: 100%;

    max-width: 760px;

}





.horse-search-input {

    width: 100%;

    box-sizing: border-box;

}





.horse-search-results {

    width: 100%;

    max-width: 900px;

}





/* ==========================================================

   GLOBAL ASK THE BRAIN BUTTON

   ========================================================== */



.global-brain-launcher {



    position: fixed;



    right: 28px;

    bottom: 28px;



    z-index: 9998;



    display: flex;

    align-items: center;

    gap: 9px;



    min-height: 48px;



    padding:

        0

        18px;



    border:

        1px solid

        rgba(170, 255, 30, .42);



    border-radius: 12px;



    background:

        rgba(10, 14, 11, .96);



    color:

        var(--accent, #a8ff1a);



    font-family:

        inherit;



    font-size:

        .76rem;



    font-weight:

        950;



    letter-spacing:

        .045em;



    cursor:

        pointer;



    box-shadow:

        0 12px 36px

        rgba(0,0,0,.28);



    transition:

        transform .15s ease,

        border-color .15s ease,

        background .15s ease;

}





.global-brain-launcher:hover {



    transform:

        translateY(-2px);



    border-color:

        var(--accent, #a8ff1a);



    background:

        rgba(18, 25, 18, .98);

}





.global-brain-launcher-icon {

    font-size: 1rem;

}





@media (max-width: 720px) {



    body.horse-search-page-view

    #horseSearchPage

    .horse-search-layout-shell {



        width:

            calc(100% - 32px);

    }





    .global-brain-launcher {



        right: 16px;

        bottom: 16px;



        min-height: 44px;



        padding:

            0

            14px;

    }

}








    /* ==========================================================================================

       RACING BRAIN PERSONALITY SELECTOR - V4F

       ========================================================================================== */



    .rb-personality-panel {

        margin: 0 0 16px;

        padding: 14px;

        border: 1px solid rgba(255, 255, 255, 0.10);

        border-radius: 14px;

        background: rgba(255, 255, 255, 0.025);

    }



    .rb-personality-heading {

        margin-bottom: 10px;

        font-size: 10px;

        line-height: 1.2;

        font-weight: 800;

        letter-spacing: 0.13em;

        color: rgba(255, 255, 255, 0.55);

    }



    .rb-personality-options {

        display: grid;

        grid-template-columns: repeat(4, minmax(0, 1fr));

        gap: 8px;

    }



    .rb-personality-option {

        min-width: 0;

        padding: 10px 11px;

        border: 1px solid rgba(255, 255, 255, 0.10);

        border-radius: 10px;

        background: rgba(255, 255, 255, 0.035);

        color: inherit;

        text-align: left;

        cursor: pointer;

        transition:

            border-color 140ms ease,

            background 140ms ease,

            transform 140ms ease;

    }



    .rb-personality-option:hover {

        border-color: rgba(255, 255, 255, 0.25);

        background: rgba(255, 255, 255, 0.07);

        transform: translateY(-1px);

    }



    .rb-personality-option.is-active {

        border-color: rgba(255, 255, 255, 0.48);

        background: rgba(255, 255, 255, 0.12);

    }



    .rb-personality-name {

        display: block;

        overflow: hidden;

        font-size: 12px;

        line-height: 1.25;

        font-weight: 800;

        white-space: nowrap;

        text-overflow: ellipsis;

    }



    .rb-personality-description {

        display: block;

        margin-top: 4px;

        overflow: hidden;

        font-size: 10px;

        line-height: 1.25;

        color: rgba(255, 255, 255, 0.48);

        white-space: nowrap;

        text-overflow: ellipsis;

    }



    #racingBrainPopup .rb-personality-panel-popup {

        margin: 0 16px 12px;

        padding: 11px;

    }



    #racingBrainPopup .rb-personality-panel-popup

    .rb-personality-options {

        grid-template-columns: repeat(2, minmax(0, 1fr));

    }



    #racingBrainPopup .rb-personality-panel-popup

    .rb-personality-option {

        padding: 8px 9px;

    }



    #racingBrainPopup .rb-personality-panel-popup

    .rb-personality-name {

        font-size: 11px;

    }



    #racingBrainPopup .rb-personality-panel-popup

    .rb-personality-description {

        font-size: 9px;

    }



    @media (max-width: 800px) {



        .rb-personality-options {

            grid-template-columns: repeat(2, minmax(0, 1fr));

        }

    }



    @media (max-width: 480px) {



        .rb-personality-panel {

            padding: 11px;

        }



        .rb-personality-option {

            padding: 9px;

        }



        .rb-personality-name {

            font-size: 11px;

        }



        .rb-personality-description {

            font-size: 9px;

        }

    }



