/* Registration Form Styling */

/* Form Container */
.register-page {
  padding: 40px 20px;
  background: #f9f9f9;
  min-height: 100vh;
}

.register-page .container {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.register-page form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Section Headers */
.form-section {
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
}

.form-section:first-child {
  border-top: none;
  padding-top: 0;
}

.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  display: block;
}

/* Form Fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 10px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field label .required {
  color: #d32f2f;
  font-weight: 600;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
  padding: 12px 14px;
  border: 1px solid #ccc;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  -webkit-transition: border-color 0.2s, box-shadow 0.2s;
  -moz-transition: border-color 0.2s, box-shadow 0.2s;
  -o-transition: border-color 0.2s, box-shadow 0.2s;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input[type="text"]:focus,
.field input[type="email"]:focus,
.field input[type="tel"]:focus,
.field input[type="password"]:focus {
  outline: none;
  border-color: #1976d2;
  -webkit-box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
  -moz-box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.field input:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* Field Help Text */
.field-help {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* Error Messages */
.error {
  font-size: 12px;
  color: #d32f2f;
  margin: 0;
  line-height: 1.4;
}

.field:has(.error) input {
  border-color: #d32f2f;
  background-color: #ffebee;
}

.field:has(.error) input:focus {
  -webkit-box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
  -moz-box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Non-field errors */
.non-field-errors {
  background-color: #ffebee;
  border: 1px solid #d32f2f;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 20px;
}

.non-field-errors .error {
  margin: 4px 0;
}

.non-field-errors .error:first-child {
  margin-top: 0;
}

.non-field-errors .error:last-child {
  margin-bottom: 0;
}

/* Password Requirements */
.password-requirements {
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  padding: 12px 14px;
  margin-top: 8px;
  font-size: 12px;
}

.password-requirements-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.password-requirements ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.password-requirements li {
  margin: 4px 0;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}

.password-requirements li:before {
  content: "✓";
  color: #4caf50;
  font-weight: 600;
  min-width: 16px;
}

.password-requirements li.not-met {
  color: #999;
}

.password-requirements li.not-met:before {
  content: "○";
  color: #ccc;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-start;
}

.form-actions button {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  cursor: pointer;
  -webkit-transition: all 0.2s;
  -moz-transition: all 0.2s;
  -o-transition: all 0.2s;
  transition: all 0.2s;
  font-family: inherit;
}

.form-actions button[type="submit"] {
  background-color: #1976d2;
  color: white;
  flex: 1;
}

.form-actions button[type="submit"]:hover {
  background-color: #1565c0;
  -webkit-box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
  -moz-box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.form-actions button[type="submit"]:active {
  background-color: #0d47a1;
}

.form-actions button[type="submit"]:disabled {
  background-color: #bdbdbd;
  cursor: not-allowed;
}

.form-actions button[type="button"] {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #e0e0e0;
}

.form-actions button[type="button"]:hover {
  background-color: #eeeeee;
  border-color: #d0d0d0;
}

.form-actions button[type="button"]:active {
  background-color: #e0e0e0;
}

/* Form Footer */
.form-footer {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 20px;
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
}

.form-footer a {
  color: #1976d2;
  text-decoration: none;
  font-weight: 500;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Success Message */
.form-success {
  background-color: #e8f5e9;
  border: 1px solid #4caf50;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  padding: 12px 14px;
  color: #2e7d32;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 600px) {
  .register-page {
    padding: 20px 12px;
  }

  .register-page .container {
    padding: 24px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }
}

/* Accessibility - Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  -webkit-clip: rect(0, 0, 0, 0);
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Loading State */
.form-loading .form-actions button[type="submit"] {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-loading .form-actions button[type="submit"]:disabled {
  background-color: #bdbdbd;
}