/**
 * @file loginTool.css
 * @description Styles for the sign-in modal dialog and login button states
 *              in School Draw.  Loaded dynamically by authGatedLoader.js after
 *              authentication completes.
 *
 * CONTENTS
 * --------
 * 1. Modal overlay (.login-modal-overlay)
 *    Full-screen flex container, initially hidden (display:none).  Gains
 *    .show class to transition in with opacity + backdrop blur.
 *
 * 2. Modal card (.login-modal)
 *    Centred white card with border-radius and box-shadow.  Animates from
 *    scale(0.9) / translateY(10px) to scale(1) / translateY(0) on show.
 *
 * 3. Modal header (.login-modal-header, .login-modal-title, .login-modal-close)
 *    "Sign In" heading with close button (×) in the top-right corner.
 *
 * 4. Provider buttons (.login-provider-btn)
 *    Full-width buttons for Google and Microsoft sign-in with brand colours:
 *    .google-btn    — white background, Google brand border
 *    .microsoft-btn — Microsoft blue (#0078d4)
 *    Both include SVG provider logos and responsive hover/focus states.
 *
 * 5. Dropdown menu (.login-dropdown-menu, .login-menu-item)
 *    The "Log Out" dropdown that appears below the login button when signed in.
 *
 * 6. Responsive overrides
 *    @media (max-width: 480px) — modal fills more of the screen on small phones.
 *
 * RELATED JS FILE
 * ---------------
 * loginTool.js — builds the modal DOM and controls .show class toggling.
 */
#loginBtn {
  cursor: pointer;
}
.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 / 0.5);
  backdrop-filter: blur(4px);
}
.login-modal {
  position: relative;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgb(0 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);
}
.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;
}
.login-modal-content {
  padding: 24px;
  overflow-y: auto;
}
.login-modal-description {
  margin: 0 0 24px;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}
.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 / 0.1);
}
.login-provider-btn:active {
  transform: translateY(0);
}
.login-provider-btn:focus {
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.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;
}
@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: 0.95rem;
  }
  .provider-logo {
    width: 22px;
    height: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .login-modal,
  .login-modal-close,
  .login-modal-overlay,
  .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: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
@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;
  }
}
