/* ============================================
   USER ACCOUNT STYLES - PRD Chapter 6
   ============================================ */

/* --- Login/Register (6.1) --- */
.yippeeyo-theme .woocommerce-account .u-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--yp-space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.yippeeyo-theme .woocommerce-account .u-columns h2 {
  font-size: var(--yp-font-size-xl);
  margin-bottom: var(--yp-space-lg);
  padding-bottom: var(--yp-space-sm);
  border-bottom: 2px solid var(--yp-primary);
  display: inline-block;
}

.yippeeyo-theme .woocommerce-account .woocommerce-form-login,
.yippeeyo-theme .woocommerce-account .woocommerce-form-register {
  background: var(--yp-bg-white);
  padding: var(--yp-space-xl);
  border-radius: var(--yp-radius-lg);
  box-shadow: var(--yp-shadow-md);
}

.yippeeyo-theme .woocommerce-account .woocommerce-form .form-row {
  margin-bottom: var(--yp-space-md);
}

.yippeeyo-theme .woocommerce-account .woocommerce-form label {
  font-weight: 500;
  font-size: var(--yp-font-size-sm);
  color: var(--yp-text-primary);
  margin-bottom: var(--yp-space-xs);
  display: block;
}

.yippeeyo-theme .woocommerce-account .woocommerce-form input[type="text"],
.yippeeyo-theme .woocommerce-account .woocommerce-form input[type="email"],
.yippeeyo-theme .woocommerce-account .woocommerce-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--yp-border);
  border-radius: var(--yp-radius-md);
  padding: 12px 16px;
  font-family: var(--yp-font-family);
  font-size: var(--yp-font-size-base);
  transition: border-color var(--yp-transition-fast);
}

.yippeeyo-theme .woocommerce-account .woocommerce-form input:focus {
  outline: none;
  border-color: var(--yp-primary);
  box-shadow: 0 0 0 3px rgba(74,86,153,0.12);
}

.yippeeyo-theme .woocommerce-account .woocommerce-form .woocommerce-button {
  background: var(--yp-primary);
  color: var(--yp-text-white);
  border: none;
  border-radius: var(--yp-radius-md);
  padding: 14px 28px;
  font-family: var(--yp-font-family);
  font-weight: 600;
  font-size: var(--yp-font-size-base);
  cursor: pointer;
  transition: all var(--yp-transition-fast);
  width: 100%;
}

.yippeeyo-theme .woocommerce-account .woocommerce-form .woocommerce-button:hover {
  background: var(--yp-primary-light);
  box-shadow: var(--yp-shadow-hover);
}

.yippeeyo-theme .woocommerce-account .woocommerce-form .lost_password {
  margin-top: var(--yp-space-md);
  text-align: right;
}

.yippeeyo-theme .woocommerce-account .woocommerce-form .lost_password a {
  font-size: var(--yp-font-size-sm);
  color: var(--yp-primary);
}

/* Remember me */
.yippeeyo-theme .woocommerce-form-login .woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: var(--yp-space-sm);
  font-size: var(--yp-font-size-sm);
  margin-bottom: var(--yp-space-md);
}

/* --- My Account Layout (6.2) --- */
.yippeeyo-theme .woocommerce-account .woocommerce-MyAccount-navigation {
  background: var(--yp-bg-white);
  border-radius: var(--yp-radius-lg);
  box-shadow: var(--yp-shadow-sm);
  padding: var(--yp-space-md);
  position: sticky;
  top: 90px;
}

.yippeeyo-theme .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.yippeeyo-theme .woocommerce-MyAccount-navigation ul li {
  margin-bottom: 2px;
}

.yippeeyo-theme .woocommerce-MyAccount-navigation ul li a {
  display: flex;
  align-items: center;
  gap: var(--yp-space-sm);
  padding: 12px 16px;
  border-radius: var(--yp-radius-md);
  color: var(--yp-text-secondary);
  font-weight: 500;
  font-size: var(--yp-font-size-base);
  transition: all var(--yp-transition-fast);
  text-decoration: none;
}

.yippeeyo-theme .woocommerce-MyAccount-navigation ul li a:hover {
  background: rgba(74,86,153,0.06);
  color: var(--yp-primary);
}

