@charset "utf-8";

/************************************************************************************/
/*************************** AJUSTES PARA CELULAR E TABLET **************************/
/************************************************************************************/
/* Este arquivo deve ser carregado DEPOIS do bootstrap e do estilo_painel_controle.  */
/* Todas as regras de layout ficam dentro de media queries, então o visual desktop   */
/* (telas com 992px ou mais) não é alterado.                                          */
/************************************************************************************/

/* Botão "hambúrguer" e sombra do menu: ocultos no desktop */
.botao-menu,
.menu-sombra {
    display: none;
}

/************************************************************************************/
/********************* TABLET E CELULAR (até 991px): MENU LATERAL *******************/
/************************************************************************************/

@media (max-width: 991px) {

    /* ---------- CABEÇALHO ---------- */
    .cabecalho {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        min-height: 52px;
        padding: 6px 10px;
        margin-bottom: 0 !important;
    }

        .cabecalho .cabecalho-logo,
        .cabecalho .cabecalho-vazio {
            display: none;
        }

        .cabecalho .cabecalho-usuario {
            -webkit-box-flex: 1;
            -ms-flex: 1 1 auto;
            flex: 1 1 auto;
            min-width: 0;
            padding: 0 0 0 10px !important;
            text-align: right;
        }

        .cabecalho .label_cabecalho {
            display: block;
            font-size: 12px;
            line-height: 1.35;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    .botao-menu {
        display: block;
        -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        width: 44px;
        height: 40px;
        padding: 9px 10px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 6px;
        cursor: pointer;
    }

        .botao-menu span {
            display: block;
            height: 3px;
            margin: 0 0 5px 0;
            background: #ffffff;
            border-radius: 2px;
        }

            .botao-menu span:last-child {
                margin-bottom: 0;
            }

    /* ---------- MENU LATERAL (GAVETA) ---------- */
    .wss_menu {
        display: block !important;
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        float: none;
        width: 270px;
        max-width: 85vw;
        height: auto !important;
        z-index: 2000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translateX(-105%);
        transform: translateX(-105%);
        -webkit-transition: -webkit-transform .25s ease;
        transition: transform .25s ease;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.35);
        padding-bottom: 20px;
    }

    body.menu-aberto .wss_menu {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }

    .menu-sombra {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1999;
        background: rgba(0, 0, 0, 0.45);
    }

    body.menu-aberto .menu-sombra {
        display: block;
    }

    body.menu-aberto {
        overflow: hidden;
    }

    .wss_menu li {
        margin: 0 0 0 18px;
        background-position: left center;
    }

        .wss_menu li a {
            display: block;
            height: auto;
            padding: 11px 10px 11px 30px;
            margin: 0;
            font-size: 15px;
        }

    .wss_menu .menu_cabecalho {
        font-size: 12px;
        line-height: 2.2em;
    }

    /* ---------- ÁREA DE CONTEÚDO ---------- */
    .formulario {
        min-width: 0;
        margin-top: 0;
        background: #ffffff;
    }

    #content {
        margin-left: 0;
        border-left: none;
        min-height: 0;
        padding: 10px;
        height: auto !important; /* algumas páginas fixam a altura via JavaScript */
    }

    #corpo {
        height: auto !important; /* algumas páginas fixam a altura via JavaScript */
    }

    /* Cabeçalho dos painéis (título + mensagens) */
    .panel .panel-heading {
        height: auto;
        overflow: hidden;
        padding: 10px 0;
    }

    .mensagem_atencao,
    .mensagem_erro,
    .mensagem_informacao,
    .mensagem_sucesso {
        float: none;
        width: 100%;
        margin: 6px 0 0 0;
        text-indent: 0;
        padding: 6px 8px 6px 40px;
        line-height: 1.35;
    }

        .mensagem_atencao:empty,
        .mensagem_erro:empty,
        .mensagem_informacao:empty,
        .mensagem_sucesso:empty {
            display: none;
        }

    /* ---------- POPUPS (ModalPopupExtender) ---------- */
    .modal_popup,
    .modal_popup_selecionar_imagem {
        width: calc(100vw - 24px) !important;
        max-width: 640px;
        height: auto !important;
        max-height: calc(100vh - 30px);
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    }

    .modal_mensagem[style*="height"] {
        height: auto !important;
        max-height: 55vh;
    }

    .modal_botao_fechar {
        padding: 0;
        right: 10px;
        top: 10px;
        z-index: 1;
    }

    .modal_titulo_mensagem {
        padding: 16px 40px 10px 16px;
        font-size: 17px;
    }

    .modal_mensagem {
        padding: 5px 14px 14px 14px;
    }
}

