/* ==========================================================
   WooFood Theme 3.5.50 — WooCommerce Minha Conta
   ==========================================================
   Camada isolada para a página Minha Conta.
   Prioridades:
   - container dinâmico;
   - Flexbox no login/cadastro e no estado autenticado;
   - cards e controles usando tokens dinâmicos do WooFood;
   - inputs com raio dinâmico apenas nesta tela;
   - layout responsivo sem depender de Grid.
   ========================================================== */

body.woocommerce-account.woofood-app-theme{
  --woofood-account-control-radius:var(--woofood-button-radius);
}

/* ----------------------------------------------------------
   Shell / container dinâmico
   ---------------------------------------------------------- */
body.woocommerce-account.woofood-app-theme .content-inner > .container.fb{
  width:100% !important;
  max-width:var(--woofood-container-width,1180px) !important;
  min-width:0;
  box-sizing:border-box;
}

body.woocommerce-account.woofood-app-theme .woofood-wc-box,
body.woocommerce-account.woofood-app-theme .woofood-wc-box > .entry-content,
body.woocommerce-account.woofood-app-theme .entry-content > .woocommerce{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

body.woocommerce-account.woofood-app-theme .entry-content > .woocommerce{
  color:var(--woofood-text);
}

/* ----------------------------------------------------------
   Tipografia / links / mensagens
   ---------------------------------------------------------- */
body.woocommerce-account.woofood-app-theme .woocommerce h2,
body.woocommerce-account.woofood-app-theme .woocommerce h3{
  margin-top:0;
  color:var(--woofood-heading);
  line-height:1.2;
}

body.woocommerce-account.woofood-app-theme .woocommerce h2{
  margin-bottom:18px;
  font-size:clamp(1.15rem,2vw,1.35rem);
  font-weight:700;
}

body.woocommerce-account.woofood-app-theme .woocommerce h3{
  margin-bottom:14px;
  font-size:1.05rem;
  font-weight:700;
}

body.woocommerce-account.woofood-app-theme .woocommerce a:not(.button){
  color:var(--woofood-primary);
  text-decoration-color:color-mix(in srgb,var(--woofood-primary) 35%,transparent);
  text-underline-offset:2px;
  transition:color .18s ease,text-decoration-color .18s ease;
}

body.woocommerce-account.woofood-app-theme .woocommerce a:not(.button):hover{
  color:var(--woofood-primary-hover);
  text-decoration-color:currentColor;
}

body.woocommerce-account.woofood-app-theme .woocommerce-message,
body.woocommerce-account.woofood-app-theme .woocommerce-info,
body.woocommerce-account.woofood-app-theme .woocommerce-error{
  width:100%;
  box-sizing:border-box;
  margin:0 0 18px !important;
  border:1px solid var(--woofood-border) !important;
  border-radius:var(--woofood-card-radius) !important;
  box-shadow:none !important;
}

/* ----------------------------------------------------------
   Login / Cadastro — Flexbox, mesma altura e wrap natural
   ---------------------------------------------------------- */
body.woocommerce-account.woofood-app-theme #customer_login{
  display:flex !important;
  flex-wrap:wrap;
  align-items:stretch;
  gap:clamp(16px,2.2vw,28px);
  width:100%;
  margin:0;
}

body.woocommerce-account.woofood-app-theme #customer_login::before,
body.woocommerce-account.woofood-app-theme #customer_login::after{
  display:none !important;
  content:none !important;
}

body.woocommerce-account.woofood-app-theme #customer_login > .u-column1,
body.woocommerce-account.woofood-app-theme #customer_login > .u-column2{
  float:none !important;
  display:flex;
  flex:1 1 380px;
  flex-direction:column;
  width:auto !important;
  max-width:none !important;
  min-width:0;
  margin:0 !important;
  padding:clamp(18px,2.4vw,26px) !important;
  border:1px solid var(--woofood-border) !important;
  border-radius:var(--woofood-card-radius) !important;
  background:var(--woofood-surface) !important;
  box-shadow:none !important;
  box-sizing:border-box;
  transition:border-color .18s ease,box-shadow .18s ease;
}

