/* ==========================================================
   GS CENTRAL — MINHA CONTA
   Empresas em duas colunas com escopo exato
   ========================================================== */

@media screen and (max-width: 780px) {

    /*
     * Somente o contêiner identificado pelo link real
     * de acesso às empresas recebe duas colunas.
     */
    body.gs-minha-conta-page
    .gs-account-company-grid-two {
        display: grid !important;

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

        align-items: start !important;
        align-content: start !important;

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

        gap: 8px !important;

        margin:
            8px
            0
            0 !important;

        padding: 0 !important;

        box-sizing: border-box !important;
    }

    /*
     * Somente os cards que possuem:
     *
     * /minha-conta/acessar/
     * /minha-conta/abrir/gs-link
     */
    body.gs-minha-conta-page
    .gs-account-company-card-two {
        display: flex !important;
        flex-direction: column !important;

        align-self: start !important;

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

        min-height: 0 !important;
        height: auto !important;

        margin: 0 !important;

        overflow: hidden !important;

        box-sizing: border-box !important;
    }

    body.gs-minha-conta-page
    .gs-account-company-card-two,
    body.gs-minha-conta-page
    .gs-account-company-card-two * {
        min-width: 0 !important;

        box-sizing: border-box !important;
    }

    /*
     * Quando os detalhes forem abertos,
     * a empresa ocupa as duas colunas.
     */
    body.gs-minha-conta-page
    .gs-account-company-card-two.gs-account-card-expanded {
        grid-column: 1 / -1 !important;
    }

    /*
     * Proteção do restante da página.
     *
     * Um painel que não possui link real de acesso
     * nunca pode continuar com classes de empresa.
     */
    body.gs-minha-conta-page
    .gs-not-company-card {
        grid-column: auto !important;

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

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    /*
     * Corrige os estados vazios dos painéis,
     * incluindo "Sem vendas no período".
     */
    body.gs-minha-conta-page
    .empty-state,
    body.gs-minha-conta-page
    .empty-cell,
    body.gs-minha-conta-page
    [data-empty-state],
    body.gs-minha-conta-page
    .gs-account-normal-empty-state {
        display: flex !important;

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

        grid-column: 1 / -1 !important;

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

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

        margin: 0 !important;

        padding:
            12px
            14px !important;

        text-align: center !important;

        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;

        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;

        box-sizing: border-box !important;
    }

    body.gs-minha-conta-page
    .empty-state *,
    body.gs-minha-conta-page
    .empty-cell *,
    body.gs-minha-conta-page
    [data-empty-state] *,
    body.gs-minha-conta-page
    .gs-account-normal-empty-state * {
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;

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

        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;

        writing-mode: horizontal-tb !important;
    }
}

@media screen and (max-width: 390px) {

    body.gs-minha-conta-page
    .gs-account-company-grid-two {
        gap: 6px !important;
    }

    body.gs-minha-conta-page
    .empty-state,
    body.gs-minha-conta-page
    .empty-cell,
    body.gs-minha-conta-page
    [data-empty-state],
    body.gs-minha-conta-page
    .gs-account-normal-empty-state {
        min-height: 48px !important;

        padding:
            10px
            12px !important;
    }
}
