/* ===============================
   PROFILE WRAPPER
================================ */
.wcs-main-profile {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  font-family: Inter, system-ui, sans-serif;
}

/* ===============================
   FIELDSET RESET + SPACING
================================ */
.wcs-main-profile fieldset {
  border: 0;
  margin: 0 0 40px;
  padding: 0;
}

.wcs-main-profile fieldset:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 32px;
}

/* ===============================
   SECTION TITLES
================================ */
.wcs-main-profile legend {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 24px;
}

/* ===============================
   GRID LAYOUT
================================ */
.wcs-main-profile fieldset > p {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Name fields (3 columns) */
#edd_profile_personal_fieldset {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Email full width */
#edd_profile_primary_email_wrap {
  grid-column: 1 / -1;
}

/* Billing address grid */
#edd_profile_address_fieldset {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

#edd_profile_billing_address_line_1_wrap,
#edd_profile_billing_address_line_2_wrap {
  grid-column: span 2;
}

/* Password grid */
#edd_profile_password_fieldset {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ===============================
   LABELS
================================ */
.wcs-main-profile label {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

/* ===============================
   INPUTS & SELECTS
================================ */
.wcs-main-profile .edd-input,
.wcs-main-profile .edd-select {
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f3f6f9;
  font-size: 15px;
  color: #111827;
  outline: none;
  transition: border 0.2s ease, background 0.2s ease;
}

.wcs-main-profile .edd-input::placeholder {
  color: #9ca3af;
}

.wcs-main-profile .edd-input:focus,
.wcs-main-profile .edd-select:focus {
  background: #ffffff;
  border-color: #3b82f6;
}

/* Select arrow polish */
.wcs-main-profile select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
}

/* ===============================
   SUBMIT BUTTON
================================ */
#edd_profile_submit_fieldset {
  margin-top: 8px;
}

#edd_profile_editor_submit {
  background: #3b82f6;
  color: #ffffff;
  border: 0;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

#edd_profile_editor_submit:hover {
  background: #2563eb;
}

#edd_profile_editor_submit:active {
  transform: translateY(1px);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
  #edd_profile_personal_fieldset,
  #edd_profile_address_fieldset {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .wcs-main-profile {
    padding: 24px 20px;
  }

  #edd_profile_personal_fieldset,
  #edd_profile_address_fieldset,
  #edd_profile_password_fieldset {
    grid-template-columns: 1fr;
  }
}