/* Modern Google Authentication Styling - Native Popup Version */
.google-auth-section {
  margin-top: 20px;
  text-align: center;
}

/* Google Sign-In Container */
.google-signin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  min-height: 50px;
}

/* Native Google Button Styling */
.google-native-popup-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 24px !important;
  background: white !important;
  color: #3c4043 !important;
  font-family: 'Google Sans', 'Roboto', Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  width: 100% !important;
  max-width: 280px !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  margin: 0 auto !important;
  text-decoration: none !important;
  outline: none !important;
}

.google-native-popup-button:hover {
  box-shadow: 0 1px 2px 0 rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15) !important;
  background-color: #f8f9fa !important;
}

.google-native-popup-button:active {
  background-color: #f1f3f4 !important;
  transform: translateY(1px);
}

.google-native-popup-button:focus {
  outline: 2px solid #4285f4 !important;
  outline-offset: 2px !important;
}

/* Loading state for Google button */
.google-button-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid #dadce0;
  border-radius: 24px;
  background: #fff;
  color: #3c4043;
  font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
  font-size: 14px;
  min-height: 40px;
  max-width: 280px;
  margin: 0 auto;
}

.google-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #4285f4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Google button wrapper */
.google-button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  opacity: 1;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal enhancements */
.modal .modal-content {
  max-width: 420px;
  margin: 0 auto;
}

/* Ad blocker notices */
#adblock-notice,
#brave-notice {
  margin: 10px 0;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

#adblock-notice {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

#brave-notice {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  color: #0066cc;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  
  .google-button-loading,
  .google-native-popup-button {
    background: #3a3a3a !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
  }
  
  .google-native-popup-button:hover {
    background: #4a4a4a !important;
    border-color: #666 !important;
  }
  
  #adblock-notice {
    background: #4d4016;
    border-color: #665a1e;
    color: #ffd700;
  }
  
  #brave-notice {
    background: #1a3d5c;
    border-color: #2952a3;
    color: #87ceeb;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .google-signin-container {
    margin: 15px 0;
  }
  
  .google-native-popup-button,
  .google-button-loading {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .google-native-popup-button {
    padding: 14px 16px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  #adblock-notice,
  #brave-notice {
    font-size: 12px;
    padding: 8px;
  }
}

/* Ensure Google One Tap appears on top */
div[data-credential_picker_container] {
  z-index: 999999 !important;
}

iframe[src*="accounts.google.com"] {
  z-index: 999999 !important;
}

/* Style the One Tap prompt container if it appears */
div[role="dialog"][aria-modal="true"] {
  z-index: 999999 !important;
}

/* Error state styling */
.google-auth-error {
  color: #d93025;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}

/* Button click effect */
.google-native-popup-button {
  position: relative;
  overflow: hidden;
}

.google-native-popup-button:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.1);
  transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
  transform: translate(-50%, -50%);
}

.google-native-popup-button:active:before {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
}
