/* ========================================
   ArTechBD Registration Form - Hide Fields
   Updated to include Last Name field
   ======================================== */

/* ========================================
   1. HIDE LAST NAME FIELD
   ======================================== */

/* Hide the last name form group */
.artechbd-register-body .form-group.account-lastname,
.artechbd-register-body .form-group.required.account-lastname,
#registerformpts .form-group.account-lastname,
#account-register .form-group.account-lastname {
  display: none !important;
}

/* Hide by label */
.form-group:has(label[for="input-lastname"]) {
  display: none !important;
}

/* Hide by field ID */
input#input-lastname {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* ========================================
   2. HIDE CONFIRM PASSWORD FIELD
   ======================================== */

/* Hide the entire confirm password form group */
.artechbd-register-body .form-group.account-pass2,
.artechbd-register-body .form-group.required.account-pass2,
#registerformpts .form-group.account-pass2 {
  display: none !important;
}

/* Hide by label text (Bengali) */
.form-group:has(label[for="input-confirm"]) {
  display: none !important;
}

/* ========================================
   3. HIDE NEWSLETTER SECTION
   ======================================== */

/* Hide newsletter fieldset */
.artechbd-register-body fieldset:has(legend:contains("নিউজলেটার")),
.artechbd-register-body fieldset:has(input[name="newsletter"]),
#registerformpts fieldset:nth-of-type(2) {
  display: none !important;
}

/* Target by legend text */
fieldset legend:contains("নিউজলেটার") {
  display: none !important;
}

fieldset:has(legend:contains("নিউজলেটার")) {
  display: none !important;
}

/* Fallback - hide by position (newsletter is 2nd fieldset) */
.artechbd-register-body form fieldset:nth-of-type(2) {
  display: none !important;
}

/* ========================================
   4. HIDE PRIVACY POLICY CHECKBOX
   ======================================== */

/* Hide the privacy policy checkbox and text */
.artechbd-register-body .buttons .pull-right > *:not(button) {
  display: none !important;
}

/* Keep only the button visible */
.artechbd-register-body .buttons .pull-right {
  display: flex !important;
  justify-content: flex-end !important;
}

.artechbd-register-body .buttons .pull-right button {
  display: inline-block !important;
}

/* Hide agree checkbox specifically */
.artechbd-register-body input[name="agree"],
.artechbd-register-body .buttons .agree,
.artechbd-register-body .buttons .pull-right a {
  display: none !important;
}

/* Hide the privacy policy text before checkbox */
.artechbd-register-body .buttons .pull-right {
  font-size: 0 !important; /* Hide text */
}

.artechbd-register-body .buttons .pull-right * {
  font-size: 14px !important; /* Restore font size for button */
}

/* ========================================
   5. IMPROVE LAYOUT AFTER HIDING
   ======================================== */

/* Remove extra spacing */
.artechbd-register-body fieldset {
  margin-bottom: 20px;
}

/* Make submit button full width */
.artechbd-register-body .buttons {
  margin-top: 20px;
}

.artechbd-register-body .buttons .pull-right {
  width: 100%;
  float: none !important;
}

.artechbd-register-body .artechbd-register-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.artechbd-register-body .artechbd-register-btn:hover {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

/* ========================================
   6. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .artechbd-register-body .form-group.account-lastname,
  .artechbd-register-body .form-group.account-pass2,
  .artechbd-register-body fieldset:nth-of-type(2),
  .artechbd-register-body input[name="agree"] {
    display: none !important;
  }
  
  .artechbd-register-body .artechbd-register-btn {
    padding: 12px 18px;
    font-size: 15px;
  }
}

/* ========================================
   7. ENSURE FIELDS ARE STILL ACCESSIBLE
   (For screen readers and form validation)
   ======================================== */

/* Keep fields in DOM but invisible */
.artechbd-register-body .form-group.account-lastname input,
.artechbd-register-body .form-group.account-pass2 input,
.artechbd-register-body input[name="newsletter"],
.artechbd-register-body input[name="agree"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ========================================
   8. PRINT STYLES
   ======================================== */

@media print {
  .artechbd-register-body .form-group.account-lastname,
  .artechbd-register-body .form-group.account-pass2,
  .artechbd-register-body fieldset:nth-of-type(2),
  .artechbd-register-body input[name="agree"] {
    display: none !important;
  }
}

/* ========================================
   9. ACCESSIBILITY
   ======================================== */

/* Ensure remaining form elements are accessible */
.artechbd-register-body .form-control:focus {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
}

.artechbd-register-body .artechbd-register-btn:focus {
  outline: 2px solid #1976D2;
  outline-offset: 2px;
}

/* ========================================
   10. LOADING STATE
   ======================================== */

.artechbd-register-body .artechbd-register-btn[disabled],
.artechbd-register-body .artechbd-register-btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
