/*
 * Mijn account in de stijl van ontwerp G: inloggen (uitgelogd), dashboard,
 * bestellingen, adressen en accountgegevens.
 *
 * Laadt alleen op is_account_page(), ná winkelwagen-afrekenen.css (zie
 * inc/enqueue-winkelwagen-afrekenen.php). Velden, knoppen, meldingen en de
 * besteldetails (bestelling bekijken) komen uit die gedeelde basis; hier
 * staat alleen de indeling van de accountpagina's. Uitsluitend design-tokens.
 *
 * Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
 */

/* ==========================================================================
   1. Uitgelogd: inlogkaart + uitleg ernaast
   ========================================================================== */
body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 960px;
}

body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) > .woocommerce-notices-wrapper:empty {
  display: none;
}

body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) > h2 {
  margin: 0;
  font-family: var(--font-koppen);
  font-size: clamp(22px, 1vw + 17px, 26px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--kleur-kop);
}

@media (min-width: 900px) {
  body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) {
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    grid-template-areas:
      "melding melding"
      "kop ."
      "formulier uitleg";
    column-gap: 32px;
    align-items: start;
  }

  body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) > .woocommerce-notices-wrapper {
    grid-area: melding;
  }

  body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) > h2 {
    grid-area: kop;
  }

  body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) > form.woocommerce-form-login {
    grid-area: formulier;
  }

  body.woocommerce-account .woocommerce:has(> form.woocommerce-form-login) > .codex-account-uitleg {
    grid-area: uitleg;
  }
}

/* De inlogkaart; ook "wachtwoord vergeten" en "nieuw wachtwoord" krijgen deze vorm. */
body.woocommerce-account .woocommerce form.woocommerce-form-login,
body.woocommerce-account .woocommerce form.lost_reset_password {
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  box-sizing: border-box;
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
  background: var(--kleur-wit);
  text-align: left;
}

body.woocommerce-account .woocommerce form.lost_reset_password > p:first-child {
  margin: 0 0 16px;
  color: var(--kleur-inkt);
}

body.woocommerce-account .woocommerce form:is(.woocommerce-form-login, .lost_reset_password) .form-row {
  float: none;
  width: 100%;
}

/* Wachtwoord tonen: knop van 44×44 in het veld (was 22×22). */
body.woocommerce-account .woocommerce .password-input {
  position: relative;
  display: block;
}

body.woocommerce-account .woocommerce .password-input input.input-text {
  padding-right: 52px;
}

body.woocommerce-account .woocommerce .password-input button.show-password-input {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-klein);
  background: transparent;
  color: var(--kleur-zacht);
  box-shadow: none;
  cursor: pointer;
}

body.woocommerce-account .woocommerce .password-input button.show-password-input:hover,
body.woocommerce-account .woocommerce .password-input button.show-password-input:focus {
  background: var(--kleur-vlak);
  color: var(--kleur-inkt);
  border: 0;
}

body.woocommerce-account .woocommerce .password-input button.show-password-input::after {
  position: static;
  margin: 0;
  color: inherit;
}

/* Onthouden + Inloggen op één regel; op smal scherm onder elkaar. */
body.woocommerce-account .woocommerce form.woocommerce-form-login .form-row:has(> .woocommerce-form-login__submit) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 8px 0 0;
}

/* Clearfix-pseudo's van .form-row zouden lege flex-items worden. */
body.woocommerce-account .woocommerce form.woocommerce-form-login .form-row:has(> .woocommerce-form-login__submit)::before,
body.woocommerce-account .woocommerce form.woocommerce-form-login .form-row:has(> .woocommerce-form-login__submit)::after {
  content: none;
}

body.woocommerce-account .woocommerce label.woocommerce-form__label-for-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--kleur-inkt);
  cursor: pointer;
}

body.woocommerce-account .woocommerce .woocommerce-form-login__submit {
  float: none;
  margin: 0;
}

@media (max-width: 479px) {
  body.woocommerce-account .woocommerce .woocommerce-form-login__submit {
    width: 100%;
  }
}

body.woocommerce-account .woocommerce p.lost_password {
  margin: 12px 0 0;
}

body.woocommerce-account .woocommerce p.lost_password a,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content a:not(.button),
body.woocommerce-account .woocommerce .woocommerce-Address-title a.edit {
  color: var(--kleur-groen-donker);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.woocommerce-account .woocommerce p.lost_password a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

body.woocommerce-account .woocommerce p.lost_password a:hover,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content a:not(.button):hover {
  color: var(--kleur-inkt);
}

/* Uitleg naast het formulier (inc/enqueue-winkelwagen-afrekenen.php). */
body.woocommerce-account .woocommerce .codex-account-uitleg {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius);
  background: var(--kleur-groen-licht);
}

body.woocommerce-account .woocommerce .codex-account-uitleg h2 {
  margin: 0;
  font-family: var(--font-koppen);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--kleur-kop);
}

body.woocommerce-account .woocommerce .codex-account-uitleg p {
  margin: 0 0 4px;
  color: var(--kleur-inkt);
}

/* ==========================================================================
   2. Ingelogd: navigatie + inhoud
   ========================================================================== */
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-notices-wrapper:empty {
  display: none;
}

