/* CCG Secure Login System Styles */
.ccg-secure-login-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.ccg-secure-login-form-wrapper {
  width: 100%;
}

.ccg-secure-login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.ccg-secure-login-header h2 {
  color: #1f2937;
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0;
}

.ccg-secure-login-form .form-group {
  margin-bottom: 1.5rem;
}

.ccg-secure-login-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #374151;
  font-weight: 500;
  font-size: 0.875rem;
}

.ccg-secure-login-form .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.ccg-secure-login-form .form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ccg-secure-login-form .form-control:invalid {
  border-color: #ef4444;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type='checkbox'] {
  width: auto;
  margin: 0;
}

.checkbox-group label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.btn-primary:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-links {
  margin-top: 1.5rem;
  text-align: center;
}

.form-links a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.875rem;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.form-links a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Messages */
#ccg-secure-login-messages {
  margin-bottom: 1rem;
}

.login-message {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.login-message.error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.login-message.success {
  background-color: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.login-message.info {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Loading state */
.ccg-secure-login-form.loading .btn-primary {
  position: relative;
  color: transparent;
}

.ccg-secure-login-form.loading .btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
  .ccg-secure-login-container {
    margin: 1rem;
    padding: 1.5rem;
  }

  .ccg-secure-login-header h2 {
    font-size: 1.5rem;
  }
}

/* Security indicators */
.security-info {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

.security-info .icon {
  display: inline-block;
  margin-right: 0.25rem;
}

/* Rate limiting warning */
.rate-limit-warning {
  background-color: #fffbeb;
  border: 1px solid #fed7aa;
  color: #ea580c;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-align: center;
}

/* Accessibility improvements */
.ccg-secure-login-form input:focus,
.ccg-secure-login-form button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