.yippeeyo-theme .woocommerce-MyAccount-navigation ul li.is-active a,
.yippeeyo-theme .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dashboard.is-active a {
  background: rgba(74,86,153,0.1);
  color: var(--yp-primary);
  font-weight: 600;
}

/* Nav icons via ::before */
.yippeeyo-theme .woocommerce-MyAccount-navigation ul li a::before {
  content: '';
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
}

.yippeeyo-theme .woocommerce-MyAccount-navigation ul li.is-active a::before {
  opacity: 1;
}

/* Account content area */
.yippeeyo-theme .woocommerce-account .woocommerce-MyAccount-content {
  background: var(--yp-bg-white);
  border-radius: var(--yp-radius-lg);
  box-shadow: var(--yp-shadow-sm);
  padding: var(--yp-space-xl);
  min-height: 400px;
}

/* Account page grid */
.yippeeyo-theme .woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--yp-space-xl);
  align-items: start;
}

/* --- User Avatar (6.2) --- */
.yp-account-header {
  text-align: center;
  padding: var(--yp-space-lg) var(--yp-space-md);
  margin-bottom: var(--yp-space-md);
  border-bottom: 1px solid var(--yp-border-light);
}

.yp-account-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: var(--yp-space-md);
}

.yp-account-avatar img {
  width: 80px;
  height: 80px;
  border-radius: var(--yp-radius-full);
  object-fit: cover;
  border: 3px solid var(--yp-primary);
}

.yp-account-avatar__placeholder {
  width: 80px;
  height: 80px;
  border-radius: var(--yp-radius-full);
  background: var(--yp-primary);
  color: var(--yp-text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border: 3px solid var(--yp-primary-light);
}

.yp-account-avatar__upload {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--yp-radius-full);
  background: var(--yp-primary);
  color: var(--yp-text-white);
  border: 2px solid var(--yp-bg-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--yp-transition-fast);
}

.yp-account-avatar__upload:hover {
  background: var(--yp-primary-light);
}

.yp-account-name {
  font-size: var(--yp-font-size-md);
  font-weight: 600;
  color: var(--yp-text-primary);
  margin-bottom: 2px;
}

.yp-account-email {
  font-size: var(--yp-font-size-sm);
  color: var(--yp-text-muted);
}

.yp-account-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--yp-space-sm);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: var(--yp-font-size-xs);
  font-weight: 700;
}

.yp-badge-svip {
  background: linear-gradient(135deg, #F5A623 0%, #D4941E 100%);
  color: var(--yp-text-white);
}

/* --- Edit Account (6.3) --- */
.yippeeyo-theme .woocommerce-EditAccountForm {
  max-width: 600px;
}

.yippeeyo-theme .woocommerce-EditAccountForm fieldset {
  border: 1px solid var(--yp-border-light);
  border-radius: var(--yp-radius-lg);
  padding: var(--yp-space-lg);
  margin-bottom: var(--yp-space-lg);
}

.yippeeyo-theme .woocommerce-EditAccountForm fieldset legend {
  font-weight: 600;
  font-size: var(--yp-font-size-md);
  color: var(--yp-text-primary);
  padding: 0 var(--yp-space-sm);
}

.yippeeyo-theme .woocommerce-EditAccountForm .form-row input {
  width: 100%;
  border: 1px solid var(--yp-border);
  border-radius: var(--yp-radius-md);
  padding: 12px 16px;
  font-family: var(--yp-font-family);
}

.yippeeyo-theme .woocommerce-EditAccountForm .form-row input:focus {
  border-color: var(--yp-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74,86,153,0.12);
}

/* Social links (6.3) */
.yp-social-links {
  display: flex;
  gap: var(--yp-space-md);
  margin-top: var(--yp-space-lg);
  padding-top: var(--yp-space-lg);
  border-top: 1px solid var(--yp-border-light);
}

.yp-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--yp-radius-full);
  background: var(--yp-bg-light);
  color: var(--yp-text-secondary);
  transition: all var(--yp-transition-fast);
}

.yp-social-link:hover {
  transform: scale(1.1);
}

.yp-social-link.connected {
  background: var(--yp-primary);
  color: var(--yp-text-white);
}

/* --- Address Management (6.4) --- */
.yippeeyo-theme .woocommerce-Addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--yp-space-lg);
}

.yippeeyo-theme .woocommerce-Address {
  background: var(--yp-bg-lighter);
  border-radius: var(--yp-radius-lg);
  padding: var(--yp-space-lg);
  position: relative;
}