body.woocommerce-account.woofood-app-theme #customer_login > .u-column1:focus-within,
body.woocommerce-account.woofood-app-theme #customer_login > .u-column2:focus-within{
  border-color:var(--woofood-border-hover) !important;
  box-shadow:var(--woofood-focus-ring) !important;
}

body.woocommerce-account.woofood-app-theme #customer_login > :only-child{
  flex:0 1 620px;
  margin-inline:auto !important;
}

body.woocommerce-account.woofood-app-theme #customer_login form.login,
body.woocommerce-account.woofood-app-theme #customer_login form.register{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  width:100%;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

body.woocommerce-account.woofood-app-theme #customer_login .form-row{
  width:100% !important;
}

body.woocommerce-account.woofood-app-theme #customer_login .woocommerce-privacy-policy-text{
  color:var(--woofood-muted);
  font-size:.875rem;
  line-height:1.55;
}

body.woocommerce-account.woofood-app-theme #customer_login .lost_password{
  margin:10px 0 0;
}

/* ----------------------------------------------------------
   Formulários — design system WooFood
   ---------------------------------------------------------- */
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row{
  float:none;
  min-width:0;
  margin:0 0 14px;
  padding:0;
  box-sizing:border-box;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .form-row label{
  display:flex;
  align-items:center;
  gap:.3em;
  min-height:20px;
  margin:0 0 7px;
  color:var(--woofood-heading);
  font-size:.875rem;
  font-weight:700;
  line-height:1.25;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .required{
  color:var(--woofood-danger);
}

body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input.input-text,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="email"],
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="password"],
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="tel"],
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="text"],
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row select,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row textarea,
body.woocommerce-account.woofood-app-theme .select2-container .select2-selection--single{
  width:100%;
  min-height:48px;
  padding:11px 13px;
  border:1px solid var(--woofood-border) !important;
  border-radius:var(--woofood-account-control-radius) !important;
  background:var(--woofood-surface) !important;
  color:var(--woofood-text) !important;
  box-shadow:none !important;
  outline:0 !important;
  box-sizing:border-box;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .form-row textarea{
  min-height:110px;
  resize:vertical;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input::placeholder,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row textarea::placeholder{
  color:var(--woofood-muted);
  opacity:.8;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input.input-text:hover,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="email"]:hover,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="password"]:hover,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="tel"]:hover,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="text"]:hover,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row select:hover,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row textarea:hover,
body.woocommerce-account.woofood-app-theme .select2-container .select2-selection--single:hover{
  border-color:var(--woofood-border-hover) !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input.input-text:focus,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="email"]:focus,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="password"]:focus,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="tel"]:focus,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row input[type="text"]:focus,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row select:focus,
