/* Authentication modal styles for RidyFlow
   This file contains standalone authentication styles that won't conflict with the main app */

/* Modal overlay for authentication */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

/* Authentication widget */
.auth-widget {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  width: 320px;
  text-align: center;
  position: relative;
  padding-top: 60px;
  margin-top: 40px;
}

/* Logo container for auth widget */
.auth-logo-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: block !important;
  visibility: visible !important;
  width: 80px;
  height: 80px;
}

/* Logo styling for auth widget */
.auth-ridy-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #4BC451, #00b87a, #00a8cc);
  background-size: 200% 200%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: 0 0 20px rgba(75, 196, 81, 0.6);
  animation: authGradientBg 8s ease infinite, authPulse 3s ease-in-out infinite;
}

/* Logo glow effect */
.auth-ridy-logo::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(135deg, #4BC451, #00b87a, #00a8cc);
  background-size: 200% 200%;
  border-radius: 50%;
  z-index: -1;
  filter: blur(6px);
  opacity: 0.7;
  animation: authGradientBg 8s ease infinite;
}

/* Logo text styling */
.auth-ridy-text {
  color: white;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Auth content layout */
.auth-content {
  text-align: center;
}

/* Auth heading */
.auth-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  margin-top: 10px;
  background: linear-gradient(90deg, #4BC451, #00b87a, #00a8cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Form group styling */
.auth-form-group {
  margin-bottom: 15px;
}

/* Input styling */
.auth-form-group input {
  width: 100%;
  padding: 12px 14px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  font-family: 'Josefin Sans', sans-serif;
}

/* Button styling */
.auth-widget button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, #4BC451, #00b87a, #00a8cc);
  background-size: 200% 200%;
  animation: authGradientBg 8s ease infinite;
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  margin-top: 12px;
  transition: opacity 0.2s ease-in-out;
  font-family: 'Josefin Sans', sans-serif;
}

/* Anonymous button styling */
.auth-anonymous-btn {
  background: #6c757d !important;
  color: white !important;
  border: none !important;
  margin-top: 8px !important;
}

.auth-anonymous-btn:hover {
  background: #5a6268 !important;
  opacity: 0.9 !important;
}

/* "or" divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #9aa0a6;
  font-size: 13px;
  margin: 16px 0 4px;
  font-family: 'Josefin Sans', sans-serif;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e4e7eb;
}
.auth-divider span { padding: 0 12px; }

/* Google sign-in button (white, official style) */
.auth-google-btn {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #dadce0 !important;
  animation: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600 !important;
  margin-top: 8px !important;
}
.auth-google-btn:hover {
  background: #f7f8f8 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.10) !important;
  opacity: 1 !important;
}
.auth-google-btn svg { flex: 0 0 auto; }
.auth-google-btn:disabled { opacity: .7 !important; cursor: default !important; }

/* Auth links container */
.auth-links {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

/* Auth links styling */
.auth-links a {
  color: #3a873b;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  margin: 0;
}

/* Auth message styling */
.auth-message {
  font-size: 14px;
  margin-top: 10px;
  min-height: 20px;
  font-family: 'Josefin Sans', sans-serif;
}

/* Animation keyframes with namespaced names to avoid conflicts */
@keyframes authGradientBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes authPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .auth-widget {
    padding: 30px 20px;
    width: 90%;
  }
}

/* RAF-204: on a short screen the sign-in box was taller than the viewport and its bottom
   (language selector, Sign-Up / Forgot password links) was simply cut off, with no way to reach it:
   the overlay centred the box and never scrolled. Reported from a Samsung phone, 28.09.2026.
   The overlay now scrolls, the box never exceeds the screen width, and its ornaments shrink
   when vertical space is tight. Top padding leaves room for the logo, which sits half outside
   the box and would otherwise be clipped once the content is scrolled to the top. */
.auth-modal-overlay {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 56px 16px 24px;
  box-sizing: border-box;
}

.auth-widget {
  box-sizing: border-box;
  width: 100%;
  max-width: 320px;
  margin: auto;            /* still centred while it fits, scrollable once it does not */
}

@media (max-height: 760px) {
  .auth-widget { padding-top: 46px; }
  .auth-logo-container { width: 64px; height: 64px; }
}

@media (max-height: 640px) {
  .auth-modal-overlay { padding-top: 40px; }
  .auth-widget { padding: 22px 18px; padding-top: 40px; }
  .auth-logo-container { width: 54px; height: 54px; }
}


/* RAF-205: "Continue anonymously" is the landing demo's entrance, not a choice we offer on the
   normal sign-in screen - there it only competed with signing up. The demo marks the page with
   rf-demo, so the button still exists for it. */
#anonymousBtn { display: none !important; }
html.rf-demo #anonymousBtn { display: block !important; }
