/* SCORM Authentication Styles */

.scorm-auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.scorm-auth-wrapper {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  margin: 0 auto;
  position: relative;
}

.scorm-auth-header {
  text-align: center;
  padding: 40px 40px 30px;
  background: white;
  color: #333;
  border-bottom: 1px solid #e9ecef;
  width: 100%;
  box-sizing: border-box;
}

.scorm-auth-header h1 {
  margin: 0 0 10px;
  font-size: 2.2em;
  font-weight: 700;
  color: #333;
  text-align: center;
}

.scorm-auth-header p {
  margin: 0;
  color: #666;
  font-size: 1.1em;
  text-align: center;
}

.scorm-auth-form-container {
  padding: 40px;
  background: white;
  width: 100%;
  box-sizing: border-box;
}

.scorm-auth-errors {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 25px;
  text-align: center;
}

.scorm-auth-errors p {
  margin: 0;
  color: #c33;
  font-size: 14px;
}

.scorm-auth-form {
  width: 100%;
  margin: 0 auto;
}

.scorm-form-group {
  margin-bottom: 25px;
  width: 100%;
}

.scorm-form-row {
  display: flex;
  gap: 15px;
  width: 100%;
}

.scorm-form-row .scorm-form-group {
  flex: 1;
}

.scorm-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  text-align: left;
}

.scorm-form-group input[type="text"],
.scorm-form-group input[type="email"],
.scorm-form-group input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: white;
  display: block;
}

.scorm-form-group input:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.scorm-form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
  text-align: left;
}

/* Checkbox styling */
.scorm-checkbox-label {
  display: flex !important;
  align-items: center;
  cursor: pointer;
  font-weight: normal !important;
  margin-bottom: 0 !important;
  justify-content: flex-start;
}

.scorm-checkbox-label input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: auto !important;
  padding: 0 !important;
  border: none !important;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e1e5e9;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s ease;
  background: white;
  flex-shrink: 0;
}

.scorm-checkbox-label input:checked + .checkmark {
  background: #0073aa;
  border-color: #0073aa;
}

.scorm-checkbox-label input:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Button styling */
.scorm-btn {
  width: 100%;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: block;
  text-align: center;
}

.scorm-btn-primary {
  background: #0073aa;
  color: white;
}

.scorm-btn-primary:hover {
  background: #005a87;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 115, 170, 0.3);
}

.scorm-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form links */
.scorm-form-links {
  text-align: center;
  margin-top: 20px;
  width: 100%;
}

.scorm-form-links a {
  color: #0073aa;
  text-decoration: none;
  font-size: 14px;
}

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

/* Footer */
.scorm-auth-footer {
  text-align: center;
  padding: 25px 40px 40px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  width: 100%;
  box-sizing: border-box;
}

.scorm-auth-footer p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.scorm-auth-footer a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 600;
}

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

/* Success/Error Messages */
.scorm-message {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 25px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.scorm-message.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.scorm-message.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Responsive Design */
@media (max-width: 600px) {
  .scorm-auth-container {
    padding: 10px;
  }

  .scorm-auth-wrapper {
    max-width: 100%;
    margin: 0;
  }

  .scorm-auth-header,
  .scorm-auth-form-container,
  .scorm-auth-footer {
    padding-left: 25px;
    padding-right: 25px;
  }

  .scorm-form-row {
    flex-direction: column;
    gap: 0;
  }

  .scorm-auth-header h1 {
    font-size: 1.8em;
  }
}

@media (max-width: 400px) {
  .scorm-auth-header,
  .scorm-auth-form-container,
  .scorm-auth-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Form validation states */
.scorm-form-group input.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.scorm-form-group input.success {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Password strength indicator */
.password-strength {
  margin-top: 5px;
  height: 4px;
  background: #e1e5e9;
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.password-strength-bar {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
  width: 33%;
  background: #dc3545;
}

.password-strength.medium .password-strength-bar {
  width: 66%;
  background: #ffc107;
}

.password-strength.strong .password-strength-bar {
  width: 100%;
  background: #28a745;
}

/* Additional centering fixes */
body.scorm-auth-page {
  margin: 0;
  padding: 0;
}

.scorm-auth-container * {
  box-sizing: border-box;
}
