/*
 * Tenazinha Step Checkout – Address Book
 * UI clean: cartões no checkout + modal para escolher/criar/editar
 */

/* Checkout: esconde os formulários clássicos (mantém no DOM para compatibilidade) */
.woocommerce-checkout .woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields .woocommerce-shipping-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields #ship-to-different-address {
  display: none !important;
}

.tnzsc-ab-cardpick {
  margin: 0 0 16px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.tnzsc-ab-cardpick__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.tnzsc-ab-cardpick__change {
  text-decoration: none;
  font-weight: 600;
}

.tnzsc-ab-cardpick__body {
  padding: 12px 14px;
}

.tnzsc-ab-muted {
  opacity: .7;
  font-size: 13px;
}

.tnzsc-ab-hint {
  margin-top: 10px;
  font-size: 12px;
  opacity: .75;
}

/* (removido) botão "usar a mesma" */

/* Wrapper do passo Moradas (1 container no passo, 2 cartões dentro) */
.tnzsc-ab-stepbox {
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
}

.tnzsc-ab-cardgrid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .tnzsc-ab-cardgrid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .tnzsc-ab-cardpick { margin: 0; }
}

/* Campos Woo ficam no DOM mas invisíveis */
.tnzsc-hidden-fields { display:none !important; }

/* -------------------------------------------------
   Botões (Account + Modal) – amarelo Tenazinha
   ------------------------------------------------- */
.tnzsc-ab-account .button,
.tnzsc-ab-account button.button,
.tnzsc-ab-modal .button,
.tnzsc-ab-modal button.button {
  background: #fed700 !important;
  border-color: rgba(0,0,0,.15) !important;
  color: #111 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.tnzsc-ab-account .button:hover,
.tnzsc-ab-modal .button:hover {
  filter: brightness(0.98);
}


/* Buttons */
.tnzsc-ab-btn-primary{
  background: #fed700 !important;
  border: 1px solid rgba(0,0,0,.15) !important;
  color: #111 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
.tnzsc-ab-btn-primary:hover{ filter: brightness(0.98); }

/* Discreet actions on cards */
.tnzsc-ab-action{
  background: transparent !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  color: rgba(0,0,0,.78) !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}
.tnzsc-ab-action:hover{ background: rgba(0,0,0,.04) !important; }

.tnzsc-ab-account__toolbar{
  display:flex;
  justify-content:flex-end;
  margin: 0 0 12px;
}

/* Account list: one per line */
.tnzsc-ab-account .tnzsc-ab-card{ width:100%; }

/* Modal */
.tnzsc-ab-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.tnzsc-ab-modal.is-open {
  display: block;
}

.tnzsc-ab-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.tnzsc-ab-modal__panel {
  position: relative;
  width: min(860px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 44px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tnzsc-ab-modal__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.tnzsc-ab-modal__title {
  font-size: 16px;
  font-weight: 700;
}

.tnzsc-ab-modal__x {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.tnzsc-ab-modal__content {
  padding: 14px;
  overflow: auto;
}

.tnzsc-ab-modal__bottom {
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,.06);
  display: flex;
  justify-content: flex-end;
}

/* Force Tenazinha yellow buttons inside address book UI (avoid theme purple) */
.tnzsc-ab-modal .button,
.tnzsc-ab-modal button.button,
.tnzsc-ab-modal input.button,
.tnzsc-ab-modal .button.alt {
  background: #fed700 !important;
  border-color: rgba(0,0,0,.15) !important;
  color: #111 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.tnzsc-ab-modal .button:hover,
.tnzsc-ab-modal button.button:hover,
.tnzsc-ab-modal input.button:hover {
  filter: brightness(0.98);
}

.tnzsc-ab-pick {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.tnzsc-ab-pick__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tnzsc-ab-pick__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tnzsc-ab-pick__body {
  font-size: 13px;
  opacity: .9;
}

.tnzsc-ab-pick__actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tnzsc-ab-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.tnzsc-ab-defaultline {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  opacity: .85;
}

/* My Account */
.tnzsc-ab-account h3 {
  margin-top: 0;
}

.tnzsc-ab-cards {
  /* 1 por linha (clean) */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tnzsc-ab-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.tnzsc-ab-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tnzsc-ab-card__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tnzsc-ab-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
}

.tnzsc-ab-card__body {
  font-size: 13px;
  opacity: .9;
  margin-bottom: 10px;
}

.tnzsc-ab-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tnzsc-ab-inline {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.tnzsc-ab-sep {
  margin: 22px 0;
}

.tnzsc-ab-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.tnzsc-ab-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tnzsc-ab-field input {
  width: 100%;
}

.tnzsc-ab-field.is-wide {
  grid-column: 1 / -1;
}

.tnzsc-ab-form__actions {
  margin-top: 14px;
}


/* Checkout: cartões billing + shipping lado a lado (desktop) */
.tnzsc-ab-cardgrid{display:grid;gap:16px;margin-bottom:16px;}
@media (min-width: 900px){.tnzsc-ab-cardgrid{grid-template-columns:1fr 1fr;align-items:start;}}


/* Hide Woo default headings/containers (we show only address cards) */
.woocommerce-billing-fields > h3,
.woocommerce-shipping-fields > h3{
  display:none !important;
}
.woocommerce-billing-fields,
.woocommerce-shipping-fields{
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}



.tnzsc-ab-busy-overlay{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(1px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}
.tnzsc-ab-busy-overlay.is-on{ display:flex; }
.tnzsc-ab-spinner{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid rgba(0,0,0,.12);
  border-top-color: #111;
  animation: tnzscSpin .9s linear infinite;
}
@keyframes tnzscSpin{ to { transform: rotate(360deg); } }
