/* Friedify Account Preview v01: scoped to the WooCommerce account UI only. */
body.woocommerce-account .woocommerce {
  --fa-burgundy:#411020; --fa-border:#ded3cf; --fa-paper:#f7f6f4;
  color:var(--fa-burgundy); font-family:'Source Sans Pro',sans-serif;
  font-size:16px; line-height:1.6;
}
body.woocommerce-account .woocommerce :where(p,li,label,input,select,textarea,button,a,td,th,dt,dd) {
  font-family:'Source Sans Pro',sans-serif;
}
body.woocommerce-account .woocommerce :where(p,li,label,td,th,dt,dd) {font-size:15px;line-height:1.65}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {
  float:left; width:27%; max-width:270px; margin:0 0 30px;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation ul {
  list-style:none; margin:0; padding:10px; background:var(--fa-paper);
  border:1px solid var(--fa-border);border-radius:10px;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li {margin:0;padding:0;list-style:none}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation a {
  display:block; padding:12px 15px; margin:2px 0; border-radius:7px;
  color:var(--fa-burgundy);font-size:15px;font-weight:600;text-decoration:none;
  line-height:1.35;transition:background-color .15s ease,color .15s ease;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active a {
  background:var(--fa-burgundy);color:#fff;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li:not(.is-active) a:hover {
  background:#eee7e3;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
  float:right;width:calc(73% - 30px);box-sizing:border-box;
  background:var(--fa-paper);border:1px solid var(--fa-border);
  border-radius:10px;padding:26px 30px;min-height:180px;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content > :first-child {margin-top:0}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content > :last-child {margin-bottom:0}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content a:not(.button) {
  color:var(--fa-burgundy);text-decoration:underline;text-underline-offset:3px;
}
body.woocommerce-account .woocommerce :where(.woocommerce-Button,.button,button.button,input.button) {
  background:var(--fa-burgundy)!important;color:#fff!important;border:1px solid var(--fa-burgundy)!important;
  border-radius:6px!important;padding:11px 18px!important;font-size:14px!important;
  font-weight:600!important;text-decoration:none!important;line-height:1.4!important;
}
body.woocommerce-account .woocommerce :where(.woocommerce-Button,.button,button.button,input.button):hover {background:#612139!important}
body.woocommerce-account .woocommerce :where(input.input-text,input[type='text'],input[type='email'],input[type='password'],input[type='tel'],select,textarea) {
  box-sizing:border-box;max-width:100%;border:1px solid var(--fa-border);border-radius:6px;
  background:#fff;color:var(--fa-burgundy);padding:10px 12px;font-size:15px;min-height:43px;
}
body.woocommerce-account .woocommerce :where(input,select,textarea,a,button):focus-visible {
  outline:2px solid var(--fa-burgundy);outline-offset:3px;
}
body.woocommerce-account .woocommerce .form-row label {font-size:14px;font-weight:600;margin-bottom:5px}
body.woocommerce-account .woocommerce :where(.woocommerce-Addresses,.woocommerce-Address) {margin-top:12px}
body.woocommerce-account .woocommerce .woocommerce-Address {box-sizing:border-box}
body.woocommerce-account .woocommerce :where(.woocommerce-Address-title h2,.woocommerce-order-details__title,.woocommerce-column__title) {
  font-size:21px;line-height:1.3;color:var(--fa-burgundy);
}
body.woocommerce-account .woocommerce table.shop_table {
  border:1px solid var(--fa-border);border-collapse:separate;border-spacing:0;
  border-radius:8px;overflow:hidden;background:#fff;width:100%;font-size:14px;
}
body.woocommerce-account .woocommerce table.shop_table :where(th,td) {padding:12px 13px;border-bottom:1px solid var(--fa-border);vertical-align:middle}
body.woocommerce-account .woocommerce table.shop_table th {font-size:12px;letter-spacing:.04em;text-transform:uppercase;font-weight:700}
body.woocommerce-account .woocommerce table.shop_table tr:last-child td {border-bottom:0}
body.woocommerce-account .woocommerce .woocommerce-message,
body.woocommerce-account .woocommerce .woocommerce-info {
  border-top-color:var(--fa-burgundy);background:#fff;color:var(--fa-burgundy);
  font-size:14px;line-height:1.5;
}
body.woocommerce-account .woocommerce :where(.u-columns,.col2-set) {gap:24px}
body.woocommerce-account .woocommerce :where(.woocommerce-form-login,.woocommerce-form-register) {
  border:1px solid var(--fa-border);background:var(--fa-paper);border-radius:10px;padding:24px;
}
body.woocommerce-account .woocommerce h2 {color:var(--fa-burgundy)}
@media (max-width: 800px) {
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
    float:none;width:100%;max-width:none;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {margin-bottom:16px}
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation ul {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:8px;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation a {
    font-size:13px;padding:12px 9px;text-align:center;overflow-wrap:anywhere;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {padding:18px 15px}
  body.woocommerce-account .woocommerce table.shop_table {display:block;overflow-x:auto}
}
@media (max-width: 360px) {
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation ul {grid-template-columns:1fr}
}

/* v02: keep order tables within their card, without changing WooCommerce data. */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
  min-width:0;
  overflow-wrap:break-word;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.shop_table {
  box-sizing:border-box;
  max-width:100%;
  width:100%;
  table-layout:fixed;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.shop_table :where(th,td) {
  box-sizing:border-box;
  overflow-wrap:anywhere;
  word-break:normal;
  padding:10px 8px;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.shop_table th {
  font-size:11px;
  letter-spacing:0;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
  display:inline-block;
  padding:9px 10px!important;
  max-width:100%;
  box-sizing:border-box;
  text-align:center;
}
/* Consistent two-line address-edit links, preserving WooCommerce labels and links. */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-Address-title {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-Address-title h2,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
  float:none;
  margin:0;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-Address-title a.edit {
  float:none;
  display:block;
  width:120px;
  max-width:100%;
  line-height:1.5;
  white-space:normal;
  overflow-wrap:normal;
}
/* WooCommerce notices: Friedify neutral surface, accessible contrast. */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content :where(.woocommerce-info,.woocommerce-message) {
  box-sizing:border-box;
  max-width:100%;
  background:#fff;
  border:1px solid var(--fa-border);
  border-left:3px solid var(--fa-burgundy);
  border-top:1px solid var(--fa-border);
  border-radius:7px;
  color:var(--fa-burgundy);
  box-shadow:none;
  padding:16px 18px 16px 48px;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content :where(.woocommerce-info,.woocommerce-message)::before {
  color:var(--fa-burgundy);
  top:16px;
  left:17px;
}
@media(max-width:800px) {
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.shop_table {
    table-layout:auto;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
    min-height:40px;
  }
}

/* v03: use the same 1080px content width as Friedify's shop/category layouts. */
@media (min-width: 801px) {
  body.woocommerce-account .wp-site-blocks > main,
  body.woocommerce-account .wp-site-blocks > main > .wp-block-group,
  body.woocommerce-account .wp-site-blocks > main .wp-block-post-content {
    box-sizing: border-box;
    width: 100%;
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body.woocommerce-account .wp-site-blocks > main .wp-block-post-content {
    padding-left: 14px;
    padding-right: 14px;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {
    width: 220px;
    max-width: 220px;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
    width: calc(100% - 250px);
    padding: 26px 30px;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table {
    table-layout: auto;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table :where(th,td) {
    overflow-wrap: normal;
    word-break: normal;
    padding: 12px 11px;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table :where(.woocommerce-orders-table__cell-order-date,.woocommerce-orders-table__cell-order-actions) {
    white-space: nowrap;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
    max-width: none;
    white-space: nowrap;
  }
}
/* Keep content inside the card on intermediate viewport sizes. */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content { min-width: 0; }
@media (min-width: 801px) and (max-width: 1050px) {
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content { padding: 20px 18px; }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .woocommerce-orders-table :where(th,td) { padding: 10px 7px; }
}

/* v04: cart-matched account title, outside the account columns. */
body.woocommerce-account main .friedify-account-heading {
  box-sizing:border-box; max-width:1080px; width:100%;
  margin:0 auto 34px; padding:0 14px;
  color:#411020; font-family:'Julius Sans One',sans-serif;
  font-size:36px; font-weight:400; line-height:1.2;
  letter-spacing:0; text-transform:uppercase;
}
@media(max-width:800px) {
  body.woocommerce-account main .friedify-account-heading {font-size:28px;margin-bottom:22px;}
}
/* v04: reclaim unnecessary space from the last orders column for totals. */
@media(min-width:801px) {
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.woocommerce-orders-table {
    width:100%; table-layout:auto;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.woocommerce-orders-table :is(th,td):last-child {
    width:1%; white-space:nowrap; text-align:right;
    padding-left:5px; padding-right:10px;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.woocommerce-orders-table :is(th,td):nth-last-child(2) {
    width:auto; min-width:140px;
  }
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
    margin:0; padding:9px 11px!important;
  }
}


/* v05: Match the 1080px shop-stage footprint at desktop sizes.
   The WP theme's inherited 980px content width must not cap this account view.
   No changes to the global site layout or approved header. */
@media (min-width: 801px) {
  body.woocommerce-account .wp-site-blocks > main .wp-block-post-content.entry-content {
    box-sizing: border-box;
    width: min(1080px, calc(100vw - 44px)) !important;
    max-width: 1080px !important;
    margin-inline: auto !important;
    padding-inline: 22px !important;
  }
  /* Align the account heading with the sidebar/content grid. */
  body.woocommerce-account main .friedify-account-heading {
    padding-inline: 0;
  }
  /* Only the heading changes alignment; action buttons remain right aligned. */
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content
  table.woocommerce-orders-table th.woocommerce-orders-table__header-order-actions {
    text-align: left !important;
  }
}

/* Account utility-bar alignment, measured against category page at 1920px:
   EN pill x=1386.5 on account, x=1436.5 on category. Shift entire bar +50px.
   Keep the approved account main top spacing unchanged. */
@media (min-width: 801px) {
  body.woocommerce-account .wp-site-blocks > main.wp-block-group {
    margin-top: 28px !important;
  }
  body.woocommerce-account .wp-site-blocks > main.wp-block-group > nav.friedify-shop-language.friedify-language-external {
    position: relative;
    left: 50px;
  }
}
