/* =============================================
   DOKAN VENDOR REGISTRATION — Full Styled Card
   ============================================= */

/* 2. CARD CONTAINER */
form#dokan-vendor-register {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  padding: 32px 48px 36px !important;
  margin: 40px auto !important;
  position: relative !important;
  max-width: 660px !important;
  width: 100% !important;
}

/* 3. INJECTED "Signup" HEADING */
form#dokan-vendor-register::before {
  content: "Join the Network" !important;
  display: block !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  text-align: center !important;
  color: #111827 !important;
  letter-spacing: -0.8px !important;
  margin-bottom: 24px !important;
}

/* 4. NAME FIELDS SIDE BY SIDE */
.split-row.name-field.form-row-wide {
  display: flex !important;
  gap: 12px !important;
  width: 100% !important;
  margin-bottom: 4px !important;
}

.split-row.name-field.form-row-wide .form-row {
  flex: 1 !important;
  margin-bottom: 0 !important;
}

/* 5. HIDE USERNAME FIELD */
p.form-row:has(input#reg_username) {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* 6. FORM ROW SPACING */
form#dokan-vendor-register p.form-row {
  margin-bottom: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 7. LABELS — bolder, match login exactly */
form#dokan-vendor-register label {
  display: block !important;
  margin-bottom: 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  text-align: left !important;
  font-family: inherit !important;
  letter-spacing: 0 !important;
}


/* 8. RED ASTERISK on required fields */
form#dokan-vendor-register label .required,
form#dokan-vendor-register label abbr {
  color: #ef4444 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  border: none !important;
  margin-left: 2px !important;
}

/* 9. HIDE ASTERISK on optional fields (first name, last name, phone) */
p:has(input#first-name) label .required,
p:has(input#first-name) label abbr,
p:has(input#last-name) label .required,
p:has(input#last-name) label abbr,
p:has(input#shop-phone) label .required,
p:has(input#shop-phone) label abbr {
  display: none !important;
}

/* 10. INPUT FIELDS */
form#dokan-vendor-register input[type="text"],
form#dokan-vendor-register input[type="email"],
form#dokan-vendor-register input[type="password"],
form#dokan-vendor-register input[type="tel"],
form#dokan-vendor-register input[type="url"] {
  background-color: #f9fafb !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  min-height: 56px !important;
  width: 100% !important;
  font-size: 15px !important;
  color: #1a1a1a !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}

form#dokan-vendor-register input[type="text"]:focus,
form#dokan-vendor-register input[type="email"]:focus,
form#dokan-vendor-register input[type="password"]:focus {
  border-color: #58a3d1 !important;
  background-color: #ffffff !important;
}

form#dokan-vendor-register input::placeholder {
  color: #9ca3af !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

/* 11. HINT TEXT under Shop URL */
form#dokan-vendor-register small,
form#dokan-vendor-register .help-block {
  font-size: 12px !important;
  color: #9ca3af !important;
  margin-top: 4px !important;
  display: block !important;
  font-style: italic !important;
}

/* 12. SHOP URL alert message */
p:has(input#seller-url) strong#url-alart-mgs {
  font-size: 12px !important;
  font-weight: 400 !important;
  display: block !important;
  margin-bottom: 4px !important;
}

/* URL availability colors */
strong#url-alart-mgs.text-success {
  color: #16a34a !important; /* green */
}

strong#url-alart-mgs.text-danger,
strong#url-alart-mgs.text-warning {
  color: #ef4444 !important; /* red */
}

/* Default state (no class yet) */
strong#url-alart-mgs:not(.text-success):not(.text-danger) {
  color: #6b7280 !important; /* grey */
}


strong#url-alart-mgs.text-success,
strong#url-alart.text-success {
  color: #16a34a !important;
}

strong#url-alart-mgs.text-danger,
strong#url-alart-mgs.text-error,
strong#url-alart.text-danger,
strong#url-alart.text-error {
  color: #ef4444 !important;
}


/* 13. TERMS CHECKBOX ROW */
form#dokan-vendor-register p.form-row:has(input[type="checkbox"]) {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 4px 0 8px !important;
}

form#dokan-vendor-register input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  accent-color: #58a3d1 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

form#dokan-vendor-register p.form-row:has(input[type="checkbox"]) label {
  font-weight: 400 !important;
  font-size: 14px !important;
  color: #6b7280 !important;
  margin-bottom: 0 !important;
}

/* 14. REGISTER / SIGN UP BUTTON */
form#dokan-vendor-register input[type="submit"],
form#dokan-vendor-register button[type="submit"] {
  background: #58a3d1 !important;
  color: #ffffff !important;
  min-height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 17px !important;
  width: 100% !important;
  margin-top: 20px !important;
  border: none !important;
  cursor: pointer !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: background 0.2s ease !important;
  font-family: inherit !important;
}

form#dokan-vendor-register input[type="submit"]:hover,
form#dokan-vendor-register button[type="submit"]:hover {
  background: #4a93c4 !important;
}

/* 15. MOBILE */
@media (max-width: 767px) {
  form#dokan-vendor-register {
    padding: 40px 25px !important;
    border-radius: 20px !important;
  }

  form#dokan-vendor-register::before {
    font-size: 26px !important;
  }

  .split-row.name-field.form-row-wide {
    flex-direction: column !important;
    gap: 0 !important;
  }
}


/* =============================================
   DOKAN REGISTRATION — VALIDATION ERRORS
   ============================================= */

/* Error input highlight */
form#dokan-vendor-register input.dokan-form-input-error,
form#dokan-vendor-register input:invalid:not(:placeholder-shown) {
  border-color: #ef4444 !important;
  background-color: #fff5f5 !important;
}

/* Dokan error messages */
form#dokan-vendor-register .dokan-error,
form#dokan-vendor-register ul.dokan-error,
form#dokan-vendor-register ul.dokan-error li,
.dokan-vendor-registration-area .dokan-error {
  background-color: #fff5f5 !important;
  border: 1px solid #fca5a5 !important;
  border-radius: 12px !important;
  color: #ef4444 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
  list-style: none !important;
}

/* WooCommerce style errors that Dokan sometimes uses */
form#dokan-vendor-register .woocommerce-error,
form#dokan-vendor-register .woocommerce-error li {
  background-color: #fff5f5 !important;
  border: 1px solid #fca5a5 !important;
  border-radius: 12px !important;
  color: #ef4444 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
  list-style: none !important;
}

/* Field-level inline error */
form#dokan-vendor-register .dokan-field-error {
  color: #ef4444 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
  display: block !important;
}