/************************************************************************************/
/************************* CELULAR (até 767px): CONTEÚDO ****************************/
/************************************************************************************/

@media (max-width: 767px) {

    /* Evita o zoom automático do iOS ao focar campos e aumenta a área de toque */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea,
    .textbox,
    .textbox_obrigatorio,
    .textbox_desabilitado {
        font-size: 16px !important;
        max-width: 100%;
    }

    .textbox,
    .textbox_obrigatorio,
    .textbox_desabilitado {
        min-height: 38px;
        height: auto;
    }

    .botao,
    .botao_alerta,
    .botao_social {
        padding: 10px 18px;
        font-size: 15px;
        margin: 4px 0;
        max-width: 100%;
        white-space: normal;
    }

    img {
        max-width: 100%;
    }

    .label_titulo_formulario {
        font-size: 16px;
    }

    .label_cadastro {
        text-align: left;
    }

    footer {
        line-height: 1.3;
    }

    .rodape {
        font-size: 11px;
    }

    /* ---------- FILTROS: um campo por linha, largura total ---------- */
    .filtros,
    .filtros > tbody,
    .filtros > tbody > tr,
    .filtros > tbody > tr > td {
        display: block;
        width: 100% !important;
        height: auto !important;
        text-align: left !important;
    }

        .filtros > tbody > tr > td {
            padding: 4px 0;
        }

            .filtros > tbody > tr > td:empty {
                display: none;
            }

        .filtros > tbody > tr.datagrid_titulo > td {
            padding: 6px 10px;
        }

        .filtros select,
        .filtros input[type="text"],
        .filtros input[type="file"],
        .filtros input[type="submit"] {
            display: block;
            width: 100% !important;
        }

        .filtros input[type="file"] {
            font-size: 14px !important;
        }

        .filtros span.label,
        .filtros span.label_cadastro {
            display: block;
            margin: 8px 0 0 0;
            color: #4c4c4c;
            font-size: 13px;
        }

        .filtros .filtro-opcao {
            display: block;
            padding: 3px 0;
        }

            .filtros .filtro-opcao label {
                display: inline;
                margin-left: 6px;
                font-weight: bold;
            }

    /* Caixas de data com o calendário do AjaxControlToolkit */
    .filtros .ajax__calendar_container {
        z-index: 1500 !important;
    }

    /* ---------- LISTAS (DataList) EM FORMATO DE CARTÃO ---------- */
    .lista-responsiva .grade-cabecalho {
        display: none;
    }

    .lista-responsiva .grade-corpo {
        height: auto !important;
        overflow: visible !important;
        padding: 8px 0 2px 0;
    }

        .lista-responsiva .grade-corpo table,
        .lista-responsiva .grade-corpo tbody,
        .lista-responsiva .grade-corpo tr,
        .lista-responsiva .grade-corpo td {
            display: block;
            width: 100% !important;
        }

    .linha-cartao {
        border: 1px solid #c3c8e8 !important;
        border-radius: 8px;
        margin: 0 0 8px 0;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

        .linha-cartao tr {
            height: auto !important;
            padding: 6px 0;
        }

        .linha-cartao td[data-label] {
            display: -webkit-box !important;
            display: -ms-flexbox !important;
            display: flex !important;
            -webkit-box-pack: justify;
            -ms-flex-pack: justify;
            justify-content: space-between;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            padding: 4px 12px;
            text-align: right !important;
            font-size: 14px;
            word-break: break-word;
        }

            .linha-cartao td[data-label]::before {
                content: attr(data-label);
                -ms-flex-negative: 0;
                flex-shrink: 0;
                padding-right: 12px;
                font-weight: bold;
                color: #555555;
                text-align: left;
            }

            .linha-cartao td[data-label] .label {
                font-size: 14px;
            }

        .linha-cartao td:not([data-label]) {
            display: none !important;
        }

    /* Rodapé de totais das listas */
    .grade-rodape > tbody > tr {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        height: auto !important;
        padding: 6px 4px;
    }

        .grade-rodape > tbody > tr > td {
            display: block;
            width: auto !important;
            padding: 2px 8px;
        }

    /* ---------- TABELAS DE FORMULÁRIO (rótulo à esquerda + campo) ---------- */
    .tabela-form {
        width: 100% !important;
    }

        .tabela-form,
        .tabela-form > tbody,
        .tabela-form > tbody > tr,
        .tabela-form > tbody > tr > td {
            display: block;
            height: auto !important;
        }

            .tabela-form > tbody > tr > td {
                width: auto !important;
                text-align: left !important;
                padding: 2px 8px;
            }

                .tabela-form > tbody > tr > td:empty {
                    padding: 0;
                }

            .tabela-form > tbody > tr.datagrid_titulo > td {
                min-height: 8px;
            }

            .tabela-form input[type="text"],
            .tabela-form input[type="password"],
            .tabela-form select,
            .tabela-form textarea {
                width: 100% !important;
            }

            .tabela-form .label,
            .tabela-form .label_titulo_formulario {
                font-size: 14px;
            }

    /* Linha de botões lado a lado dentro das tabelas de formulário */
    .tabela-form input[type="submit"] {
        min-width: 120px;
    }

    /* Combos Shopping/Loja do administrador */
    .combos-admin span.label,
    .combos-admin span.label_cadastro {
        display: block;
        margin: 8px 0 2px 0;
    }

    .combos-admin select {
        display: block;
        width: 100% !important;
    }

    /* ---------- ABAS (TabContainer) ---------- */
    .tabcontainer .ajax__tab_header {
        padding: 0;
        white-space: nowrap;
        overflow-x: auto;
    }

    .tabcontainer .ajax__tab_active .ajax__tab_tab,
    .tabcontainer .ajax__tab_hover .ajax__tab_tab,
    .tabcontainer .ajax__tab_header .ajax__tab_tab {
        margin: 16px 10px 0 0;
    }

    .tabcontainer .ajax__tab_active .ajax__tab_inner,
    .tabcontainer .ajax__tab_header .ajax__tab_inner,
    .tabcontainer .ajax__tab_hover .ajax__tab_inner {
        margin-left: 10px;
    }

    /* ---------- LOGIN (default.aspx) ---------- */
    .login-form {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
        width: calc(100% - 32px);
        max-width: 400px;
        margin: 24px auto;
        padding: 20px;
    }

    .rodape_padrao {
        position: static;
        padding: 10px 12px;
        font-size: 11px;
    }
}

/************************************************************************************/
/********************** LAYOUT EM DUAS COLUNAS (lista + formulário) *****************/
/************************************************************************************/

@media (max-width: 991px) {
    .layout-empilhado,
    .layout-empilhado > tbody,
    .layout-empilhado > tbody > tr,
    .layout-empilhado > tbody > tr > td {
        display: block;
        width: 100% !important;
    }

        .layout-empilhado > tbody > tr > td:empty {
            display: none;
        }

        .layout-empilhado > tbody > tr > td + td {
            padding-top: 12px;
        }

        .layout-empilhado .form-horizontal .textbox,
        .layout-empilhado .form-horizontal .textbox_obrigatorio {
            width: 100% !important;
        }
}

@media (max-width: 767px) {

    /* Área de lista cuja altura é fixada por JavaScript: cresce com o conteúdo */
    .altura-auto {
        height: auto !important;
        overflow: visible !important;
    }

    /* Botões de ação (alterar/excluir) dentro dos cartões, alinhados à direita */
    .linha-cartao td[data-label] > .botao-grid {
        display: inline-block;
        margin-left: 10px;
    }

        .linha-cartao td[data-label] > .botao-grid:first-of-type {
            margin-left: auto;
        }

    /* GridView de arquivos (troca_informacoes): nome em cima, botões lado a lado */
    .grade-arquivos,
    .grade-arquivos > tbody {
        display: block;
        width: 100% !important;
    }

        .grade-arquivos > tbody > tr {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
            border: 1px solid #c3c8e8;
            border-radius: 8px;
            margin: 0 0 8px 0;
            padding: 6px 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
        }

            .grade-arquivos > tbody > tr > th {
                display: none;
            }

            .grade-arquivos > tbody > tr:first-child:not(:has(td)) {
                display: none;
            }

            .grade-arquivos > tbody > tr > td {
                display: block;
                -webkit-box-flex: 1;
                -ms-flex: 1 1 50%;
                flex: 1 1 50%;
                width: auto !important;
                border: none !important;
                padding: 4px 6px;
                font-size: 14px;
                word-break: break-all;
            }

                .grade-arquivos > tbody > tr > td:first-child {
                    -ms-flex: 1 1 100%;
                    flex: 1 1 100%;
                    font-weight: bold;
                }

                .grade-arquivos > tbody > tr > td .botao,
                .grade-arquivos > tbody > tr > td .botao_alerta {
                    display: block;
                    text-align: center;
                    height: auto !important;
                }
}

/* Celular pequeno: login ocupa quase toda a largura */
@media (max-width: 440px) {
    .login-form {
        width: calc(100% - 20px);
        margin: 16px auto;
        padding: 16px;
    }
}