.yippeeyo-theme .woocommerce-Address header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--yp-space-md);
  padding-bottom: var(--yp-space-sm);
  border-bottom: 1px solid var(--yp-border-light);
}

.yippeeyo-theme .woocommerce-Address h3 {
  font-size: var(--yp-font-size-md);
  margin: 0;
}

.yippeeyo-theme .woocommerce-Address .edit {
  font-size: var(--yp-font-size-sm);
  color: var(--yp-primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yippeeyo-theme .woocommerce-Address address {
  font-style: normal;
  font-size: var(--yp-font-size-sm);
  color: var(--yp-text-secondary);
  line-height: 1.8;
}

/* Empty address */
.yp-address-empty {
  text-align: center;
  padding: var(--yp-space-xl);
  color: var(--yp-text-muted);
}

.yp-address-empty svg {
  margin-bottom: var(--yp-space-md);
}

/* --- Coupon Management (6.5) --- */
.yp-coupons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--yp-space-md);
}

.yp-coupon-card {
  position: relative;
  background: var(--yp-bg-white);
  border: 1px solid var(--yp-border-light);
  border-radius: var(--yp-radius-lg);
  padding: var(--yp-space-lg);
  overflow: hidden;
  transition: all var(--yp-transition-fast);
}

.yp-coupon-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--yp-primary);
}

.yp-coupon-card.expired {
  opacity: 0.55;
}

.yp-coupon-card.expired::before {
  background: var(--yp-disabled);
}

.yp-coupon-card__amount {
  font-size: var(--yp-font-size-xl);
  font-weight: 800;
  color: var(--yp-primary);
  margin-bottom: var(--yp-space-xs);
}

.yp-coupon-card.expired .yp-coupon-card__amount {
  color: var(--yp-text-muted);
}

.yp-coupon-card__desc {
  font-size: var(--yp-font-size-sm);
  color: var(--yp-text-secondary);
  margin-bottom: var(--yp-space-sm);
}

.yp-coupon-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--yp-font-size-xs);
  color: var(--yp-text-muted);
}

.yp-coupon-card__code {
  font-family: monospace;
  background: var(--yp-bg-light);
  padding: 2px 8px;
  border-radius: var(--yp-radius-sm);
  font-weight: 600;
  letter-spacing: 1px;
}

.yp-coupon-card__status {
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.yp-coupon-card__status.available {
  background: rgba(76,175,80,0.1);
  color: var(--yp-success);
}

.yp-coupon-card__status.used {
  background: rgba(153,153,153,0.1);
  color: var(--yp-text-muted);
}

.yp-coupon-card__status.expired {
  background: rgba(244,67,54,0.1);
  color: var(--yp-error);
}

/* Coupon redeem */
.yp-coupon-redeem {
  display: flex;
  gap: var(--yp-space-sm);
  margin-bottom: var(--yp-space-xl);
  max-width: 400px;
}

.yp-coupon-redeem .yp-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Coupon empty */
.yp-coupon-empty {
  text-align: center;
  padding: var(--yp-space-3xl) var(--yp-space-lg);
  color: var(--yp-text-muted);
}

/* --- Payment Methods (6.6) --- */
.yp-payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: var(--yp-space-md);
}

.yp-payment-card {
  display: flex;
  align-items: center;
  gap: var(--yp-space-lg);
  padding: var(--yp-space-lg);
  background: var(--yp-bg-lighter);
  border-radius: var(--yp-radius-lg);
  border: 1px solid var(--yp-border-light);
  transition: border-color var(--yp-transition-fast);
}

.yp-payment-card.default {
  border-color: var(--yp-primary);
}

.yp-payment-card__icon {
  width: 48px;
  height: 32px;
  object-fit: contain;
}

.yp-payment-card__info {
  flex: 1;
}

.yp-payment-card__number {
  font-weight: 600;
  font-size: var(--yp-font-size-base);
  color: var(--yp-text-primary);
  font-family: monospace;
}

.yp-payment-card__expiry {
  font-size: var(--yp-font-size-xs);
  color: var(--yp-text-muted);
}

.yp-payment-card__actions {
  display: flex;
  gap: var(--yp-space-sm);
}

