/**
 * ÉTHÉRÉ — My Account page brand styling.
 * Uses :root variables from ethere-shop-brand.css
 */

/* ==========================================================================
   Page wrapper
   ========================================================================== */

body.woocommerce-account {
  color: var(--ethere-text);
  font-family: var(--ethere-font-body);
}

/* Page title */
body.woocommerce-account h1.entry-title,
body.woocommerce-account .entry-header h1 {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ethere-text);
  border-bottom: 2px solid var(--ethere-green);
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
}

/* ==========================================================================
   LOGGED-OUT: Login / Register forms
   ========================================================================== */

body.woocommerce-account .u-columns.col2-set {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

body.woocommerce-account .u-columns .u-column1,
body.woocommerce-account .u-columns .u-column2 {
  flex: 1;
  background: var(--ethere-white);
  border: 1px solid var(--ethere-border);
  border-radius: 12px;
  padding: 2rem 2rem 2.25rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

/* When registration is disabled, center the single login form */
body.woocommerce-account .woocommerce > .woocommerce-form-login {
  max-width: 480px;
  margin: 0 auto;
  background: var(--ethere-white);
  border: 1px solid var(--ethere-border);
  border-radius: 12px;
  padding: 2.5rem 2.5rem 2.75rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

/* Form headings */
body.woocommerce-account .u-columns h2,
body.woocommerce-account .woocommerce > .woocommerce-form-login + h2,
body.woocommerce-account .woocommerce-form-login ~ h2,
body.woocommerce-account .woocommerce > h2 {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--ethere-text);
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ethere-green);
}

/* Labels */
body.woocommerce-account .woocommerce-form label {
  font-family: var(--ethere-font-body);
  font-size: 0.85rem;
  color: var(--ethere-text);
  font-weight: 500;
}

body.woocommerce-account .woocommerce-form label .required {
  color: var(--ethere-green-dark);
}

/* Inputs */
body.woocommerce-account .woocommerce-form .input-text,
body.woocommerce-account .woocommerce-form input[type="text"],
body.woocommerce-account .woocommerce-form input[type="email"],
body.woocommerce-account .woocommerce-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--ethere-border);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-family: var(--ethere-font-body);
  font-size: 0.92rem;
  color: var(--ethere-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.woocommerce-account .woocommerce-form .input-text:focus,
body.woocommerce-account .woocommerce-form input:focus {
  border-color: var(--ethere-green);
  outline: none;
  box-shadow: 0 0 0 3px var(--ethere-green-soft);
}

/* Remember me */
body.woocommerce-account .woocommerce-form-login__rememberme {
  font-size: 0.85rem;
  color: var(--ethere-text-muted);
}

/* Submit buttons */
body.woocommerce-account .woocommerce-form button[type="submit"],
body.woocommerce-account .woocommerce-form .button {
  display: inline-block;
  background: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
  border: 1px solid var(--ethere-green) !important;
  border-radius: 0 !important;
  font-family: var(--ethere-font-body) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 0.85rem 2rem !important;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  width: 100%;
  text-align: center;
}

body.woocommerce-account .woocommerce-form button[type="submit"]:hover,
body.woocommerce-account .woocommerce-form .button:hover {
  background: var(--ethere-green-dark) !important;
  border-color: var(--ethere-green-dark) !important;
}

/* Lost password link */
body.woocommerce-account .lost_password a {
  font-family: var(--ethere-font-body);
  font-size: 0.85rem;
  color: var(--ethere-green-dark);
  text-decoration: none;
}

body.woocommerce-account .lost_password a:hover {
  color: var(--ethere-text);
}

/* Registration note */
body.woocommerce-account .woocommerce-form-register p:not(.form-row) {
  font-size: 0.88rem;
  color: var(--ethere-text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  body.woocommerce-account .u-columns.col2-set {
    flex-direction: column;
  }
  body.woocommerce-account .u-columns .u-column1,
  body.woocommerce-account .u-columns .u-column2 {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   LOGGED-IN: Navigation sidebar
   ========================================================================== */

body.woocommerce-account .woocommerce-MyAccount-navigation {
  background: var(--ethere-white);
  border: 1px solid var(--ethere-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
  margin: 0;
  border-bottom: 1px solid var(--ethere-border);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
  border-bottom: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  font-family: var(--ethere-font-body);
  font-size: 0.88rem;
  color: var(--ethere-text-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-left-color 0.2s;
  border-left: 3px solid transparent;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  background: var(--ethere-green-soft);
  color: var(--ethere-text);
  border-left-color: var(--ethere-green);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a:hover {
  background: var(--ethere-green-soft);
  color: var(--ethere-green-dark);
  border-left-color: var(--ethere-green);
  font-weight: 600;
}

/* Nav icons (inserted via PHP) */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a .ethere-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   LOGGED-IN: Content area
   ========================================================================== */

body.woocommerce-account .woocommerce-MyAccount-content {
  font-family: var(--ethere-font-body);
  color: var(--ethere-text);
  line-height: 1.7;
}

body.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
  font-size: 0.95rem;
  color: var(--ethere-text-muted);
}

body.woocommerce-account .woocommerce-MyAccount-content a {
  color: var(--ethere-green-dark);
  text-decoration: none;
}

body.woocommerce-account .woocommerce-MyAccount-content a:hover {
  color: var(--ethere-text);
}

/* Section headings inside content */
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--ethere-text);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Orders table
   ========================================================================== */

body.woocommerce-account .woocommerce-orders-table {
  border: 1px solid var(--ethere-border) !important;
  border-radius: 10px;
  overflow: hidden;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.woocommerce-account .woocommerce-orders-table thead th {
  font-family: var(--ethere-font-body);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ethere-text-muted);
  background: var(--ethere-green-soft);
  border-bottom: 1px solid var(--ethere-border) !important;
  padding: 0.85rem 1rem;
}

body.woocommerce-account .woocommerce-orders-table td {
  border-top: 1px solid var(--ethere-border) !important;
  padding: 0.85rem 1rem;
  font-family: var(--ethere-font-body);
  font-size: 0.9rem;
  vertical-align: middle;
}

body.woocommerce-account .woocommerce-orders-table .woocommerce-button.button {
  font-size: 0.7rem !important;
  padding: 0.5rem 1rem !important;
  background: transparent !important;
  color: var(--ethere-text) !important;
  border: 1px solid var(--ethere-text) !important;
}

body.woocommerce-account .woocommerce-orders-table .woocommerce-button.button:hover {
  background: var(--ethere-green) !important;
  border-color: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
}

/* No orders message */
body.woocommerce-account .woocommerce-message--info,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
  border-top-color: var(--ethere-green) !important;
  font-family: var(--ethere-font-body);
}

/* ==========================================================================
   Addresses
   ========================================================================== */

body.woocommerce-account .woocommerce-Addresses {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

body.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
  flex: 1;
  min-width: 280px;
  background: var(--ethere-white);
  border: 1px solid var(--ethere-border);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

body.woocommerce-account .woocommerce-Addresses .woocommerce-Address header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ethere-green);
}

body.woocommerce-account .woocommerce-Addresses .woocommerce-Address h3 {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin: 0 !important;
}

body.woocommerce-account .woocommerce-Addresses .woocommerce-Address .edit {
  font-family: var(--ethere-font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ethere-green-dark);
  text-decoration: none;
}

body.woocommerce-account .woocommerce-Addresses .woocommerce-Address .edit:hover {
  color: var(--ethere-text);
}

body.woocommerce-account .woocommerce-Addresses .woocommerce-Address address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ethere-text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Edit account / Edit address forms
   ========================================================================== */

body.woocommerce-account .woocommerce-EditAccountForm label,
body.woocommerce-account .woocommerce-address-fields label {
  font-family: var(--ethere-font-body);
  font-size: 0.85rem;
  color: var(--ethere-text);
  font-weight: 500;
}

body.woocommerce-account .woocommerce-EditAccountForm .input-text,
body.woocommerce-account .woocommerce-address-fields .input-text,
body.woocommerce-account .woocommerce-EditAccountForm select,
body.woocommerce-account .woocommerce-address-fields select {
  border: 1px solid var(--ethere-border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-family: var(--ethere-font-body);
  font-size: 0.92rem;
  color: var(--ethere-text);
}

body.woocommerce-account .woocommerce-EditAccountForm .input-text:focus,
body.woocommerce-account .woocommerce-address-fields .input-text:focus {
  border-color: var(--ethere-green);
  outline: none;
  box-shadow: 0 0 0 3px var(--ethere-green-soft);
}

body.woocommerce-account .woocommerce-EditAccountForm .button,
body.woocommerce-account .woocommerce-address-fields .button {
  background: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
  border: 1px solid var(--ethere-green) !important;
  border-radius: 0 !important;
  font-family: var(--ethere-font-body) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 0.85rem 2rem !important;
}

body.woocommerce-account .woocommerce-EditAccountForm .button:hover,
body.woocommerce-account .woocommerce-address-fields .button:hover {
  background: var(--ethere-green-dark) !important;
  border-color: var(--ethere-green-dark) !important;
}

/* Fieldset legend (Change password) */
body.woocommerce-account fieldset legend {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--ethere-text);
  border-bottom: 2px solid var(--ethere-green);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  width: 100%;
}

/* ==========================================================================
   Notices
   ========================================================================== */

body.woocommerce-account .woocommerce-message {
  border-top-color: var(--ethere-green);
  font-family: var(--ethere-font-body);
}

body.woocommerce-account .woocommerce-error {
  font-family: var(--ethere-font-body);
}

body.woocommerce-account .woocommerce-message .button {
  background: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
  border: 1px solid var(--ethere-green) !important;
  border-radius: 0 !important;
  font-family: var(--ethere-font-body) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  body.woocommerce-account .woocommerce-MyAccount-navigation {
    border-radius: 10px;
    margin-bottom: 1.5rem;
  }

  body.woocommerce-account .woocommerce-Addresses {
    flex-direction: column;
  }

  body.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
    min-width: 100%;
  }
}