@media (min-width: 900px) {
  /* Vaste vlakken: een (leeg) meldingen-element vóór de navigatie mag de
     eerste kolom niet innemen. */
  body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-areas:
      "melding melding"
      "navigatie inhoud";
    column-gap: 40px;
    row-gap: 0;
    align-items: start;
  }

  body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-notices-wrapper {
    grid-area: melding;
  }

  body.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation {
    grid-area: navigatie;
  }

  body.woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
    grid-area: inhoud;
  }
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
  float: none;
  width: auto;
  margin: 0;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-rond);
  background: var(--kleur-wit);
  box-shadow: inset 0 0 0 1px var(--kleur-lijn);
  color: var(--kleur-inkt);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease-out;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li a:hover {
  background: var(--kleur-groen-licht);
  color: var(--kleur-groen-donker);
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active a {
  background: var(--kleur-groen);
  box-shadow: none;
  color: var(--kleur-wit);
}

@media (min-width: 900px) {
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {
    position: sticky;
    top: 24px;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation ul {
    display: grid;
    gap: 4px;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li a {
    min-height: 48px;
    border-radius: var(--radius-klein);
    background: transparent;
    box-shadow: none;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li a:hover {
    background: var(--kleur-wit);
    color: var(--kleur-inkt);
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active a {
    background: var(--kleur-groen-licht);
    color: var(--kleur-groen-donker);
    box-shadow: inset 4px 0 0 var(--kleur-groen);
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--kleur-lijn);
  }
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a {
  color: var(--kleur-zacht);
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
  min-width: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--kleur-inkt);
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content > p {
  max-width: 68ch;
  margin: 0 0 16px;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content :is(h2, h3) {
  margin: 0 0 12px;
  font-family: var(--font-koppen);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--kleur-kop);
}

/* Bestelling bekijken: inleidende zin ("Bestelling #123 is geplaatst op …"). */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content mark {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--kleur-groen-licht);
  color: var(--kleur-inkt);
  font-weight: 700;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content > section + section,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-order-details + .woocommerce-customer-details {
  margin-top: 24px;
}

/* ==========================================================================
   3. Bestellingen-tabel
   ========================================================================== */
body.woocommerce-account .woocommerce table.woocommerce-orders-table {
  width: 100%;
  margin: 0;
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--kleur-wit);
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table :is(th, td) {
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--kleur-lijn);
  background: none;
  font-size: 15px;
  line-height: 1.45;
  color: var(--kleur-inkt);
  text-align: left;
  vertical-align: middle;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table thead th {
  border-top: 0;
  background: var(--kleur-vlak);
  font-weight: 700;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody :is(th, td) a:not(.button) {
  color: var(--kleur-groen-donker);
  font-weight: 700;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
  text-align: right;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
  margin: 2px 0 2px 6px;
}

/* Smal scherm: elke bestelling een kaartje (WooCommerce maakt er blokken van
   en zet de kolomnaam via data-title ervoor). */
@media (max-width: 768px) {
  body.woocommerce-account .woocommerce table.woocommerce-orders-table {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: none;
  }

  body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr {
    display: block;
    margin: 0 0 12px;
    padding: 6px 16px;
    border: 1px solid var(--kleur-lijn);
    border-radius: var(--radius);
    background: var(--kleur-wit);
  }

  /* Blok (geen flex): een cel als "€ 50,00 voor 1 artikel" bestaat uit
     losse tekstknopen die anders uit elkaar worden getrokken. */
  body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr :is(th, td) {
    display: block;
    padding: 10px 0;
    background: none;
    text-align: right !important; /* woocommerce-smallscreen.css */
  }

  body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr :is(th, td)::after {
    content: "";
    display: table;
    clear: both;
  }

  body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr :is(th, td):first-child {
    border-top: 0;
  }

  body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr :is(th, td)::before {
    float: left;
    margin-right: 12px;
    color: var(--kleur-zacht);
    font-weight: 600;
    text-align: left;
  }

  body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody tr .woocommerce-orders-table__cell-order-actions::before {
    line-height: 44px;
  }
}

body.woocommerce-account .woocommerce .woocommerce-pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

/* ==========================================================================
   4. Adressen en accountgegevens
   ========================================================================== */
body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
}

@media (min-width: 640px) {
  body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set::before,
body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set::after {
  content: none;
}

body.woocommerce-account .woocommerce .woocommerce-Addresses .woocommerce-Address {
  float: none;
  width: auto;
  padding: 20px;
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
  background: var(--kleur-wit);
}

body.woocommerce-account .woocommerce .woocommerce-Address-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

body.woocommerce-account .woocommerce .woocommerce-Address-title::before,
body.woocommerce-account .woocommerce .woocommerce-Address-title::after {
  content: none;
}

body.woocommerce-account .woocommerce .woocommerce-Address-title h2 {
  float: none;
  margin: 0;
  font-size: 19px;
}

body.woocommerce-account .woocommerce .woocommerce-Address-title a.edit {
  float: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

body.woocommerce-account .woocommerce .woocommerce-Address address {
  font-style: normal;
  line-height: 1.6;
}

body.woocommerce-account .woocommerce form.woocommerce-EditAccountForm,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content > form:has(.woocommerce-address-fields) {
  max-width: 720px;
}

body.woocommerce-account .woocommerce form.woocommerce-EditAccountForm fieldset {
  margin: 8px 0 20px;
  padding: 16px 20px 4px;
  border: 1px solid var(--kleur-lijn);
  border-radius: var(--radius);
}

body.woocommerce-account .woocommerce form.woocommerce-EditAccountForm legend {
  padding: 0 6px;
  font-weight: 700;
  color: var(--kleur-inkt);
}

body.woocommerce-account .woocommerce form .form-row :is(span > em, .description) {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-style: normal;
  color: var(--kleur-zacht);
}
