/* GCSE Registration Addon Styles */

.gcse-addon-wrapper {
  margin-top: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.gcse-field {
  margin-bottom: 15px;
}

.gcse-field-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.gcse-field.gcse-half {
  flex: 1;
  margin-bottom: 0;
}

.gcse-field label.qode-membership-lr-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.gcse-field input,
.gcse-field select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.gcse-field input:focus,
.gcse-field select:focus {
  border-color: #007cba;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Subject Selection Highlight */
#gcse_subject {
  border-color: #007cba;
  background-color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  padding: 12px;
}

/* Subject-Specific Sections */
.gcse-subject-specific {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  margin-top: 15px;
  border-left: 4px solid #e74c3c;
}

.gcse-common-fields,
.gcse-personal-fields {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  margin-top: 15px;
  border-left: 4px solid #007cba;
}

/* Section Headers */
.gcse-addon-wrapper h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

/* Checkbox Styling */
.gcse-field input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  transform: scale(1.2);
}

.gcse-field label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  font-weight: normal;
  cursor: pointer;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.gcse-field label:has(input[type="checkbox"]):hover {
  background-color: #e9ecef;
}

/* Required field indicators */
.gcse-field label.qode-membership-lr-label:after {
  content: " *";
  color: #e74c3c;
  font-weight: bold;
}

/* Remove asterisk from non-required labels */
.gcse-field label:not(.qode-membership-lr-label):after,
.gcse-field label:has(input[type="checkbox"]):after {
  content: "";
}

/* Responsive Design */
@media (max-width: 768px) {
  .gcse-addon-wrapper {
    margin: 10px -10px;
    padding: 15px;
    border-radius: 0;
  }

  .gcse-field-row {
    flex-direction: column;
    gap: 0;
  }

  .gcse-field.gcse-half {
    margin-bottom: 15px;
  }

  .gcse-common-fields,
  .gcse-personal-fields,
  .gcse-subject-specific {
    margin-left: -5px;
    margin-right: -5px;
    padding: 15px;
  }

  .gcse-field input,
  .gcse-field select {
    font-size: 16px; /* Prevents zoom on mobile */
  }
}

/* Animation for field transitions */
#gcse-dynamic-fields {
  overflow: hidden;
}

.gcse-subject-specific {
  transition: all 0.3s ease;
}

/* Error states */
.gcse-field input.error,
.gcse-field select.error {
  border-color: #e74c3c;
  background-color: #fff5f5;
}

/* Success states */
.gcse-field input.valid,
.gcse-field select.valid {
  border-color: #27ae60;
}

/* Loading overlay */
.gcse-addon-wrapper.loading {
  position: relative;
  opacity: 0.7;
}

.gcse-addon-wrapper.loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #007cba;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
