#loginBtn {
  min-width: 92px;
  cursor: pointer;
}

/* Overlay */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.login-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.login-modal-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(0 0 0 / .5);
  backdrop-filter: blur(4px);
}

/* Modal */
.login-modal {
  position: relative;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgb(0 0 0 / .3);
  max-width: 440px;
  width: 90%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.login-modal-overlay.show .login-modal {
  transform: translateY(0);
}

/* Header */
.login-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.login-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

.login-modal-close {
  background: #fff0;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #6b7280;
  transition: all 0.2s ease;
}

.login-modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.login-modal-close:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Content */
.login-modal-content {
  padding: 24px;
  overflow-y: auto;
}

.login-modal-description {
  margin: 0 0 24px;
  color: #4a5568;
  font-size: .95rem;
  line-height: 1.5;
  text-align: center;
}

/* Buttons */
.login-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  width: 100%;
}

.login-provider-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / .1);
}

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

.login-provider-btn:focus {
  /* Keep box-shadow for legacy browsers that don't support :focus-visible */
  box-shadow: 0 0 0 3px rgb(59 130 246 / .3);
}

.google-btn {
  border-color: #e5e7eb;
  color: #1f2937;
}

.google-btn:hover {
  border-color: #4285f4;
  background: #f8faff;
}

.microsoft-btn {
  border-color: #e5e7eb;
  color: #1f2937;
}

.microsoft-btn:hover {
  border-color: #00a4ef;
  background: #f8fcff;
}

.provider-logo {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.provider-text {
  font-weight: 500;
}

/* Responsive */
@media (max-width: 480px) {
  .login-modal {
    width: 95%;
    max-width: none;
    border-radius: 12px;
  }

  .login-modal-header {
    padding: 20px 20px 12px;
  }

  .login-modal-title {
    font-size: 1.25rem;
  }

  .login-modal-content {
    padding: 20px;
  }

  .login-provider-btn {
    padding: 12px 20px;
    font-size: .95rem;
  }

  .provider-logo {
    width: 22px;
    height: 22px;
  }
}

/* Accessibility and motion */
@media (prefers-reduced-motion: reduce) {
  .login-modal-overlay,
  .login-modal,
  .login-modal-close,
  .login-provider-btn {
    transition: none;
  }

  .login-provider-btn:hover {
    transform: none;
  }
}

.login-provider-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.login-provider-btn.loading {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .login-modal {
    background: #1f2937;
  }

  .login-modal-header {
    border-bottom-color: #374151;
  }

  .login-modal-title {
    color: #f9fafb;
  }

  .login-modal-description {
    color: #9ca3af;
  }

  .login-modal-close {
    color: #9ca3af;
  }

  .login-modal-close:hover {
    background: #374151;
    color: #f9fafb;
  }

  .login-provider-btn {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
  }

  .google-btn:hover {
    background: #1e3a5f;
    border-color: #4285f4;
  }

  .microsoft-btn:hover {
    background: #1e3851;
    border-color: #00a4ef;
  }
}