.yp-payment-card__actions button {
  background: none;
  border: 1px solid var(--yp-border);
  border-radius: var(--yp-radius-md);
  padding: 6px 12px;
  font-size: var(--yp-font-size-xs);
  cursor: pointer;
  transition: all var(--yp-transition-fast);
  color: var(--yp-text-secondary);
}

.yp-payment-card__actions button:hover {
  border-color: var(--yp-primary);
  color: var(--yp-primary);
}

.yp-payment-card__actions .yp-btn-delete:hover {
  border-color: var(--yp-error);
  color: var(--yp-error);
}

.yp-payment-default-badge {
  font-size: var(--yp-font-size-xs);
  font-weight: 600;
  color: var(--yp-primary);
  background: rgba(74,86,153,0.08);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Payment empty */
.yp-payment-empty {
  text-align: center;
  padding: var(--yp-space-3xl) var(--yp-space-lg);
  color: var(--yp-text-muted);
}

/* --- Security Settings (6.7) --- */
.yp-security-section {
  margin-bottom: var(--yp-space-xl);
  padding-bottom: var(--yp-space-xl);
  border-bottom: 1px solid var(--yp-border-light);
}

.yp-security-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.yp-security-section h4 {
  font-size: var(--yp-font-size-md);
  margin-bottom: var(--yp-space-md);
}

.yp-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--yp-space-md) 0;
}

.yp-security-row__label {
  font-weight: 500;
  color: var(--yp-text-primary);
}

.yp-security-row__value {
  font-size: var(--yp-font-size-sm);
  color: var(--yp-text-secondary);
}

/* Password strength indicator */
.yp-password-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--yp-border);
  margin-top: var(--yp-space-xs);
  overflow: hidden;
}

.yp-password-strength__bar {
  height: 100%;
  border-radius: 2px;
  transition: width var(--yp-transition-fast), background var(--yp-transition-fast);
}

.yp-password-strength__bar.weak { width: 25%; background: var(--yp-error); }
.yp-password-strength__bar.fair { width: 50%; background: var(--yp-warning); }
.yp-password-strength__bar.good { width: 75%; background: #8BC34A; }
.yp-password-strength__bar.strong { width: 100%; background: var(--yp-success); }

/* --- WooCommerce Orders in Account --- */
.yippeeyo-theme .woocommerce-orders-table {
  border: none;
  border-radius: var(--yp-radius-lg);
  overflow: hidden;
  box-shadow: var(--yp-shadow-sm);
}

.yippeeyo-theme .woocommerce-orders-table thead {
  background: var(--yp-bg-light);
}

.yippeeyo-theme .woocommerce-orders-table th {
  font-weight: 600;
  font-size: var(--yp-font-size-sm);
  color: var(--yp-text-secondary);
  text-transform: uppercase;
  padding: 12px 16px;
  border: none;
}

.yippeeyo-theme .woocommerce-orders-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--yp-border-light);
  font-size: var(--yp-font-size-sm);
}

.yippeeyo-theme .woocommerce-orders-table .button {
  background: var(--yp-primary);
  color: var(--yp-text-white);
  border: none;
  border-radius: var(--yp-radius-md);
  padding: 8px 16px;
  font-size: var(--yp-font-size-xs);
  font-weight: 600;
  transition: background var(--yp-transition-fast);
}

.yippeeyo-theme .woocommerce-orders-table .button:hover {
  background: var(--yp-primary-light);
}

/* --- Responsive --- */
@media (max-width: 1023px) {
  .yippeeyo-theme .woocommerce-account .woocommerce {
    grid-template-columns: 1fr;
  }

  .yippeeyo-theme .woocommerce-account .woocommerce-MyAccount-navigation {
    position: static;
  }

  .yippeeyo-theme .woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .yippeeyo-theme .woocommerce-MyAccount-navigation ul li a {
    padding: 8px 14px;
    font-size: var(--yp-font-size-sm);
  }
}

@media (max-width: 767px) {
  .yippeeyo-theme .woocommerce-account .u-columns {
    grid-template-columns: 1fr;
  }

  .yippeeyo-theme .woocommerce-Addresses {
    grid-template-columns: 1fr;
  }

  .yp-coupons-grid {
    grid-template-columns: 1fr;
  }

  .yp-coupon-redeem {
    max-width: 100%;
  }

  .yp-payment-card {
    flex-wrap: wrap;
  }
}
