/*
 * Minha Conta (Tema)
 * Layout em cards + grelhas, sem Elementor.
 */

.tnz-myaccount-page{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 28px 16px;
}

.tnz-myaccount-wrap{
  max-width: var(--tnz-max, 1280px);
  margin: 0 auto;
}

.tnz-myaccount-hero{ margin: 6px 0 22px; }

.tnz-myaccount-title{
  margin: 0;
  font-size: clamp(26px, 2.2vw, 36px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--tnz-text, #0f172a);
}

.tnz-myaccount-subtitle{
  margin: 10px 0 0;
  max-width: 70ch;
  color: rgba(15, 23, 42, .75);
}

/* Wrapper geral do Woo */
.tnz-myaccount-shell .woocommerce{
  margin: 0;
}

/* Card do nosso template */
.tnz-myaccount-card{
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .06);
  padding: 22px;
}

/* Inputs & botões (uniformizar + largura 100%) */
.tnz-myaccount-shell input[type="text"],
.tnz-myaccount-shell input[type="email"],
.tnz-myaccount-shell input[type="password"],
.tnz-myaccount-shell input[type="tel"],
.tnz-myaccount-shell input[type="search"],
.tnz-myaccount-shell select,
.tnz-myaccount-shell textarea{
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .18);
  padding: 10px 12px;
  background: #fff;
}

.tnz-myaccount-shell button,
.tnz-myaccount-shell .button,
.tnz-myaccount-shell a.button,
.tnz-myaccount-shell input.button,
.tnz-myaccount-shell input[type="submit"]{
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Reset de floats que o Woo ainda pode aplicar */
.tnz-myaccount .woocommerce-MyAccount-navigation,
.tnz-myaccount .woocommerce-MyAccount-content{
  float: none !important;
  width: auto !important;
}

/* Cards */
.tnz-myaccount-shell .woocommerce form,
.tnz-myaccount-shell .woocommerce-MyAccount-navigation,
.tnz-myaccount-shell .woocommerce-MyAccount-content{
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}

/* ------------------------------
 * Estado: SEM LOGIN (login + registo)
 * ------------------------------ */
.tnz-myaccount-shell #customer_login{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.tnz-myaccount-shell #customer_login .u-column1,
.tnz-myaccount-shell #customer_login .u-column2{
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

.tnz-myaccount-shell #customer_login form{
  padding: 18px;
}

.tnz-myaccount-shell #customer_login h2{
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.tnz-myaccount-shell #customer_login label{
  font-weight: 600;
}

.tnz-myaccount-shell #customer_login input[type="text"],
.tnz-myaccount-shell #customer_login input[type="email"],
.tnz-myaccount-shell #customer_login input[type="password"],
.tnz-myaccount-shell #customer_login input[type="tel"]{
  width: 100%;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 12px;
  padding: 12px 12px;
  outline: none;
}

.tnz-myaccount-shell #customer_login input:focus{
  border-color: rgba(15, 23, 42, .35);
}

.tnz-myaccount-shell #customer_login .woocommerce-form__label-for-checkbox{
  display: flex;
  align-items: center;
  gap: 8px;
}

.tnz-myaccount-shell #customer_login .button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
}

@media (max-width: 900px){
  .tnz-myaccount-shell #customer_login{
    grid-template-columns: 1fr;
  }
}

/* ------------------------------
 * Estado: COM LOGIN (menu + conteúdo)
 * ------------------------------ */
.tnz-myaccount-shell .tnz-myaccount-grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: start;
}

.tnz-myaccount-shell .tnz-myaccount__nav{
  position: sticky;
  top: calc(var(--tnz-header-h, 0px) + 16px);
  align-self: start;
}

/* Separação visual menu vs conteúdo */
.tnz-myaccount-shell .tnz-myaccount__nav,
.tnz-myaccount-shell .tnz-myaccount__content{
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  overflow: hidden;
}

.tnz-myaccount-shell .tnz-myaccount__nav{
  background: rgba(15, 23, 42, .03);
}

.tnz-myaccount-shell .tnz-myaccount__content{
  background: #fff;
}

.tnz-myaccount-shell .woocommerce-MyAccount-navigation{
  padding: 14px;
}

.tnz-myaccount-shell .woocommerce-MyAccount-navigation ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tnz-myaccount-shell .woocommerce-MyAccount-navigation li{
  margin: 0;
}

