/* Auth Main Container */
.auth-main {
  min-height: calc(
    100vh - 64px - 300px
  ); /* Subtract header and footer heights */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background-color: var(--bg-gray-50);
}

.auth-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* Auth Card */
.auth-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  color: #1a202c;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-gray);
}

/* Auth Form */
.auth-form {
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: #1a202c;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #1a202c;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--custom-blue);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Ensure required inputs without error class are not red on load */
.form-group:not(.error) input[required]:not(:focus),
.form-group:not(.error) select[required]:not(:focus),
.form-group:not(.error) textarea[required]:not(:focus) {
  border-color: #e2e8f0;
}

/* Password Input */
.password-input {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-gray);
}

.eye-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Password Strength Meter */
.password-strength {
  margin-top: 0.5rem;
}

.strength-meter {
  height: 4px;
  background-color: #e2e8f0;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.strength-requirements {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-gray);
}

.strength-requirements li {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
}

.strength-requirements li::before {
  content: "";
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  background-color: #e2e8f0;
  border-radius: 50%;
}

.strength-requirements li.valid::before {
  background-color: #48bb78;
}

/* Checkbox Styles */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-gray);
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
}

.checkbox-label a {
  color: var(--custom-blue);
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* Social Login */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 2rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 1rem);
  height: 1px;
  background-color: #e2e8f0;
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-divider span {
  background-color: var(--white);
  padding: 0 1rem;
  color: var(--text-gray);
  font-size: 0.875rem;
}

.social-login {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background-color: var(--white);
  color: #1a202c;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.social-btn:hover {
  background-color: #f8fafc;
}

.social-btn img {
  width: 1.5rem;
  height: 1.5rem;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  color: var(--text-gray);
}

.auth-footer a {
  color: var(--custom-blue);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Utility Classes */
.w-full {
  width: 100%;
}

/* Error States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #ef4444;
}

.form-group input:invalid:not(:focus),
.form-group select:invalid:not(:focus),
.form-group textarea:invalid:not(:focus) {
  border-color: #e2e8f0; /* Set to a neutral color when invalid but not focused */
}

.form-group input:invalid:focus,
.form-group select:invalid:focus,
.form-group textarea:invalid:focus {
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-group.error .error-message {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Success States */
.form-group.success input {
  border-color: #48bb78;
}

/* Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--white);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Error Message */
.error-message {
  display: none;
  background-color: #e53e3e;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.error-message.show {
  display: block;
}

/* Success Message */
.success-message {
  display: none;
  background-color: #48bb78;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.success-message.show {
  display: block;
}

/* Footer Styles */
.footer {
  background-color: #1a202c;
  color: #e2e8f0;
  font-size: 0.875rem;
}

.footer-main {
  padding: 4rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1.5fr 2fr 1.5fr;
    gap: 4rem;
  }
}

/* Footer Brand Section */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.footer-description {
  color: #a0aec0;
  line-height: 1.6;
  margin: 0;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #a0aec0;
  border-radius: 9999px;
  transition: all 0.2s;
}

.social-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Footer Links Group */
.footer-links-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: #a0aec0;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section ul li a:hover {
  color: #ffffff;
}

/* Newsletter Section */
.footer-newsletter {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.footer-newsletter h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.footer-newsletter p {
  color: #a0aec0;
  margin: 0 0 1.25rem;
}

.newsletter-form .form-group {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.625rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 0.875rem;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--custom-blue);
  background-color: rgba(255, 255, 255, 0.1);
}

.newsletter-form input[type="email"]::placeholder {
  color: #718096;
}

.newsletter-form .btn-primary {
  padding: 0.625rem 1rem;
  white-space: nowrap;
}

.newsletter-notice {
  font-size: 0.75rem;
  color: #718096;
  margin: 0.75rem 0 0;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-bottom-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  margin: 0;
  color: #718096;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #718096;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}
