/* 
 * WeDriveSolar Customer Portal Authentication Styles
 * Styles for login, registration, and password reset pages
 */

/* Auth Container */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background-color: var(--light-gray);
  position: relative;
}

/* Auth Logo */
.auth-logo {
  margin-bottom: 2rem;
  max-width: 300px;
}

.auth-logo img {
  width: 100%;
  height: auto;
}

/* Auth Card */
.auth-card {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 550px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: var(--font-size-xl);
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--dark-gray);
  font-size: var(--font-size-md);
}

/* Auth Form */
.auth-form {
  margin-bottom: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-md);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
}

.form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--dark-gray);
}

/* Password Input */
.password-input-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--dark-gray);
  cursor: pointer;
}

/* Password Strength Meter */
.password-strength-meter {
  height: 4px;
  background-color: var(--light-gray);
  margin-top: 0.5rem;
  border-radius: 2px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-bar.weak {
  width: 25%;
  background-color: var(--danger);
}

.password-strength-bar.medium {
  width: 50%;
  background-color: var(--warning);
}

.password-strength-bar.strong {
  width: 75%;
  background-color: var(--info);
}

.password-strength-bar.very-strong {
  width: 100%;
  background-color: var(--success);
}

/* Password Requirements */
.password-requirements {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.password-requirements .requirement {
  font-size: var(--font-size-sm);
  color: var(--dark-gray);
  margin-bottom: 0.25rem;
  position: relative;
  padding-left: 1.5rem;
}

.password-requirements .requirement::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--danger);
}

.password-requirements .requirement.met::before {
  content: "✓";
  color: var(--success);
}

/* Checkbox Container */
.checkbox-container {
  display: flex;
  align-items: flex-start;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

.checkbox-container label {
  margin-bottom: 0;
  font-weight: 400;
}

/* Auth Actions */
.auth-actions {
  margin-top: 2rem;
}

.btn-block {
  width: 100%;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  font-size: var(--font-size-md);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

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

/* Auth Language Switcher */
.auth-language-switcher {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Social Login */
.social-login {
  margin-top: 1.5rem;
  text-align: center;
}

.social-login-title {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--dark-gray);
  font-size: var(--font-size-sm);
}

.social-login-title::before,
.social-login-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--medium-gray);
}

.social-login-title::before {
  margin-right: 1rem;
}

.social-login-title::after {
  margin-left: 1rem;
}

.social-login-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--white);
  border: 1px solid var(--medium-gray);
  color: var(--dark);
  font-size: var(--font-size-lg);
  transition: all var(--transition-fast);
}

.social-login-button:hover {
  background-color: var(--light-gray);
}

.social-login-button.google:hover {
  color: #DB4437;
}

.social-login-button.microsoft:hover {
  color: #00A4EF;
}

.social-login-button.apple:hover {
  color: #000000;
}

/* Two-Factor Authentication */
.two-factor-code {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.two-factor-digit {
  width: 3rem;
  height: 4rem;
  text-align: center;
  font-size: var(--font-size-xl);
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius-sm);
}

.two-factor-digit:focus {
  border-color: var(--primary);
  outline: none;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-card {
    padding: 1.5rem;
  }
  
  .auth-language-switcher {
    position: static;
    margin-top: 1rem;
  }
  
  .two-factor-digit {
    width: 2.5rem;
    height: 3.5rem;
  }
}
