/**
 * Tutor Custom Login Forms - Styles
 * Version: 1.0.0
 *
 * All elements have CSS classes prefixed with 'tcl-' for easy customization
 */

/* ============================================
   Login Container
   ============================================ */
.tcl-login-container {
  max-width: 450px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tcl-login-form-wrapper {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 40px;
  border: 1px solid #e5e7eb;
}

/* ============================================
   Title
   ============================================ */
.tcl-login-title {
  margin: 0 0 30px 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  line-height: 1.3;
}

/* ============================================
   Form Elements
   ============================================ */
.tcl-login-form {
  margin: 0;
}

.tcl-form-group {
  margin-bottom: 20px;
}

.tcl-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  line-height: 1.4;
}

.tcl-form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.5;
  color: #1f2937;
  background-color: #ffffff;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.tcl-form-input:focus {
  outline: none;
  border-color: #82275e;
  box-shadow: 0 0 0 3px rgba(130, 39, 94, 0.1);
}

.tcl-form-input:hover {
  border-color: #9ca3af;
}

.tcl-username-input,
.tcl-password-input {
  /* Additional specific styling if needed */
}

/* ============================================
   Remember Me Checkbox
   ============================================ */
.tcl-remember-group {
  margin-bottom: 24px;
}

.tcl-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.tcl-checkbox-input {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  cursor: pointer;
  accent-color: #82275e;
}

.tcl-checkbox-text {
  font-size: 14px;
  color: #4b5563;
  font-weight: 500;
}

/* ============================================
   Submit Button
   ============================================ */
.tcl-submit-group {
  margin-bottom: 24px;
}

.tcl-submit-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.tcl-btn {
  display: inline-block;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tcl-btn-primary {
  background-color: #82275e;
  color: #ffffff;
}

.tcl-btn-primary:hover {
  background-color: #6b1f4d;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(130, 39, 94, 0.3);
}

.tcl-btn-primary:active {
  transform: translateY(0);
}

.tcl-btn-secondary {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.tcl-btn-secondary:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

/* ============================================
   Login Links (Forgot Password, Register)
   ============================================ */
.tcl-login-links {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: 24px;
}

.tcl-lost-password-link,
.tcl-register-link {
  font-size: 14px;
  font-weight: 500;
  color: #82275e;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tcl-lost-password-link:hover,
.tcl-register-link:hover {
  color: #6b1f4d;
  text-decoration: underline;
}

.tcl-link-separator {
  display: inline-block;
  margin: 0 12px;
  color: #d1d5db;
}

.tcl-practitioner-register,
.tcl-parent-register {
  /* Specific styling for registration links if needed */
}

/* ============================================
   Error Messages
   ============================================ */
.tcl-error-messages {
  margin-bottom: 24px;
}

.tcl-error-message {
  padding: 12px 16px;
  margin: 0 0 12px 0;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.5;
}

.tcl-error-message:last-child {
  margin-bottom: 0;
}

.tcl-error-message a {
  color: #dc2626;
  font-weight: 600;
  text-decoration: underline;
}

.tcl-error-message a:hover {
  color: #b91c1c;
}

/* ============================================
   Already Logged In / Message Boxes
   ============================================ */
.tcl-message-box {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 40px;
  border: 1px solid #e5e7eb;
  text-align: center;
}

.tcl-already-logged-in {
  border-left: 4px solid #10b981;
}

.tcl-error-box {
  border-left: 4px solid #ef4444;
  background-color: #fef2f2;
}

.tcl-message-text {
  font-size: 16px;
  color: #374151;
  margin: 0 0 24px 0;
  line-height: 1.6;
}

.tcl-logged-in-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.tcl-logged-in-actions .tcl-btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  min-width: 140px;
}

/* ============================================
   Specific Login Form Types
   ============================================ */
.tcl-tutor-login {
  /* Tutor LMS specific styles if needed */
}

.tcl-moodle-login {
  /* Moodle specific styles if needed */
}

/* ============================================
   Registration CTA Button
   ============================================ */
.tcl-registration-cta {
  margin-bottom: 24px;
}

.tcl-registration-cta .tcl-submit-btn {
  display: block;
  color: #ffffff;
}

.tcl-registration-cta .tcl-submit-btn:hover {
  color: #ffffff;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 600px) {
  .tcl-login-container {
    padding: 15px;
  }

  .tcl-login-form-wrapper {
    padding: 30px 20px;
  }

  .tcl-login-title {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .tcl-form-input {
    padding: 10px 14px;
    font-size: 16px; /* Prevent iOS zoom on focus */
  }

  .tcl-submit-btn {
    padding: 12px 20px;
  }

  .tcl-logged-in-actions {
    flex-direction: column;
  }

  .tcl-logged-in-actions .tcl-btn {
    width: 100%;
  }

  .tcl-link-separator {
    display: block;
    margin: 8px 0;
    opacity: 0;
  }

  .tcl-register-link {
    display: block;
    margin: 8px 0;
  }

  .tcl-lost-password-link {
    display: block;
    margin-bottom: 8px;
  }
}

@media (max-width: 400px) {
  .tcl-login-form-wrapper {
    padding: 24px 16px;
  }

  .tcl-login-title {
    font-size: 22px;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .tcl-login-container {
    box-shadow: none;
    border: 1px solid #000;
  }
}
