/* Terms Modal Styles */
.terms-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.terms-modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.terms-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.terms-modal-header h2 {
  margin: 0;
  color: #333;
}

.terms-modal-close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
}

.terms-modal-close:hover {
  color: #333;
}

.terms-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px 0;
}

.terms-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.terms-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  border-bottom: 3px solid transparent;
}

.terms-tab.active {
  color: #ff6b35;
  border-bottom: 3px solid #ff6b35;
  font-weight: 500;
}

.terms-tab-content {
  display: none;
  padding: 10px;
}

.terms-tab-content.active {
  display: block;
}

.terms-tab-content h3 {
  color: #333;
  margin-top: 0;
}

.terms-tab-content h4 {
  color: #444;
  margin-bottom: 10px;
}

.terms-tab-content p, .terms-tab-content ul {
  margin-bottom: 15px;
  line-height: 1.6;
}

.terms-tab-content ul {
  padding-left: 20px;
}

.terms-modal-footer {
  padding-top: 15px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terms-agreement {
  display: flex;
  align-items: center;
}

.terms-agreement input {
  margin-right: 10px;
}

#termsAgreeBtn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .terms-modal-content {
    width: 90%;
    margin: 10% auto;
  }
  
  .terms-tabs {
    flex-direction: column;
  }
  
  .terms-tab {
    border-bottom: none;
    border-left: 3px solid transparent;
    text-align: left;
  }
  
  .terms-tab.active {
    border-bottom: none;
    border-left: 3px solid #ff6b35;
  }
}

.checkbox-group input[type="checkbox"] {
  cursor: pointer;
  /* Ensure it looks clickable even though we're preventing direct checking */
}

.checkbox-group input[type="checkbox"]:focus {
  outline: 2px solid #ff6b35;
}

/* Signup Specific Styles */
.auth-container {
  max-width: 800px;
  margin: 40px auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  text-decoration: none;
  color: #ff6b35;
  font-weight: bold;
  font-size: 24px;
}

.auth-header .logo-img {
  font-size: 32px;
  margin-right: 10px;
}

.auth-header h1 {
  font-size: 24px;
  color: #333;
  margin: 0;
}

.auth-header p {
  color: #666;
  margin-top: 10px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group .label-optional {
  color: #888;
  font-weight: normal;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #ff6b35;
  outline: none;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-upload .file-upload-btn {
  width: 100%;
  padding: 12px;
  background-color: #f5f5f5;
  border: 1px dashed #ddd;
  border-radius: 5px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.file-upload .file-upload-btn:hover {
  background-color: #eee;
  border-color: #ccc;
}

.file-upload input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-selected {
  margin-top: 5px;
  font-size: 14px;
  color: #666;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.checkbox-group input {
  margin-right: 10px;
  margin-top: 4px;
}

.checkbox-group label {
  font-size: 14px;
  line-height: 1.4;
  color: #666;
}

.checkbox-group label a {
  color: #ff6b35;
  text-decoration: none;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

.btn-auth {
  width: 100%;
  padding: 14px;
  background-color: #ff6b35;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-auth:hover {
  background-color: #e64a19;
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
  color: #666;
}

.auth-footer a {
  color: #ff6b35;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.multi-step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: #ddd;
  z-index: 1;
}

.step:last-child::after {
  display: none;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #ddd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  position: relative;
  z-index: 2;
}

.step.active .step-number {
  background-color: #ff6b35;
}

.step.complete .step-number {
  background-color: #4caf50;
}

.step-label {
  font-size: 14px;
  color: #666;
}

.step.active .step-label {
  color: #ff6b35;
  font-weight: 500;
}

.step.complete .step-label {
  color: #4caf50;
}

/* Form Step Control */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn-secondary {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  background-color: #eee;
}

.btn-step {
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

/* Hide/Show elements based on step */
.step-controls-single {
  display: flex;
  justify-content: flex-end;
}

.step-controls-multi {
  display: flex;
  justify-content: space-between;
}

.step-controls-last {
  display: flex;
  justify-content: space-between;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .auth-container {
    padding: 20px;
  }

  .step-label {
    font-size: 12px;
  }
}

/* Add/modify these styles in your signup.css file */

@media (max-width: 768px) {
  .multi-step-indicator {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .step {
    flex: 0 0 calc(50% - 10px);
    margin-bottom: 15px;
    position: relative;
  }
  
  .step::after {
    width: 50%;
    left: 75%;
  }
  
  .step:nth-child(2n)::after {
    display: none;
  }
  
  .step-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .step {
    flex: 0 0 calc(50% - 10px);
  }
  
  .step-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  
  .step-label {
    font-size: 10px;
  }
}

/* FIXED PASSWORD TOGGLE BUTTON STYLES */
/* Password input container to properly handle positioning */
.form-group {
  position: relative;
}

.password-toggle {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  font-size: 16px !important;
  cursor: pointer !important;
  z-index: 10 !important;
  padding: 5px !important;
  pointer-events: auto !important;
  /* Ensure it stays in position regardless of content below */
  margin: 0 !important;
}

/* Ensure the toggle button adjusts based on input field position */
.form-group input[type="password"],
.form-group input[type="text"] {
  padding-right: 45px !important; /* Make space for toggle button */
}

.password-toggle:hover {
  opacity: 0.7;
}

.password-toggle:focus {
  outline: 2px solid #ff6b35;
  outline-offset: 1px;
}

/* PASSWORD VALIDATION MESSAGES POSITIONING */
.password-strength-indicator {
  margin-top: 8px;
  font-size: 14px;
}

.strength-text {
  color: #666;
  font-weight: 500;
}

/* Password Strength Colors */
.strength-level.weak {
  color: #dc3545;
  font-weight: 600;
}

.strength-level.fair {
  color: #fd7e14;
  font-weight: 600;
}

.strength-level.good {
  color: #28a745;
  font-weight: 600;
}

.strength-level.strong {
  color: #28a745;
  font-weight: 600;
}

/* Password Match Indicator - Positioned below input */
.password-match {
  margin-top: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  /* Ensure it doesn't interfere with toggle button positioning */
  clear: both;
}

.password-match.match {
  color: #28a745 !important;
}

.password-match.no-match {
  color: #dc3545 !important;
}

/* MOBILE RESPONSIVE FIXES */
@media (max-width: 768px) {
  .password-toggle {
    right: 10px !important;
    font-size: 18px !important; /* Slightly larger for easier touch */
    padding: 8px !important;
  }
  
  .form-group input[type="password"],
  .form-group input[type="text"] {
    padding-right: 50px !important; /* More space on mobile */
  }
  
  /* Ensure validation messages have proper spacing on mobile */
  .password-strength-indicator,
  .password-match {
    font-size: 13px !important;
    margin-top: 6px !important;
  }
}

/* EXTRA SMALL MOBILE DEVICES */
@media (max-width: 480px) {
  .password-toggle {
    right: 8px !important;
    font-size: 16px !important;
    padding: 6px !important;
  }
  
  .form-group input[type="password"],
  .form-group input[type="text"] {
    padding-right: 45px !important;
    font-size: 16px !important; /* Prevent zoom on iOS */
  }
  
  .password-strength-indicator,
  .password-match {
    font-size: 12px !important;
    margin-top: 5px !important;
  }
}