/*
 * SLZ7 (V46) - Detalhes do pedido em formato ticket / cupom
 * Carregado pelo Asset Manager (inc/core/assets.php) no contexto "panel".
 * Reorganiza .woocommerce-order-details e .woocommerce-customer-details.
 */

:root {
  --otk-line: #e7e5f2;
  --otk-soft: #faf9ff;
  --otk-ink: #1f2330;
  --otk-muted: #6b7280;
}

/* ---------------------------------------------------------------- *
 * 1) Bilhete: caixa unica que envolve itens e totais
 * ---------------------------------------------------------------- */
.woocommerce-order-details {
  position: relative;
  margin: 0 0 22px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

/* faixa colorida do topo do bilhete */
.woocommerce-order-details::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--c-primary, #5f2eea), #9b7bff);
}

.woocommerce-order-details__title,
.woocommerce-order-details > h2 {
  margin: 0;
  padding: 16px 20px 0;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--otk-muted);
  font-weight: 800;
}

/* ---- canhoto (cabecalho impresso pelo modulo PHP) ---- */
.slz7-otk-stub {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 20px 0;
  padding: 0 0 16px;
  border-bottom: 2px dashed var(--otk-line);
}
.slz7-otk-stub-main { display: flex; flex-direction: column; gap: 2px; }
.slz7-otk-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--otk-muted);
}
.slz7-otk-num {
  font-size: 26px; line-height: 1.1; font-weight: 900; color: var(--otk-ink);
  font-variant-numeric: tabular-nums;
}
.slz7-otk-date { font-size: 13px; color: var(--otk-muted); }
.slz7-otk-date em { font-style: normal; opacity: .75; }

.slz7-otk-stub-side {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.slz7-otk-total { display: flex; flex-direction: column; text-align: right; }
.slz7-otk-total em {
  font-style: normal; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--otk-muted);
}
.slz7-otk-total b { font-size: 20px; font-weight: 900; color: var(--otk-ink); }
.slz7-otk-total b .woocommerce-Price-amount { font-weight: 900; }

/* ---- itens: linhas de cupom, sem grade pesada ---- */
.woocommerce-order-details table.woocommerce-table--order-details,
.woocommerce-order-details table.order_details {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
  box-shadow: none;
}
.woocommerce-order-details table.order_details thead th {
  padding: 14px 20px 8px;
  border: 0;
  background: transparent;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--otk-muted);
}
.woocommerce-order-details table.order_details thead th:last-child { text-align: right; }

.woocommerce-order-details table.order_details tbody td {
  padding: 12px 20px;
  border: 0;
  border-bottom: 1px dashed var(--otk-line);
  background: transparent;
  vertical-align: top;
  font-size: 14.5px;
}
.woocommerce-order-details table.order_details tbody tr:last-child td { border-bottom: 0; }
.woocommerce-order-details table.order_details tbody td.product-name { font-weight: 700; }
.woocommerce-order-details table.order_details tbody td.product-name a {
  color: var(--otk-ink); text-decoration: none;
}
.woocommerce-order-details table.order_details tbody td.product-name a:hover { text-decoration: underline; }
.woocommerce-order-details table.order_details tbody td.product-name .product-quantity {
  color: var(--otk-muted); font-weight: 700;
}
.woocommerce-order-details table.order_details tbody td.product-total {
  text-align: right; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.woocommerce-order-details table.order_details tbody td.download-file { font-size: 13px; }

/* ---- totais: rodape do cupom com recorte perfurado ---- */
.woocommerce-order-details table.order_details tfoot {
  position: relative;
  display: table-footer-group;
}
.woocommerce-order-details table.order_details tfoot tr:first-child th,
.woocommerce-order-details table.order_details tfoot tr:first-child td {
  border-top: 2px dashed var(--otk-line);
}
.woocommerce-order-details table.order_details tfoot th,
.woocommerce-order-details table.order_details tfoot td {
  padding: 9px 20px;
  border: 0;
  background: var(--otk-soft);
  font-size: 13.5px;
}
.woocommerce-order-details table.order_details tfoot th {
  text-align: left;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11.5px;
  color: var(--otk-muted);
}
.woocommerce-order-details table.order_details tfoot td {
  text-align: right; font-weight: 800; font-variant-numeric: tabular-nums;
}
.woocommerce-order-details table.order_details tfoot tr:last-child th,
.woocommerce-order-details table.order_details tfoot tr:last-child td {
  padding-top: 12px; padding-bottom: 16px;
  font-size: 16px; color: var(--otk-ink);
}
.woocommerce-order-details table.order_details tfoot tr:last-child th { font-size: 12px; }

/* recorte lateral (efeito bilhete) na altura dos totais */
.woocommerce-order-details .slz7-otk-notch { display: none; }

/* ---------------------------------------------------------------- *
 * 2) Acompanhamento dos itens: mesma pegada do bilhete
 * ---------------------------------------------------------------- */
.slz7-v26-detail .slz7-v26-card {
  border: 1px dashed var(--otk-line);
  border-radius: 14px;
  background: var(--otk-soft);
  box-shadow: none;
}
.slz7-v26-detail .slz7-v26-item-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}

