/* ================================
   Membership Application Form Styles
   ================================ */

.membership-application {
  padding: 60px 0;
  background-color: #f8f9fa;
}

/* Progress Container */
.progress-container {
  margin-bottom: 40px;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-bar-wrapper {
  position: relative;
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #007b40 0%, #00a854 100%);
  width: 12.5%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.progress-step {
  flex: 1;
  min-width: 100px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.progress-step .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #e9ecef;
  border-radius: 50%;
  font-weight: bold;
  color: #666;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.progress-step.active .step-number {
  background-color: #007b40;
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 123, 64, 0.1);
}

.progress-step.completed .step-number {
  background-color: #28a745;
  color: white;
}

.progress-step.completed .step-number::after {
  content: '✓';
  font-size: 20px;
}

.progress-step .step-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-top: 5px;
  transition: all 0.3s ease;
}

.progress-step.active .step-label {
  color: #007b40;
  font-weight: 700;
}

.progress-step.completed .step-label {
  color: #28a745;
}

/* Application Form */
.application-form {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-header {
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 20px;
}

.step-header h2 {
  color: #007b40;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-header p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

/* Form Section */
.form-section {
  margin-bottom: 30px;
}

.form-section h4 {
  color: #007b40;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* Form Row & Groups */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.text-danger {
  color: #dc3545;
}

/* Form Controls */
.form-control {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #007b40;
  box-shadow: 0 0 0 3px rgba(0, 123, 64, 0.1);
}

.form-control::placeholder {
  color: #999;
}

/* Radio Options */
.account-type-options {
  display: grid;
  gap: 15px;
}

.radio-option,
.radio-option-inline,
.checkbox-option,
.checkbox-option-inline {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #333;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"],
.radio-option-inline input[type="radio"],
.checkbox-option-inline input[type="checkbox"] {
  margin-right: 10px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.radio-inline,
.checkbox-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Table Styling */
.contribution-table {
  overflow-x: auto;
  margin-top: 20px;
}

.contribution-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.contribution-table thead {
  background-color: #007b40;
  color: white;
}

.contribution-table th {
  padding: 15px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
}

.contribution-table td {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.contribution-table tbody tr:last-child td {
  border-bottom: none;
}

.contribution-table label {
  margin: 0;
  font-weight: 600;
  color: #333;
}

.contribution-table input {
  width: 100%;
}

/* Nominated Kin Rows */
.nominated-kin-row {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 15px;
  border-left: 4px solid #007b40;
}

/* Declaration Box */
.declaration-box {
  background-color: #f0f8f5;
  border-left: 4px solid #007b40;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 25px;
}

.declaration-box h4 {
  color: #007b40;
  margin-bottom: 12px;
  margin-top: 0;
}

.declaration-box p {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: #007b40;
  color: white;
}

.btn-primary:hover {
  background-color: #005a2e;
  box-shadow: 0 4px 12px rgba(0, 123, 64, 0.3);
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-danger {
  background-color: #dc3545;
  color: white;
  padding: 8px 12px;
  font-size: 12px;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}

/* Form Navigation */
.form-navigation {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.form-navigation button {
  min-width: 150px;
}

/* Helper Text */
.form-text {
  font-size: 12px;
  color: #6c757d;
  margin-top: 4px;
}

.form-text.text-muted {
  color: #999;
}

/* Error Styles */
.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.invalid-feedback {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .form-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .progress-steps {
    gap: 5px;
  }

  .progress-step .step-label {
    font-size: 11px;
  }

  .progress-step .step-number {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .membership-application {
    padding: 30px 0;
  }

  .application-form {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: 1;
  }

  .progress-container {
    padding: 20px;
    margin-bottom: 30px;
  }

  .progress-bar-wrapper {
    margin-bottom: 20px;
  }

  .progress-steps {
    gap: 3px;
  }

  .progress-step {
    min-width: 70px;
  }

  .progress-step .step-number {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .progress-step .step-label {
    font-size: 10px;
    display: none;
  }

  .progress-step.active .step-label,
  .progress-step.completed .step-label {
    display: block;
  }

  .step-header h2 {
    font-size: 22px;
  }

  .step-header p {
    font-size: 13px;
  }

  .form-navigation {
    flex-direction: column;
  }

  .form-navigation button {
    width: 100%;
  }

  .radio-inline,
  .checkbox-inline {
    gap: 15px;
    flex-direction: column;
  }

  .contribution-table {
    font-size: 13px;
  }

  .contribution-table th,
  .contribution-table td {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .progress-step {
    min-width: 50px;
  }

  .progress-step .step-number {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .step-header h2 {
    font-size: 18px;
  }

  .form-label {
    font-size: 13px;
  }

  .form-control {
    font-size: 13px;
    padding: 10px 12px;
  }

  .btn {
    padding: 10px 15px;
    font-size: 13px;
  }

  .nominated-kin-row {
    padding: 15px;
  }
}