body.woocommerce-account.woofood-app-theme .woocommerce form .form-row textarea:focus,
body.woocommerce-account.woofood-app-theme .select2-container--open .select2-selection--single,
body.woocommerce-account.woofood-app-theme .select2-container--focus .select2-selection--single{
  border-color:var(--woofood-border-hover) !important;
  box-shadow:var(--woofood-focus-ring) !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .password-input{
  display:block;
  width:100%;
}

body.woocommerce-account.woofood-app-theme .woocommerce form .show-password-input{
  color:var(--woofood-muted);
}

body.woocommerce-account.woofood-app-theme .woocommerce form .woocommerce-form-login__rememberme{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  color:var(--woofood-text);
}

body.woocommerce-account.woofood-app-theme .woocommerce form input[type="checkbox"],
body.woocommerce-account.woofood-app-theme .woocommerce form input[type="radio"]{
  accent-color:var(--woofood-primary);
}

body.woocommerce-account.woofood-app-theme .woocommerce-password-strength{
  margin-top:7px;
  border-radius:var(--woofood-account-control-radius);
}

/* Botões da conta usam os tokens configuráveis do tema. */
body.woocommerce-account.woofood-app-theme .woocommerce .button,
body.woocommerce-account.woofood-app-theme .woocommerce button.button,
body.woocommerce-account.woofood-app-theme .woocommerce input.button{
  padding:11px 18px !important;
  border:1px solid var(--woofood-primary) !important;
  border-radius:var(--woofood-button-radius) !important;
  background:var(--woofood-primary) !important;
  color:var(--woofood-on-primary) !important;
  box-shadow:none !important;
  font-weight:700 !important;
  line-height:1.2;
  transform:none !important;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease;
}

body.woocommerce-account.woofood-app-theme .woocommerce .button:hover,
body.woocommerce-account.woofood-app-theme .woocommerce button.button:hover,
body.woocommerce-account.woofood-app-theme .woocommerce input.button:hover{
  border-color:var(--woofood-primary-hover) !important;
  background:var(--woofood-primary-hover) !important;
  color:var(--woofood-on-primary-hover) !important;
  transform:none !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce .button:focus,
body.woocommerce-account.woofood-app-theme .woocommerce .button:focus-visible,
body.woocommerce-account.woofood-app-theme .woocommerce button.button:focus,
body.woocommerce-account.woofood-app-theme .woocommerce button.button:focus-visible,
body.woocommerce-account.woofood-app-theme .woocommerce input.button:focus,
body.woocommerce-account.woofood-app-theme .woocommerce input.button:focus-visible{
  outline:0 !important;
  box-shadow:var(--woofood-focus-ring) !important;
}

/* ----------------------------------------------------------
   Estado autenticado — Flexbox, sem alterar a ordem do Woo
   ---------------------------------------------------------- */
body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce{
  display:flex !important;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:clamp(16px,2.2vw,28px);
}

body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce::before,
body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce::after{
  display:none !important;
  content:none !important;
}

body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce > .woocommerce-notices-wrapper,
body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce > .woocommerce-message,
body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce > .woocommerce-info,
body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce > .woocommerce-error{
  flex:1 1 100%;
  min-width:100%;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation,
body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content{
  float:none !important;
  width:auto !important;
  max-width:none !important;
  min-width:0;
  height:auto;
  margin:0 !important;
  padding:clamp(16px,2vw,22px) !important;
  border:1px solid var(--woofood-border) !important;
  border-radius:var(--woofood-card-radius) !important;
  background:var(--woofood-surface) !important;
  color:var(--woofood-text);
  box-shadow:none !important;
  box-sizing:border-box;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation{
  flex:0 1 240px;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content{
  flex:1 1 560px;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation ul{
  display:flex !important;
  flex-direction:column;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation li{
  flex:0 0 auto;
  margin:0;
  padding:0;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 12px;
  border:1px solid transparent;
  border-radius:var(--woofood-button-radius);
  color:var(--woofood-heading) !important;
  font-weight:700;
  line-height:1.25;
  text-decoration:none !important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation a:hover,
body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation a:focus-visible{
  border-color:var(--woofood-border-hover);
  background:var(--woofood-primary-soft);
  color:var(--woofood-primary-hover) !important;
  outline:0;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation .is-active > a{
  border-color:color-mix(in srgb,var(--woofood-primary) 20%,var(--woofood-border));
  background:var(--woofood-primary-soft);
  color:var(--woofood-primary) !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content > :first-child{
  margin-top:0;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content > :last-child{
  margin-bottom:0;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content p{
  line-height:1.6;
}

/* ----------------------------------------------------------
   Endereços — Flexbox
   ---------------------------------------------------------- */
body.woocommerce-account.woofood-app-theme .woocommerce-Addresses{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:16px;
  margin-top:16px;
}

body.woocommerce-account.woofood-app-theme .woocommerce-Addresses::before,
body.woocommerce-account.woofood-app-theme .woocommerce-Addresses::after{
  display:none !important;
  content:none !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce-Addresses > .woocommerce-Address{
  float:none !important;
  flex:1 1 280px;
  width:auto !important;
  max-width:none !important;
  min-width:0;
  margin:0 !important;
  padding:16px;
  border:1px solid var(--woofood-border);
  border-radius:var(--woofood-card-radius);
  background:var(--woofood-surface-soft);
  box-sizing:border-box;
}

body.woocommerce-account.woofood-app-theme .woocommerce-Address-title{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 12px;
  margin-bottom:10px;
}

body.woocommerce-account.woofood-app-theme .woocommerce-Address-title h3{
  margin:0;
}

body.woocommerce-account.woofood-app-theme .woocommerce-Address address{
  margin:0;
  color:var(--woofood-muted);
  line-height:1.6;
}

/* ----------------------------------------------------------
   Editar conta / endereço — Flexbox com wrap natural
   ---------------------------------------------------------- */
body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm.edit-account,
body.woocommerce-account.woofood-app-theme .woocommerce-address-fields__field-wrapper{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  column-gap:16px;
}

body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm.edit-account > .form-row,
body.woocommerce-account.woofood-app-theme .woocommerce-address-fields__field-wrapper > .form-row{
  flex:1 1 280px;
  width:auto !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm.edit-account > .form-row-wide,
body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm.edit-account > fieldset,
body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm.edit-account > p:last-child,
body.woocommerce-account.woofood-app-theme .woocommerce-address-fields__field-wrapper > .form-row-wide{
  flex:1 1 100%;
  width:100% !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm fieldset{
  min-width:0;
  margin:4px 0 16px;
  padding:16px;
  border:1px solid var(--woofood-border);
  border-radius:var(--woofood-card-radius);
}

body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm legend{
  padding:0 6px;
  color:var(--woofood-heading);
  font-weight:700;
}

/* ----------------------------------------------------------
   Tabelas de pedidos/downloads
   ---------------------------------------------------------- */
body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content table.shop_table{
  width:100%;
  margin-bottom:0;
  border-color:var(--woofood-border) !important;
  border-radius:var(--woofood-card-radius) !important;
  background:var(--woofood-surface);
  box-shadow:none !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content table.shop_table td{
  border-color:var(--woofood-border) !important;
}

body.woocommerce-account.woofood-app-theme .woocommerce-orders-table__cell.woocommerce-orders-table__cell-order-actions{
  display:flex !important;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

body.woocommerce-account.woofood-app-theme .woocommerce-orders-table__cell-order-actions .button{
  flex:0 1 auto;
  margin:0 !important;
}

/* ----------------------------------------------------------
   Responsividade
   ---------------------------------------------------------- */
@media (max-width:767.98px){
  body.woocommerce-account.woofood-app-theme .content-inner > .container.fb{
    padding-left:14px;
    padding-right:14px;
  }

  body.woocommerce-account.woofood-app-theme #customer_login{
    gap:14px;
  }

  body.woocommerce-account.woofood-app-theme #customer_login > .u-column1,
  body.woocommerce-account.woofood-app-theme #customer_login > .u-column2{
    flex-basis:100%;
  }

  body.logged-in.woocommerce-account.woofood-app-theme .entry-content > .woocommerce{
    gap:14px;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation,
  body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content{
    flex:1 1 100%;
    width:100% !important;
    padding:14px !important;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation ul{
    flex-direction:row;
    flex-wrap:wrap;
    gap:8px;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation li{
    flex:1 1 140px;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation a{
    justify-content:center;
    min-height:40px;
    text-align:center;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-orders-table__cell-order-actions .button{
    flex:1 1 130px;
    width:auto !important;
    min-width:0;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-Addresses > .woocommerce-Address,
  body.woocommerce-account.woofood-app-theme .woocommerce-EditAccountForm.edit-account > .form-row,
  body.woocommerce-account.woofood-app-theme .woocommerce-address-fields__field-wrapper > .form-row{
    flex-basis:100%;
    width:100% !important;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce .button,
  body.woocommerce-account.woofood-app-theme .woocommerce button.button,
  body.woocommerce-account.woofood-app-theme .woocommerce input.button{
    max-width:100%;
  }
}

@media (max-width:420px){
  body.woocommerce-account.woofood-app-theme #customer_login > .u-column1,
  body.woocommerce-account.woofood-app-theme #customer_login > .u-column2{
    padding:16px !important;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-navigation li{
    flex-basis:100%;
  }

  body.woocommerce-account.woofood-app-theme .woocommerce-MyAccount-content .button{
    white-space:normal;
  }
}

@media (prefers-reduced-motion:reduce){
  body.woocommerce-account.woofood-app-theme .woocommerce *{
    transition:none !important;
  }
}
