/* Authentication UI Styles */

.auth-container {
  position: absolute;
  top: 0;
  right: 20px;
  z-index: 1000;
}

.login-btn {
  background-color: white;
  color: #333;
  padding: 10px 20px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.login-btn:hover {
  background-color: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.login-btn .google-icon {
  flex-shrink: 0;
}

/* User Profile Dropdown */
.user-profile-dropdown {
  position: relative;
}

.user-profile-trigger {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 8px 16px;
  border-radius: 25px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s;
}

.user-profile-trigger:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  background-color: #f8f9fa;
}

.user-profile-trigger img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

.user-profile-trigger .user-name {
  display: none; /* User name now shown in dropdown menu */
}

.admin-badge {
  background-color: #ff9800;
  color: white;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  margin-right: 10px;
  font-weight: bold;
}

.dropdown-arrow {
  color: #666;
  transition: transform 0.3s;
}

.user-profile-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 1001;
}

.user-profile-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
}

.dropdown-user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dropdown-user-details {
  flex: 1;
  min-width: 0;
}

.dropdown-user-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-user-email {
  font-size: 12px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s;
  border-left: 3px solid transparent;
}

.dropdown-item:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.dropdown-item:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  border-left-color: #4285f4;
}

.dropdown-item.logout:hover {
  background-color: #ffebee;
  border-left-color: #ea4335;
  color: #ea4335;
}

.dropdown-item svg {
  margin-right: 12px;
  flex-shrink: 0;
  opacity: 0.7;
}

.dropdown-item:hover svg {
  opacity: 1;
}

.dropdown-divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 4px 0;
}

.error-message {
  position: fixed;
  top: 80px;
  right: 20px;
  background-color: #f44336;
  color: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 999;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .auth-container {
    top: 0;
    right: 10px;
  }

  .user-profile-trigger {
    padding: 6px 12px;
  }

  .user-profile-trigger img {
    width: 28px;
    height: 28px;
  }

  .admin-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .dropdown-menu {
    min-width: 240px;
  }

  .dropdown-user-info {
    padding: 14px;
  }

  .dropdown-user-info img {
    width: 36px;
    height: 36px;
  }

  .dropdown-user-name {
    font-size: 13px;
  }

  .dropdown-user-email {
    font-size: 11px;
  }

  .dropdown-item {
    padding: 10px 14px;
    font-size: 13px;
  }

  .dropdown-item svg {
    width: 14px;
    height: 14px;
  }

  .login-btn {
    padding: 8px 14px;
    gap: 8px;
  }

  .login-btn .google-icon {
    width: 18px;
    height: 18px;
  }

  .error-message {
    right: 10px;
    left: 10px;
    top: 70px;
  }
}

@media (max-width: 480px) {
  .auth-container {
    top: 0;
    right: 8px;
  }

  .user-profile-trigger {
    padding: 5px 10px;
  }

  .user-profile-trigger img {
    width: 24px;
    height: 24px;
    margin-right: 6px;
  }

  .dropdown-menu {
    min-width: 220px;
    right: -8px; /* Adjust for screen edge */
  }

  .dropdown-user-info {
    padding: 12px;
    gap: 10px;
  }

  .dropdown-user-info img {
    width: 32px;
    height: 32px;
  }

  .dropdown-user-name {
    font-size: 12px;
  }

  .dropdown-user-email {
    font-size: 11px;
  }

  .login-btn {
    padding: 8px 14px;
    font-size: 13px;
    gap: 8px;
  }

  .login-btn .google-icon {
    width: 18px;
    height: 18px;
  }
}
