/* ACE S23M CUSTOMER ACCOUNT BUTTONS FINAL
 * CSS final de override para a area do cliente.
 * Foco:
 * - Manter botoes profissionais.
 * - Corrigir alinhamento vertical real da tabela #my-orders-table.
 * - Nao afetar menu lateral, PDP, categoria, carrinho, checkout ou Asaas.
 */

/* Tabela real confirmada no navegador:
   table#my-orders-table.data.table.table-order-items.recent */
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody tr,
html body.account.sales-order-history .column.main table#my-orders-table tbody tr {
    height: 61px !important;
}

/* Células de texto: antes estavam vertical-align: top */
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.id,
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.date,
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.shipping,
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.total,
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.status,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.id,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.date,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.shipping,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.total,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.status {
    height: 61px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
    line-height: 61px !important;
}

/* Elementos internos, como span.price */
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.total .price,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.total .price {
    display: inline-flex !important;
    align-items: center !important;
    height: 61px !important;
    line-height: normal !important;
    vertical-align: middle !important;
}

/* Célula de ação: mantém botão no centro da linha */
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.actions,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.actions {
    height: 61px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
    line-height: normal !important;
    text-align: right !important;
    white-space: nowrap !important;
}

/* Botão Ver pedido dentro da tabela */
html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.actions a.action.view,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.actions a.action.view {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    transform: none !important;
}

html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.actions a.action.view:hover,
html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.actions a.action.view:hover {
    transform: translateY(-1px) !important;
}

/* Mobile: volta ao fluxo natural */
@media (max-width: 767px) {
    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody tr,
    html body.account.sales-order-history .column.main table#my-orders-table tbody tr {
        height: auto !important;
    }

    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.id,
    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.date,
    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.shipping,
    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.total,
    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.status,
    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.actions,
    html body.account.sales-order-history .column.main table#my-orders-table tbody td.col {
        height: auto !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        line-height: normal !important;
        vertical-align: top !important;
        text-align: left !important;
    }

    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.total .price,
    html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.total .price {
        height: auto !important;
        line-height: normal !important;
    }

    html body.account.customer-account-index .column.main .table-wrapper.orders-recent table#my-orders-table tbody td.col.actions a.action.view,
    html body.account.sales-order-history .column.main table#my-orders-table tbody td.col.actions a.action.view {
        height: 34px !important;
        min-height: 34px !important;
        margin-top: 5px !important;
    }
}
