.account-details-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  flex-direction: row;
  align-items: center;
  padding: 0px;
  gap: 43px;
  width: 100%;
}

/* صفحة تعديل الحساب — توسيط النموذج */
.account-details-container.account-details-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.account-details-container.account-details-form .form-section {
  max-width: 560px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.form-section {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0px;
  gap: 24px;
  min-height: 119px;
  height: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  padding: 0px;
  gap: 16px;
  flex: 1;
  min-height: 119px;
  height: auto;
}

.form-group input {
  box-sizing: border-box;
  width: 100%;
  height: 58px;
  border: 1px solid #302d2d;
  border-radius: 16px;
  padding: 0 1rem;
  background: transparent;
}

.settings-section {
  display: flex;
  flex-direction: column;
  align-items: space-around;
  padding: 0px;
  gap: 73px;
  flex: none;
  flex-grow: 0;
}

.toggle-section {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0px;
  gap: 92px;
  width: 485px;
  height: 102px;
}

.toggle-container {
  display: flex;
  flex-direction: column;
  padding: 0px;
  width: 311px;
  height: 102px;
}

.toggle-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0px;
  gap: 9px;
  width: 188px;
  height: 42px;
}

.toggle-title {
  width: 137px;
  height: 37px;
  font-size: 20px;
  color: #000000;
}

.toggle-description {
  width: 311px;
  height: 60px;
  font-size: 16px;
  color: #000000;
  margin: 0;
}

.toggle-switch {
  margin: 0 auto;
  width: 56px;
  height: 26px;
  flex: none;
  order: 0;
  flex-grow: 0;
}

.toggle-input {
  display: none;
}

.toggle-label {
  display: block;
  width: 56px;
  height: 26px;
  background: #d4d0d0;
  border-radius: 34px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-label::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  right: 2px;
  top: 1px;
  background: #ffffff;
  border-radius: 21px;
  transition: all 0.3s ease;
}

.toggle-input:checked + .toggle-label {
  background: var(--y-secondary);
}

.toggle-input:checked + .toggle-label::after {
  right: calc(100% - 26px);
}

.action-section {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px;
  gap: 37px;
  width: 485px;
  height: 102px;
}

.disable-account-btn {
  padding: 8px;
  width: 137px;
  border: 1px solid #ff2e2e;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  color: #e32828;
}

.delete-section {
  display: flex;
  flex-direction: column;
  padding: 0px;
  width: 311px;
  height: 102px;
}

.delete-header {
  display: flex;
  flex-direction: row;
  padding: 0px;
  gap: 6px;
  width: 153px;
  height: 42px;
}

.delete-title {
  width: 105px;
  font-size: 20px;
  line-height: 37px;
  text-align: right;
  color: #000000;
}

.delete-description {
  width: 311px;
  height: 60px;
  font-size: 16px;
  line-height: 30px;
  color: #000000;
  margin: 0;
}

.icon-notification i{
  font-size: 24px;
  align-self: center;
}

.icon-profile i{
  font-size: 24px;
  align-self: center;
}

/* WooCommerce edit account form overrides */
.account-details-form fieldset {
  border: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.account-details-form fieldset legend {
  font-size: 1.2rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 1rem;
  display: block;
}
/* زر حفظ التغييرات */
.account-details-form .btn-auth {
  background: var(--y-secondary);
  color: white;
  padding: 0.875rem 3rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.account-details-form .btn-auth:hover {
  background: var(--y-primary);
  color: var(--y-secondary);
}

@media (max-width: 820px) {
  .account-details-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px 30px;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
  }

  .form-section {
    width: 100%;
    height: auto;
    box-sizing: border-box;
  }

  .form-row {
    width: 100%;
    gap: 1.5rem;
    flex-wrap: wrap;
    height: auto;
    box-sizing: border-box;
  }

  .form-group {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 0;
    height: auto;
    box-sizing: border-box;
  }

  .form-group label {
    font-size: 14px;
    margin-top: 0.5rem;
    font-weight: 500;
  }

  .form-group input {
    height: 48px;
    font-size: 14px;
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  .settings-section {
    width: 100%;
    height: auto;
    gap: 40px;
    box-sizing: border-box;
  }

  .toggle-section {
    width: 100%;
    gap: 20px;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    box-sizing: border-box;
  }

  .toggle-container {
    width: 100%;
    height: auto;
    box-sizing: border-box;
  }

  .toggle-header {
    width: auto;
    height: auto;
    gap: 8px;
  }

  .toggle-title {
    width: auto;
    height: auto;
    font-size: 16px;
    line-height: 1.4;
  }

  .toggle-description {
    width: 100%;
    height: auto;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 0.5rem;
  }

  .toggle-switch {
    align-self: flex-start;
    margin: 0;
  }

  .action-section {
    width: 100%;
    gap: 20px;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    box-sizing: border-box;
  }

  .delete-section {
    width: 100%;
    height: auto;
    box-sizing: border-box;
  }

  .delete-header {
    width: auto;
    height: auto;
    gap: 6px;
  }

  .delete-title {
    width: auto;
    font-size: 16px;
    line-height: 1.4;
  }

  .delete-description {
    width: 100%;
    height: auto;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 0.5rem;
  }

  .disable-account-btn {
    width: 100%;
    max-width: 200px;
    font-size: 14px;
    padding: 10px 16px;
    box-sizing: border-box;
  }

  .icon-notification i,
  .icon-profile i {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .account-details-container {
    padding: 15px 20px;
    gap: 25px;
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .form-group {
    flex: 1 1 100%;
    width: 100%;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input {
    height: 44px;
    font-size: 14px;
    padding: 0 10px;
  }

  .settings-section {
    gap: 30px;
  }

  .toggle-title,
  .delete-title {
    font-size: 15px;
  }

  .toggle-description,
  .delete-description {
    font-size: 12px;
  }

  .disable-account-btn {
    width: 100%;
    max-width: none;
    font-size: 13px;
    padding: 9px 14px;
  }

  .icon-notification i,
  .icon-profile i {
    font-size: 18px;
  }
}