/* ---------------------------------------------------------------- *
 * 3) Dados do cliente: canhoto do cupom
 * ---------------------------------------------------------------- */
.woocommerce-customer-details {
  margin: 0 0 26px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
.woocommerce-customer-details > h2,
.woocommerce-customer-details .woocommerce-column__title {
  margin: 0;
  padding: 16px 20px 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--otk-muted);
}
.woocommerce-customer-details .woocommerce-columns--addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}
.woocommerce-customer-details .woocommerce-columns--addresses .woocommerce-column,
.woocommerce-customer-details .woocommerce-columns--addresses .col-1,
.woocommerce-customer-details .woocommerce-columns--addresses .col-2 {
  width: auto;
  float: none;
  margin: 0;
  padding: 0 0 16px;
  border-right: 1px dashed var(--otk-line);
}
.woocommerce-customer-details .woocommerce-columns--addresses > :last-child { border-right: 0; }
.woocommerce-customer-details address {
  margin: 0;
  padding: 0 20px;
  border: 0;
  font-style: normal;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--otk-ink);
}
.woocommerce-customer-details address p { margin: 6px 0 0; }
.woocommerce-customer-details .woocommerce-customer-details--phone,
.woocommerce-customer-details .woocommerce-customer-details--email {
  display: block;
  margin: 8px 0 0;
  padding-left: 0;
  font-size: 13.5px;
  color: var(--otk-muted);
  word-break: break-word;
}

/* ---------------------------------------------------------------- *
 * 4) Celular: bilhete em blocos, sem rolagem lateral
 * ---------------------------------------------------------------- */
@media (max-width: 768px) {
  .slz7-otk-stub { align-items: flex-start; }
  .slz7-otk-stub-side { width: 100%; justify-content: space-between; }
  .slz7-otk-num { font-size: 22px; }

  .woocommerce-MyAccount-content .woocommerce-order-details table.order_details tbody tr {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px dashed var(--otk-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .woocommerce-MyAccount-content .woocommerce-order-details table.order_details tbody tr:last-child {
    border-bottom: 0 !important;
  }
  .woocommerce-MyAccount-content .woocommerce-order-details table.order_details tbody td {
    display: block !important;
    width: auto !important;
    padding: 12px 0 !important;
  }
  .woocommerce-MyAccount-content .woocommerce-order-details table.order_details tbody td:first-child { padding-left: 18px !important; }
  .woocommerce-MyAccount-content .woocommerce-order-details table.order_details tbody td:last-child { padding-right: 18px !important; text-align: right !important; }
  .woocommerce-MyAccount-content .woocommerce-order-details table.order_details tbody td::before { display: none !important; }
  .woocommerce-MyAccount-content .woocommerce-order-details table.order_details tfoot tr {
    padding-left: 18px !important;
    padding-right: 18px !important;
    background: var(--otk-soft);
    border-bottom: 0 !important;
  }
  .woocommerce-customer-details .woocommerce-columns--addresses .woocommerce-column,
  .woocommerce-customer-details .woocommerce-columns--addresses .col-1,
  .woocommerce-customer-details .woocommerce-columns--addresses .col-2 {
    border-right: 0;
    border-bottom: 1px dashed var(--otk-line);
  }
  .woocommerce-customer-details .woocommerce-columns--addresses > :last-child { border-bottom: 0; }
}