.tnz-myaccount-shell .woocommerce-MyAccount-navigation a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--tnz-text, #0f172a);
}

.tnz-myaccount-shell .woocommerce-MyAccount-navigation li.is-active a{
  background: rgba(254, 215, 0, .20);
}

.tnz-myaccount-shell .woocommerce-MyAccount-navigation a:hover{
  background: rgba(15, 23, 42, .06);
}

.tnz-myaccount-shell .woocommerce-MyAccount-content{
  padding: 18px;
}

@media (max-width: 1024px){
  .tnz-myaccount-shell .tnz-myaccount-grid{
    grid-template-columns: 1fr;
  }
  .tnz-myaccount-shell .tnz-myaccount__nav{
    position: relative;
    top: auto;
  }
}

/* Ajustes gerais Woo */
.tnz-myaccount-shell .woocommerce-error,
.tnz-myaccount-shell .woocommerce-info,
.tnz-myaccount-shell .woocommerce-message{
  border-radius: 12px;
}

.tnz-myaccount-shell .woocommerce-MyAccount-content h2,
.tnz-myaccount-shell .woocommerce-MyAccount-content h3{
  margin-top: 0;
}

/* --------------------------------------------------
 * FIX: WooCommerce por defeito usa floats/larguras fixas
 * Isto causava sobreposição do menu com o conteúdo.
 * Resetamos o layout default e deixamos o grid do tema mandar.
 * -------------------------------------------------- */
.tnz-myaccount-shell .woocommerce-MyAccount-navigation,
.tnz-myaccount-shell .woocommerce-MyAccount-content{
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* Garante que o grid tem prioridade mesmo que algum plugin aplique flex */
.tnz-myaccount-grid{
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.tnz-myaccount__nav{ min-width: 240px; }
.tnz-myaccount__content{ min-width: 0; }

/* Melhor legibilidade nas tabs */
.tnz-myaccount-shell .woocommerce-MyAccount-navigation li a{
  line-height: 1.3;
}

@media (max-width: 900px){
  .tnz-myaccount-grid{
    grid-template-columns: 1fr;
  }
  .tnz-myaccount__nav{ order: 1; }
  .tnz-myaccount__content{ order: 2; }
}

/* --------------------------------------------------
 * Botões (login / registo / ações da conta)
 * Força o esquema Tenazinha (amarelo)
 * -------------------------------------------------- */
.tnz-myaccount-shell .woocommerce a.button,
.tnz-myaccount-shell .woocommerce button.button,
.tnz-myaccount-shell .woocommerce input.button,
.tnz-myaccount-shell .woocommerce #respond input#submit,
.tnz-myaccount-shell .woocommerce a.button.alt,
.tnz-myaccount-shell .woocommerce button.button.alt,
.tnz-myaccount-shell .woocommerce input.button.alt,
.tnz-myaccount-shell .woocommerce .woocommerce-Button,
.tnz-myaccount-shell .woocommerce .button{
  background: var(--tnz-yellow, #fed700) !important;
  color: var(--tnz-dark, #0f172a) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  font-weight: 800 !important;
  letter-spacing: .2px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
  text-decoration: none !important;
}

.tnz-myaccount-shell .woocommerce a.button:hover,
.tnz-myaccount-shell .woocommerce button.button:hover,
.tnz-myaccount-shell .woocommerce input.button:hover,
.tnz-myaccount-shell .woocommerce #respond input#submit:hover,
.tnz-myaccount-shell .woocommerce .woocommerce-Button:hover,
.tnz-myaccount-shell .woocommerce .button:hover{
  filter: brightness(0.98);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12) !important;
}

.tnz-myaccount-shell .woocommerce a.button:focus,
.tnz-myaccount-shell .woocommerce button.button:focus,
.tnz-myaccount-shell .woocommerce input.button:focus,
.tnz-myaccount-shell .woocommerce #respond input#submit:focus,
.tnz-myaccount-shell .woocommerce .woocommerce-Button:focus,
.tnz-myaccount-shell .woocommerce .button:focus{
  outline: 2px solid rgba(15, 23, 42, 0.25);
  outline-offset: 2px;
}

/* Botão secundário (ex.: "Sair") */
.tnz-myaccount-shell .tnz-btn--ghost,
.tnz-myaccount-shell .woocommerce a.logout{
  background: transparent !important;
  color: var(--tnz-dark, #0f172a) !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  box-shadow: none !important;
}

