/* css/signup.css - Membership form styles (fully mobile-optimized) */

/* Add space between hero and form */
.signup-form-container {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .signup-form-container {
    margin-top: 1rem;
  }
}

.form-section {
  background: var(--off);
  padding: 2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--red);
}

.form-section h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.form-section .section-desc {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-field {
  margin-bottom: 1.2rem;
  overflow-x: hidden;
  width: 100%;
}

.form-field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.form-field label .required {
  color: var(--red);
  margin-left: 0.2rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #ccc;
  background: #fff;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px; /* ensures good tap target */
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--red);
}

/* Skills checkbox grid - responsive for mobile */
.skills-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
  background: #fff;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.skill-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.3rem 0;
}

.skill-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--red);
  flex-shrink: 0;
}

.skill-checkbox-item label {
  cursor: pointer;
  margin: 0;
  font-family: var(--serif);
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
}

/* Social media entries */
.social-entry {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.social-entry select {
  width: 140px;
  flex-shrink: 0;
}

.social-entry input {
  flex: 1;
}

/* Remove button styling (if used) */
.btn-remove-social {
  background: var(--red);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}
.btn-remove-social:hover {
  background: var(--red-dk);
  transform: scale(1.02);
}
.btn-remove-social:active {
  transform: scale(0.98);
}

.btn-add {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add:hover {
  background: var(--red);
}

/* Form status messages */
.form-status {
  margin-top: 1rem;
  padding: 1rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.form-status.success {
  background: var(--green);
  color: #fff;
}

.form-status.error {
  background: var(--red);
  color: #fff;
}

/* Success message styling */
#successMessage {
  display: none;
  margin-top: 2rem;
}

/* Status div */
#formStatus {
  margin-top: 2rem;
}

#formStatus.success {
  background: transparent !important;
}

/* ==================================================
   MOBILE OPTIMIZATIONS (max-width: 768px)
   ================================================== */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  /* Force skills grid to single column with no overflow */
  .skills-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 0.8rem;
  }
  .skill-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0;
  }
  .skill-checkbox-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
  }
  .skill-checkbox-item label {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }
  .social-entry {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
  }
  .social-entry select,
  .social-entry input {
    width: 100%;
  }
  /* Improve tap targets for add button */
  .btn-add {
    padding: 0.7rem 1rem;
    min-height: 44px;
    font-size: 0.75rem;
  }
  /* Larger labels for readability */
  .form-field label {
    font-size: 0.75rem;
  }
  .form-section .section-desc {
    font-size: 0.9rem;
  }
  /* Ensure inputs have minimum tap height */
  .form-field input,
  .form-field select,
  .form-field textarea {
    min-height: 44px;
    font-size: 16px; /* prevents zoom on iOS */
  }
  /* Adjust heading sizes */
  .form-section h3 {
    font-size: 1.2rem;
  }
  /* Success message adjustments */
  #successMessage {
    margin: 1rem;
    padding: 2rem 1rem;
  }
  #successMessage h2 {
    font-size: 1.4rem;
  }
  #successMessage p {
    font-size: 1rem;
  }
  #successMessage .btn-home {
    min-height: 44px;
    padding: 0.7rem 1.5rem;
  }
}

/* Touch feedback for interactive elements */
button,
a,
.btn-add,
.btn-remove-social,
.skill-checkbox-item {
  -webkit-tap-highlight-color: rgba(198, 40, 40, 0.3);
}


/* ── SKILLS CHECKBOX LABEL FIX ── */
.skills-checkbox-grid .skill-checkbox-item label {
  all: unset !important;
  font-family: var(--serif) !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  cursor: pointer !important;
  line-height: 1.3 !important;
  flex: 1 !important;
  display: block !important;
}

.skills-checkbox-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  padding: 0.5rem !important;
}

.skills-checkbox-grid .skill-checkbox-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.6rem 0.5rem !important;
  border-bottom: 1px solid var(--rule) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 44px !important;
}

.skills-checkbox-grid .skill-checkbox-item:last-child {
  border-bottom: none !important;
}

.skills-checkbox-grid .skill-checkbox-item input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  accent-color: var(--red) !important;
}