/* Authentication UI Styles */

.auth-container {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
}

/* Login section with buttons */
.auth-login-section {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
}

/* Auth prompt text */
.auth-prompt {
  font-family: "Alef", "Open Sans Hebrew", "Segoe UI", sans-serif;
  font-size: 1.1em;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
}

/* User profile section (when logged in) */
.auth-user-section {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
}

/* Hidden class */
.auth-container .hidden {
  display: none !important;
}

/* Auth buttons base style */
.auth-btn {
  font-family: "Alef", "Open Sans Hebrew", "Segoe UI", sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 1.05em;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
}

.auth-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.auth-btn:active {
  transform: scale(0.98);
}

/* Google button */
.google-btn {
  border-color: #4285F4;
  background: white;
  box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
}

.google-btn:hover {
  background: #f8f8f8;
  box-shadow: 0 3px 10px rgba(66, 133, 244, 0.3);
  border-color: #3367d6;
}

/* Facebook button */
.facebook-btn {
  background: #1877f2;
  border-color: #1877f2;
  color: white;
}

.facebook-btn:hover {
  background: #166fe5;
  border-color: #166fe5;
}

/* Sign out button */
.signout-btn {
  padding: 6px 12px;
  font-size: 0.85em;
  background: #f5f5f5;
  border-color: #ddd;
  color: #666;
}

.signout-btn:hover {
  background: #e5e5e5;
  color: #333;
}

/* User avatar */
.auth-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
}

/* User name */
.auth-user-name {
  font-family: "Alef", "Open Sans Hebrew", "Segoe UI", sans-serif;
  font-size: 1.05em;
  color: #333;
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Disabled generator button (when not logged in) */
.generator-btn.disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: #e0e0e0;
  border-color: #ccc;
  position: relative;
}

.generator-btn.disabled::before {
  content: "🔒";
  margin-left: 5px;
}

.generator-btn.disabled:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

/* Tooltip on hover for disabled button */
.generator-btn.disabled:hover::after {
  content: "התחבר כדי לפתוח";
  position: absolute;
  bottom: -35px;
  right: 50%;
  transform: translateX(50%);
  background: #333;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  white-space: nowrap;
  z-index: 100;
}

/* Login prompt tooltip */
.login-prompt {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  padding: 8px 12px;
  background: #333;
  color: white;
  font-size: 0.85em;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 100;
  font-family: "Alef", "Open Sans Hebrew", "Segoe UI", sans-serif;
}

.login-prompt::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 20px;
  border: 6px solid transparent;
  border-bottom-color: #333;
}

.login-prompt.hidden {
  display: none;
}

/* Algorithm selector layout adjustment for auth */
.algorithm-selector {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

/* Generator button wrapper for tooltip positioning */
.generator-btn-wrapper {
  position: relative;
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .auth-container {
    order: -1;
    width: 100%;
    justify-content: flex-end;
    margin-bottom: 10px;
  }

  .auth-prompt {
    display: none;
  }

  .auth-btn span {
    display: none;
  }

  .auth-btn {
    padding: 8px;
  }

  .auth-user-name {
    display: none;
  }
}
